-
Notifications
You must be signed in to change notification settings - Fork 2k
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
run: use shorter suffix in service names #1835
Conversation
Trying the force-run one more time. I don't see any output from the build-with-run.sh script, preventing me from doing any troubleshooting. If this still doesn't provide insight, I'll start adding some more debugging code to the script and iterate it here. |
.kokoro/build-with-run.sh
Outdated
# Builds not triggered by a PR will fall back to the commit hash then "latest". | ||
SUFFIX=${KOKORO_BUILD_ID} | ||
# Cloud Run has a max service name length, $KOKORO_BUILD_ID is too long to guarantee no conflict deploys. | ||
SUFFIX=$(cat /dev/urandom | LC_CTYPE=C tr -dc 'a-z0-9' | head -c 15) |
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.
Can we use uuid=$(uuidgen)
? But either way is fine.
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.
Cloud Run has a max name length of 63 characters. This is the fix we are implementing to prevent that since commit sha and build id are usually too long.
Looks like the script stops after |
Yeah, that's my theory, given the change to suffix generation is the only significant change. I've added |
I'm seeing green locally, so cannot reproduce why this is failing because of #1681. |
I've seen the correct log artifacts in Sponge. The run tests don't have extra artifacts because mocha never runs: > hello-broken@1.0.0 test /tmpfs/src/github/nodejs-docs-samples/run/hello-broken
> echo "Error: no test specified" && exit 0
Error: no test specified The errors from the run script are in the logs:
|
Fixes #1817
Every test run that deploys a Cloud Run service should create a distinct deployment to ensure test execution does not conflict. The Kokoro Build ID as a full UUID is too long, causing Cloud Run service name to exceed max length.