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

Bump upload-artifact and actions/download-artifact from 3 to 4 #104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

viktorkholod
Copy link

Artifact actions v3 is set to be deprecated by December 5, 2024 (https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/). I am updating actions/upload-artifact and actions/download-artifact to version 3.

@CLAassistant
Copy link

CLAassistant commented Nov 7, 2024

CLA assistant check
All committers have signed the CLA.

@per1234 per1234 added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Nov 7, 2024
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Sync Labels" GitHub Actions workflow is configured to allow the use of multiple shared label configuration files. This is done by using a job matrix in the GitHub Actions workflow to download each of the files from the source repository in a parallel GitHub Actions workflow job. A GitHub Actions workflow artifact was used to transfer the generated files between sequential jobs in the workflow. The "actions/upload-artifact" and "actions/download-artifact" actions are used for this purpose.

Currently, a single artifact was used for the transfer of all the shared label configuration files, with each of the parallel jobs uploading its own generated files to that artifact. However, support for uploading multiple times to a single artifact was dropped in version 4.0.0 of the "actions/upload-artifact" action. So your current proposal of simply bumping the action versions in the workflow are not sufficient, as we can see from the failure of the workflow run triggered by the PR:

https://github.com/arduino/setup-protoc/actions/runs/11723327027/job/32654772546?pr=104#step:3:19

Run actions/upload-artifact@v4
With the provided path, there will be 1 file uploaded
Artifact name is valid!
Root directory input is valid!
Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run

It is now necessary to use a dedicated artifact for each of the builds. These can be downloaded in aggregate by using the artifact name globbing and merging features which were introduced in version 4.1.0 of the "actions/download-artifact" action. You can see how that is done here in the upstream copy of the workflow:

arduino/tooling-project-assets@a4efefd


You must also bump the geekyeggo/delete-artifact action dependency of the "Sync Labels" GitHub Actions workflow because the current version v1 is incompatible with the artifacts produced by actions/upload-artifact@v4:

https://github.com/GeekyEggo/delete-artifact#-compatibility

✅ Compatibility

actions/upload-artifact geekyeggo/delete-artifact
@v1, @v2, @v3 @v1, @v2
@v4 @v4, @v5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants