-
Notifications
You must be signed in to change notification settings - Fork 334
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
Split debug artifacts PR check into two jobs #1160
Split debug artifacts PR check into two jobs #1160
Conversation
Hmmm...or you can move |
Yeah, I think that will be easier. Will do that now. |
fa8d4bd
to
81c5b2d
Compare
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.
I changed the workflow to a non-generated workflow so that it can include 2 jobs, but kept all of the fields from the generated workflow.
I'm not entirely sure how to test this to make sure I haven't messed up any of the syntax, though.
Re testing: because this workflow has a |
Thanks! I didn't know that there was a view that showed syntax errors. |
I think I misread. It looks like the "Debug artifact upload" check is the only one pending, and I think it refers to the PR Check that I deleted, so it should be removed for future PRs? The new upload and download jobs seem to be succeeding 🥳 It seems like the download job is still running using the matrix even though I hard-coded it to run only on |
I think this PR is ready for final review! The download/check part of the job only runs on one machine and successfully checks all uploaded artifacts. See https://github.com/github/codeql-action/runs/7649251536?check_suite_focus=true |
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! Minor suggestions only.
LANGUAGES="cpp csharp go java javascript python" | ||
for os in $OPERATING_SYSTEMS; do | ||
for version in $VERSIONS; do | ||
cd ./my-debug-artifacts-$os-$version |
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.
Quotes not essential but a good habit.
I observe this cd
will fail if the artifact dir doesn't exist, but I think that's ok and will give us a reasonable error message. We can improve it in future if necessary.
cd ./my-debug-artifacts-$os-$version | |
cd "./my-debug-artifacts-$os-$version" |
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.
Ah interesting.. I wonder if it fails if it will continue onto the next directory? Probably not..
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.
It will not. This is because by default Actions runs bash
steps with set -e
(set -eo pipefail
specifically; see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell), so any shell command exiting non-zero will fail the entire step.
You can turn this off in a given step by adding set +e
at the beginning, but we don't need that here.
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.
Interesting! Thanks!
Hm.. it looks like this is blocking on the 12 expected checks, which are the checks that I removed in this PR 🤔 is there any way to force green? |
The current debug artifacts PR check executes just after the
analyze
step, which works at the moment but fails in #1159 which moves the artifact uploading topost:
hooks. This PR attempts to split the PR check into 2 jobs, so that thepost:
hooks from the first job complete before the job that attempts to download and check the artifacts.As the sync.py script doesn't yet work with a file that has multiple jobs, I stopped using the generator for this workflow.
Merge / deployment checklist