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

Update workflows to use v4 of the artifact actions #348

Closed
anfredette opened this issue Dec 10, 2024 · 2 comments · Fixed by #367
Closed

Update workflows to use v4 of the artifact actions #348

anfredette opened this issue Dec 10, 2024 · 2 comments · Fixed by #367
Assignees
Milestone

Comments

@anfredette
Copy link
Contributor

From GitHub:

Artifact actions v3 will be closing down by January 30, 2025. You are receiving this email because you have GitHub Actions workflows using v3 of actions/upload-artifact or actions/download-artifact. After this date using v3 of these actions will result in a workflow failure. Artifacts within their retention period will remain accessible from the UI or REST API regardless of the version used to upload.

To raise awareness of the upcoming removal, we will temporarily fail jobs using v3 of actions/upload-artifact or actions/download-artifact. Builds that are scheduled to run during the brownout periods will fail. The brownouts are scheduled for the following dates and times:

January 9th, 12pm - 1pm EST
January 16th, 10am-2pm EST
January 23rd, 9am-5pm EST

What you need to do

Update workflows to begin using v4 of the artifact actions as soon as possible. While v4 improves upload and download speeds by up to 98% and includes several new features, there are key differences from previous versions that may require updates to your workflows. Please see the documentation in the project repositories for guidance on how to migrate your workflows.

@github-project-automation github-project-automation bot moved this to 🆕 New in bpfman Dec 10, 2024
@anfredette anfredette added this to the Q1-2025 milestone Dec 12, 2024
@anfredette anfredette assigned frobware and unassigned frobware Jan 6, 2025
@frobware frobware self-assigned this Jan 27, 2025
@frobware
Copy link
Contributor

frobware commented Jan 28, 2025

The versions we currently use are:

% pwd
/home/aim/src/github.com/bpfman/bpfman-operator

actions/download

% ag --hidden actions/download-artifact
.github/workflows/pull_request.yml
148:        uses: actions/download-artifact@v4

actions/upload

% ag --hidden actions/upload-artifact
.github/workflows/pull_request.yml
64:      uses: actions/upload-artifact@v4
137:        uses: actions/upload-artifact@v4

AFAICT, we're using v4 already. Is there anything for us to do here?

@frobware frobware moved this from 🆕 New to 🏗 In progress in bpfman Jan 28, 2025
@frobware
Copy link
Contributor

My initial analysis was wrong:

% ag --hidden actions/upload-artifact
.github/workflows/integration_test.yml
78:        uses: actions/upload-artifact@v4

.github/workflows/pull_request.yml
64:      uses: actions/upload-artifact@v4

.github/workflows/scorecard.yml
63:        uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20

Not sure how I missed the scorecard.yaml in my original grep.

repoduper https://github.com/actions/upload-artifact 
% git tag --contains 97a0fba1372883ab732affbe8f94b823f91727db
v3-node20
v3.2.0-node20
v3.2.1-node20

So we are using v3.

frobware added a commit to frobware/bpfman-operator that referenced this issue Jan 31, 2025
Fixes: bpfman#348.

Upgrade from actions/upload-artifact@v3-node20 (previously referenced
as "v3.pre.node20" in the existing comment) to v4.

Determine the previous and v4 commit SHAs:

  $ git tag --contains 97a0fba1372883ab732affbe8f94b823f91727db
  v3-node20
  v3.2.0-node20
  v3.2.1-node20

  $ git ls-remote https://github.com/actions/upload-artifact.git refs/tags/v4
  65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08	refs/tags/v4
  $ git tag --contains 65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08
  v4
  v4.6.0

Bump straight to v4 after reviewing the migration documentation[1]
because:

- The workflow uploads a single artefact once, so v4’s restriction on
  multiple uploads to the same name and its new merging behaviour do
  not affect our usage.

- The retention-days input remains unchanged in v4. While neither v3
  nor v4 explicitly define a default in their action.yml, GitHub’s
  documentation[2] states that artifacts default to 90 days unless
  overridden in repository settings. Since v4 does not specify a new
  default, it continues using GitHub’s 90-day retention policy, as
  before.

- Hidden files are not relevant to this artefact, so their
  exclusion (introduced in v4.4) has no impact. Since v4.6.0 maintains
  this behaviour, upgrading does not introduce any changes affecting
  this workflow.

[1] https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md
[2] https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/storing-and-sharing-data-from-a-workflow

Signed-off-by: Andrew McDermott <[email protected]>
@mergify mergify bot closed this as completed in #367 Jan 31, 2025
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in bpfman Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants