-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
ci: Update Github Actions for Node 20. #6670
ci: Update Github Actions for Node 20. #6670
Conversation
Ah, too late, didn't read: apparently, updating the The fix will be reworking the actions jobs to target unique artifact names/paths, but I or someone else will need to do some digging to make sure we don't break anything in silly ways from changing artifacts names around. |
See also #6650 😉 |
@philipaconrad we can do this in stages I think. We can fix the pull request workflow as that should not be affected by this. We can then look into the others which may need some reworking. |
So! The good news is that splitting the artifacts targets up by their OS/arch target in the build matrix should be just fine. It will mean that we will have a number of binaries targets equal to the number of arches. 🤔 |
✅ Deploy Preview for openpolicyagent ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
12e8053
to
373039a
Compare
Github Actions is annoying because you basically always have to test-by-running. 😅 At any rate, I've whacked the Major changes:
I'm also adding a few comments here and there to document weirdness in the build system as it's come up (such as only smoke-testing To properly test the |
373039a
to
15bad2d
Compare
@@ -240,7 +251,8 @@ jobs: | |||
- name: Download release binaries | |||
uses: actions/download-artifact@v4 | |||
with: | |||
name: binaries | |||
pattern: binaries-* | |||
merge-multiple: 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.
Oh cool
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.
Thanks! 👍
- os: darwin | ||
run: macos-latest | ||
targets: ci-build-darwin ci-build-darwin-arm64-static | ||
arch: amd64 |
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.
Since this also contains arm64
, it would have been nice if we could use all
or something. But I suppose that would mess up the GOARCH
env var ..
Perhaps we could do a third Upload Binaries
step to handle the case where arch
is empty 🤔.
This is very much a nit, so feel free to disregard 😄.
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 the interest of getting this merged, it may be worth adding a comment for that target about the situation, leaving the arch: amd64
field alone for now. 🤔
Yes, I was thinking the same @srenatus 👍 . |
@@ -49,13 +49,17 @@ jobs: | |||
run: ubuntu-22.04 | |||
targets: ci-go-ci-build-linux-static | |||
go_tags: GO_TAGS="-tags=opa_no_oci" | |||
variant_name: opa_no_ci |
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.
should this be named opa_no_oci
like it is above? or are they just confusingly similar? :D
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.
So, the go_tags
item in YAML is actually the whole string GO_TAGS="-tags=opa_no_oci"
, which is horrendous for downstream steps that expect just [a-zA-Z0-9_-]*
as the expected character set. 😅 I took the lazy route, and added a new YAML item with just the important bits.
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.
Right, but I meant that there’s a typo, or no? “ci” -> “oci”
This commit updates the `upload-artifact` and `download-artifact` Github actions to the latest version (v4), which should eliminate the deprecation warning spam we're seeing in CI. Note: We had to break up the merged "binaries" target into multiple, smaller targets, which are group by OS for the `post-tag` and `post-merge` workflows, and by OS + arch for the `pull-request` workflow. Signed-off-by: Philip Conrad <philipaconrad@gmail.com>
15bad2d
to
4db599a
Compare
Thank you all for the review comments! 😄 I've updated the Those two workflows are noticeably less complex in how they partition the build jobs up, so they were much easier to refactor. Note that I cannot really test them, because they fire after major actions, like a PR merge or release tag, occur. After this PR merges, I'll keep an eye on the GH actions to make sure I didn't b0rk the merge job. If it fails, then the |
This PR updates the
upload-artifact
anddownload-artifact
Github actions to the latest version (v4), which should eliminate the deprecation warning spam we're seeing in CI.Screenshot of an older CI run's warnings (non-exhaustive)
Note to reviewers: The release (
post-tag
) andpost-merge
workflows have been updated as well, with the same general strategies used for the more complexpull-request
workflow.