Skip to content

Conversation

@ddelnano
Copy link
Member

Summary: Migrate the deprecated (v3) download/upload artifact actions to v4

These are slated for deprecation on Jan 30th, but GitHub is failing builds already for using these old versions (output copied below).

Error: This request has been automatically failed because it uses a deprecated version of actions/upload-artifact: 0b7f8abb1508181956e8e162db84b466c27e18ce. Learn more: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/

The breaking changes are described here and upon review I don't believe those cases are relevant to our workflows.

Relevant Issues: N/A

Type of change: /kind cleanup

Test Plan: PR build should succeed. As for others, I was planning to wait until releases happen

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
@ddelnano ddelnano requested a review from a team as a code owner January 16, 2025 17:31
@vihangm
Copy link
Member

vihangm commented Jan 16, 2025

Looks like you might be missing another instance? https://github.com/pixie-io/pixie/actions/runs/12814365364/job/35731379155?pr=2079

@ddelnano
Copy link
Member Author

@vihangm I'm confused by that error since all the occurrences are replaced:

ddelnano@dev-vm:~/code/pixie-extra (ddelnano/remove-deprecate-v3-artifact-actions) $ git grep upload-artifact
.github/workflows/build_and_test.yaml:    - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08  # v4.6.0
.github/workflows/cli_release.yaml:      uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08  # v4.6.0
.github/workflows/cli_release.yaml:    - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08  # v4.6.0
.github/workflows/cli_release.yaml:    - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08  # v4.6.0
.github/workflows/cli_release.yaml:    - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08  # v4.6.0
.github/workflows/cli_release.yaml:    - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08  # v4.6.0
.github/workflows/cloud_release.yaml:    - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08  # v4.6.0
.github/workflows/operator_release.yaml:    - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08  # v4.6.0
.github/workflows/operator_release.yaml:    - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08  # v4.6.0
.github/workflows/operator_release.yaml:    - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08  # v4.6.0
.github/workflows/perf_common.yaml:    - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08  # v4.6.0
.github/workflows/release_update_docs_px_dev.yaml:    - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08  # v4.6.0
.github/workflows/update_script_bundle.yaml:    - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08  # v4.6.0
.github/workflows/vizier_release.yaml:    - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08  # v4.6.0
.github/workflows/vizier_release.yaml:    - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08  # v4.6.0
.github/workflows/vizier_release.yaml:    - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08  # v4.6.0

My thought was that GitHub's detection of the problem might not understand that the workflow file was updated.

@vihangm
Copy link
Member

vihangm commented Jan 16, 2025

Oh you are right, it might actually run the actions from main instead of PR. That's intentional :)

@vihangm vihangm merged commit a63b134 into pixie-io:main Jan 16, 2025
18 of 20 checks passed
@ddelnano ddelnano deleted the ddelnano/remove-deprecate-v3-artifact-actions branch January 16, 2025 18:00
vihangm pushed a commit that referenced this pull request Jan 16, 2025
Summary: Fix accidentally malformed yaml in GitHub action

This was a minor mistake from #2079.

Relevant Issues: N/A

Type of change: /kind bugfix

Test Plan: GitHub actions on PR builds should pass once this is merged
(since `pull_request_target` uses the copy off main)
- Also visually inspected the #2079 change again to verify nothing else
was missed.

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
ddelnano added a commit that referenced this pull request Jan 16, 2025
Summary: Opt into dependabot GitHub actions version updates

Earlier today, the download/upload artifacts actions were deprecated and
started failing builds (#2079). There are other actions will be
deprecated soon, so let's opt into dependabots updates to stay ahead of
these notices.

> Your workflow is using a version of actions/cache that is scheduled
for deprecation, actions/cache@88522ab.
Please update your workflow to use either v3 or v4 of actions/cache to
avoid interruptions. Learn more:
https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down

There are other alternatives (like Renovatebot). I went for this since
it's already in place to get coverage quickly, but open to exploring
other options in the future.

Relevant Issues: N/A

Type of change: /kind cleanup

Test Plan: Read the docs on the setting changed

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
aimichelle pushed a commit that referenced this pull request Jan 17, 2025
Summary: Prevent cli release from mutating previously uploaded artifact

The v3 artifacts Action was deprecated and migrated from in #2079. The
new API has [breaking
changes](https://github.com/actions/upload-artifact/tree/main?tab=readme-ov-file#breaking-changes)
including that artifacts are now immutable. During #2079, I missed that
the cli release uploads to the same name twice (see grep below) and
caused the following [build
failure](https://github.com/pixie-io/pixie/actions/runs/12818680277/job/35745089942).

Relevant Issues: N/A

Type of change: /kind bugfix

Test Plan: Verified that the `macos-artifacts` artifact name is no
longer used multiple times
- [x] Double checked other actions to verify that they aren't trying to
mutate an artifact
```
# on main w/o this change
(main) $ git grep -A2 upload-artifact | grep name | uniq -c
      1 .github/workflows/build_and_test.yaml-        name: target_files
      1 .github/workflows/cli_release.yaml-        name: linux-artifacts
      1 .github/workflows/cli_release.yaml-        name: artifact-upload-log
      2 .github/workflows/cli_release.yaml-        name: macos-artifacts            <------ the only offender
      1 .github/workflows/cli_release.yaml-        name: manifest-updates
      1 .github/workflows/cloud_release.yaml-        name: cloud-artifacts
      1 .github/workflows/operator_release.yaml-        name: manifest-updates
      1 .github/workflows/operator_release.yaml-        name: operator-artifacts
      1 .github/workflows/operator_release.yaml-        name: index-artifacts
      1 .github/workflows/perf_common.yaml-        name: ${{ hashFiles('run_output') }}
      1 .github/workflows/release_update_docs_px_dev.yaml-        name: pxl_documentation
      1 .github/workflows/update_script_bundle.yaml-        name: bundle
      1 .github/workflows/vizier_release.yaml-        name: manifest-updates
      1 .github/workflows/vizier_release.yaml-        name: vizier-artifacts
      1 .github/workflows/vizier_release.yaml-        name: index-artifacts
```

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
ddelnano added a commit to ddelnano/pixie that referenced this pull request Jun 5, 2025
…ixie-io#2079)

Summary: Migrate the deprecated (v3) download/upload artifact actions to
v4

These are slated for deprecation on Jan 30th, but GitHub is failing
builds already for using these old versions (output copied below).

> Error: This request has been automatically failed because it uses a
deprecated version of `actions/upload-artifact:
0b7f8abb1508181956e8e162db84b466c27e18ce`. Learn more:
https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/

The breaking changes are described
[here](https://github.com/actions/download-artifact/blob/7fba95161a0924506ed1ae69cdbae8371ee00b3f/docs/MIGRATION.md#migration)
and upon review I don't believe those cases are relevant to our
workflows.

Relevant Issues: N/A

Type of change: /kind cleanup

Test Plan: PR build should succeed. As for others, I was planning to
wait until releases happen

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
(cherry picked from commit a63b134)
ddelnano added a commit to ddelnano/pixie that referenced this pull request Aug 6, 2025
Summary: Opt into dependabot GitHub actions version updates

Earlier today, the download/upload artifacts actions were deprecated and
started failing builds (pixie-io#2079). There are other actions will be
deprecated soon, so let's opt into dependabots updates to stay ahead of
these notices.

> Your workflow is using a version of actions/cache that is scheduled
for deprecation, actions/cache@88522ab.
Please update your workflow to use either v3 or v4 of actions/cache to
avoid interruptions. Learn more:
https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down

There are other alternatives (like Renovatebot). I went for this since
it's already in place to get coverage quickly, but open to exploring
other options in the future.

Relevant Issues: N/A

Type of change: /kind cleanup

Test Plan: Read the docs on the setting changed

Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
GitOrigin-RevId: 5ea9e6e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants