-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Random Routes in Test Applications #123
Conversation
|
8981de4
to
7e51f52
Compare
86122cc
to
a9a8885
Compare
grpcurl $ROUTE.${{ secrets.CF_DOMAIN }}:443 example.Example.Run | ||
ROUTE=${{ github.run_id }}-java-grpc-test | ||
cf8 map-route java-grpc-test ${{ secrets.CF_DOMAIN }} --hostname $ROUTE --app-protocol http2 | ||
grpcurl -proto http2/java-grpc/app/src/main/proto/example.proto $ROUTE.${{ secrets.CF_DOMAIN }}:443 example.Example.Run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only thing different is the path to the proto files. These files are all identical and just kept with the examples for completeness. There is no good reason to explicitly use different ones. In fact it would be better to use a single one to ensure that the examples all do the same thing and not something different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, the grpcurl
command for the go-grpc-test
app differs from the remaining ones. I'd like to keep the focus on fixing the route issue in this Pull-Requst, and do other improvements separately.
@@ -56,6 +56,8 @@ jobs: | |||
cf8 --version | |||
- name: Build Java apps | |||
run: ./http2/gradlew clean build -p http2 | |||
- name: Remove routes from manifest | |||
run: yq 'del(.applications[].routes)' -i "${GITHUB_WORKSPACE}/http2/apps-manifest.yml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of deleting, could we define a (default empty) prefix variable?
e.g.
application:
route: "((prefix))some-app-name.((domain))"
and then define prefix: ""
in the vars.yml, to override it when deploying?
0dab785
to
de93dbb
Compare
The
sample-app-test
workflow currently fails, because someone else deployed these sample apps in his/her own CF space on the same instance. Thus, the routes are takes and cannot be reassigned to apps in our CF space.With this change, we prefix the routes with the Workflow Run ID, which should always give us unique routes.
Side note 1:
cf push
comes with the optional--no-route
flag, unfortunately it's not working with mta deployments. That's why we have the yq step to remove allroutes
from the manifest before deploying it.Side note 2: We cannot use
random-route: true
in the manifest: The GRPC tests require http2, and unfortunately the protocol for random routes defaults tohttp1
and cannot be overwritten (unless usingcf update-destination
). Hence,random-route
is not an option, as it would break the scenario where a user deploys the test apps.