-
Notifications
You must be signed in to change notification settings - Fork 155
workflows: Use unique build ids #823
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
Conversation
|
build-yocto.yml is the only workflow where the fileserver local path and URL are defined/used directly. The LAVA test workflow inject the GITHUB_RUN_ID in their files, and also submit jobs using the GITHUB_RUN_ID, but these workflow runs are entirely separate from the build workflow runs. For instance, this recent LAVA job is named after the test.yml workflow run 14129155762 ( |
|
Also see qualcomm-linux/qcom-deb-images#4 for motivation |
koenkooi
left a comment
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.
Looks good to me!
|
Don't you need to update BASE_ARTIFACT_URL as well? That's the variable we use to define where the LAVA job will download the image from, and it's currently using the old path (RUN ID only). |
583b07b to
31dbdc5
Compare
|
Indeed, I saw this BASE_URL in my first read, but I forgot to update it. I've pushed an updated version, and grep-ed for github.run_id across workflows, this was the only use. |
Test jobs for commit 31dbdc5 |
Build ids on the fileserver simply used the GITHUB_RUN_ID, but it is not guaranteed to be unique, and other repositories and workflows share the same tree. Change build ids to be prefixed with the github.repository name, and suffixed with the github.run_attempt (in case the run has been given back). This is still safe from the perspective of directory names and URLs as GitHub prevents org and repo names to start with a dash, and use only alphanumeric chars plus single dashes. Signed-off-by: Loïc Minier <[email protected]>
Head branch was pushed to by a user without write access
31dbdc5 to
39a5a31
Compare
Test jobs for commit 39a5a31 |
Build ids on the fileserver simply used the GITHUB_RUN_ID, but it is not
guaranteed to be unique, and other repositories and workflows share the
same tree. Change build ids to be prefixed with the GITHUB_REPOSITORY
name, and suffixed with the GITHUB_RUN_ATTEMPT (in case the run has been
given back).
This is still safe from the perspective of directory names and URLs as
GitHub prevents org and repo names to start with a dash, and use only
alphanumeric chars plus single dashes.