You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the Google Cloud Build on PR #2414 does not escape special characters in branch names, or the branch name is too long:
generic::invalid_argument: invalid build: invalid image name "gcr.io/zealous-zebra/zcashfoundation/zebra/v1.0.0-alpha.12_CHANGELOG:19e0053": could not parse reference: gcr.io/zealous-zebra/zcashfoundation/zebra/v1.0.0-alpha.12_CHANGELOG:19e0053
Invalid value for field 'resource.name': 'zebrad-tests-revert-2301-zip221-non-finalized-state+cached-test-non-finalized-3dd49d0'. Must be a match of regex (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)
In particular, the following characters that we commonly use are banned:
+
_
.
Branch names must start with a lowercase letter, end with a lowercase letter or number, and only contain lowercase letters, numbers, and dashes. They must also be shorter than 63 characters.
We might be able to fix these issues by deleting banned characters and truncating the string, as long as we preserve the initial branch name for the git checkout.
The 'Google Cloud Build' job is controlled by https://www.github.com/ZcashFoundation/zebra/tree/main/cloudbuild.yaml, and is not triggered by GitHub Actions, but rather a hook is set up and auth'd by a GitHub App that is installed for the repo. This allows the build to be run quickly and securely even on PRs originating outside our org
Motivation
It looks like the Google Cloud Build on PR #2414 does not escape special characters in branch names, or the branch name is too long:
https://github.com/ZcashFoundation/zebra/pull/2414/checks?check_run_id=2947707553
https://github.com/ZcashFoundation/zebra/runs/3014817597?check_suite_focus=true#step:5:24
In particular, the following characters that we commonly use are banned:
+
_
.
Branch names must start with a lowercase letter, end with a lowercase letter or number, and only contain lowercase letters, numbers, and dashes. They must also be shorter than 63 characters.
We might be able to fix these issues by deleting banned characters and truncating the string, as long as we preserve the initial branch name for the git checkout.
Existing Code
Google Cloudbuild
https://www.github.com/ZcashFoundation/zebra/tree/main/cloudbuild.yaml
Cached State Action
https://github.com/ZcashFoundation/zebra/blob/main/.github/workflows/test.yml
Specifications
Zebra's cached state tests use multiple layers of commands:
GitHub Actions job
https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
gcloud compute ssh
https://cloud.google.com/sdk/gcloud/reference/compute/ssh
ssh
https://www.man7.org/linux/man-pages/man1/ssh.1.html
docker run
https://docs.docker.com/engine/reference/run/
Related Work
This seems like the same kind of underlying cause as PR #2403 - these tests have too many layers. See #2411 for some possible solutions.
The text was updated successfully, but these errors were encountered: