Skip to content
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

Support Actions Artifacts v2 (i.e. upload-artifact v4) #475

Closed
Bo98 opened this issue Dec 14, 2023 · 4 comments · Fixed by #529
Closed

Support Actions Artifacts v2 (i.e. upload-artifact v4) #475

Bo98 opened this issue Dec 14, 2023 · 4 comments · Fixed by #529
Labels
help wanted Extra attention is needed

Comments

@Bo98
Copy link
Member

Bo98 commented Dec 14, 2023

Notable breaking change for the way we deal with bottles, that will require changes in multiple workflows and repositories:

Uploading to the same named Artifact multiple times.

Due to how Artifacts are created in this new version, it is no longer possible to upload to the same named Artifact multiple times. You must either split the uploads into multiple Artifacts with different names, or only upload once.

There's also some improvements that may make some things easier like:

Once uploaded, an Artifact ID is returned and Artifacts are immediately available in the UI and REST API. Previously, you would have to wait for the run to be completed before an ID was available or any APIs could be utilized.

Artifacts can now be downloaded and deleted from the UI before the entire workflow run finishes.

There was some difficulties we had with bottle caching and reruns that may have been solved here.

We can also probably deprecate Homebrew/actions/download-artifact:

This library (and actions/download-artifact) now support downloading Artifacts from other repositories and runs if a GITHUB_TOKEN with sufficient actions:read permissions are provided.

Worth noting however when we make the change that when switching to actions/download-artifact@v4:

Downloading artifacts that were created from action/upload-artifact@v3 and below are not supported.

This means we should probably do the switch at a time when a bunch of PRs aren't pending approval as all of them will need rebasing.


There will likely also be a GitHub blog post about all this soon.

These partially overlap in information, but all three are worth reading:

@Bo98 Bo98 added the help wanted Extra attention is needed label Dec 14, 2023
@MikeMcQuaid
Copy link
Member

Thanks @Bo98, good reads. Anything relevant to more basic uses like e.g. formulae.brew.sh we should know about (other than: you'll need to upgrade both actions at once)?

@Bo98
Copy link
Member Author

Bo98 commented Dec 15, 2023

Should all be okay there I think.

Only scenario which is a problem is any workflow that uploads to the same artifact name in multiple jobs, e.g. each OS/arch in Homebrew-core uploads to a single "bottle" artifact. This setup no longer works. Workflows using a matrix is usually where you see this.

Things here in Homebrew/actions may be used under such environments by Homebrew/core etc so anything here could also be affected.

@carlocab
Copy link
Member

carlocab commented Feb 1, 2024

I think migration should be fairly straightforward (at least for Homebrew/core) given changes in the newer versions of upload/download-artifact: actions/upload-artifact#472 (comment)

@Bo98
Copy link
Member Author

Bo98 commented Feb 1, 2024

We don't always use download-artifact directly (except dispatch-* workflows), but we could similarly add a pattern feature to pr-pull.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants