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

fix(ci): bump actions workflow versions #11272

Merged
merged 9 commits into from May 14, 2024

Conversation

kapenacunmin
Copy link
Contributor

Currently there are tons of warnings on Actions:

As some actions are relying on Node16 which is going to EOL(https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/), and some workflows are being deprecated.

For example https://github.com/actions/download-artifact

actions/download-artifact@v3 is scheduled for deprecation on November 30, 2024. Learn more. Similarly, v1/v2 are scheduled for deprecation on June 30, 2024.

https://github.com/actions/upload-artifact

actions/upload-artifact@v3 is scheduled for deprecation on November 30, 2024. Learn more. Similarly, v1/v2 are scheduled for deprecation on June 30, 2024.

This PR bumps those workflows to avoid future breaking on CI flow when those actions are deprecated.

@kapenacunmin kapenacunmin requested a review from a team as a code owner May 9, 2024 05:37
@kapenacunmin kapenacunmin requested a review from wacban May 9, 2024 05:37
@wacban
Copy link
Contributor

wacban commented May 9, 2024

cc @Ekleog-NEAR and @andrei-near I think it's fine but please let me know if there could be any incompatibilities or if we should test this first somehow.

@kapenacunmin
Copy link
Contributor Author

kapenacunmin commented May 9, 2024

For upload/download artifact, there are two migration docs here:

I've pushed 1491a9b which added overwrite: true to allow .github/workflows/book.yml to remain it's original function.

In v4, Artifacts are immutable unless deleted. To achieve this same behavior, you can use overwrite: true to delete the Artifact before a new one is created

@kapenacunmin
Copy link
Contributor Author

I've pushed 78b2b67 to make sure each job will produce a unique artifact name like coverage-codecov-${{ github.ref }}-py_genesis_check, and will be downloaded in upload_coverage with: merge-multiple: true

Some reference here: https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md#multiple-uploads-to-the-same-named-artifact

Copy link
Collaborator

@Ekleog-NEAR Ekleog-NEAR left a comment

Choose a reason for hiding this comment

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

LGTM! I think we should land it, and iterate on it if any failure were to happen, as this PR seems reasonable enough to me :)

@kapenacunmin
Copy link
Contributor Author

Seems using github.ref here will break actions/upload-artifact@v4 as it will contain /, I've pushed ac8a19f to change it to github.sha to see if it will fix.


@kapenacunmin
Copy link
Contributor Author

Also pushed ee45a97 tries to fix this problem:

Let's hope these two fixes will make CI pass 😇, now waits for CI approval from maintainers.

@Ekleog-NEAR
Copy link
Collaborator

Approved for CI run :)

@Ekleog-NEAR
Copy link
Collaborator

Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run

Seems like this is still an issue with the CI runs other than the first passing one. Adding matrix.id to the artifact name should hopefully solve that issue :)

@kapenacunmin
Copy link
Contributor Author

Ah, indeed, I've added ${{ matrix.name }} at 3d035a0 so these two uploads are in same syntax:

      - uses: actions/upload-artifact@v4
        if: matrix.upload_profraws
        with:
          name: coverage-profraw-${{ github.sha }}-${{ matrix.name }}
          path: coverage/profraw
          retention-days: 2
      - uses: actions/upload-artifact@v4
        with:
          name: coverage-codecov-${{ github.sha }}-cargo_nextest-${{ matrix.name }}
          path: coverage/codecov

hopefully this will solve that issue🤣, awaiting approval for workflow run again.

@kapenacunmin
Copy link
Contributor Author

Oh, it should be pattern instead of name 🤣 Sorry for missiing this here.

Pushed 06b9cc5 to fix this.

Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.00%. Comparing base (7b68efb) to head (8925fba).
Report is 17 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11272      +/-   ##
==========================================
+ Coverage   70.99%   71.00%   +0.01%     
==========================================
  Files         781      781              
  Lines      154932   155507     +575     
  Branches   154932   155507     +575     
==========================================
+ Hits       109989   110419     +430     
- Misses      40201    40316     +115     
- Partials     4742     4772      +30     
Flag Coverage Δ
backward-compatibility 0.24% <ø> (-0.01%) ⬇️
db-migration 0.24% <ø> (-0.01%) ⬇️
genesis-check 1.40% <ø> (-0.01%) ⬇️
integration-tests 37.23% <ø> (+0.11%) ⬆️
linux 69.05% <ø> (+0.10%) ⬆️
linux-nightly 70.47% <ø> (+0.03%) ⬆️
macos 52.47% <ø> (-0.18%) ⬇️
pytests 1.62% <ø> (-0.01%) ⬇️
sanity-checks 1.42% <ø> (-0.01%) ⬇️
unittests 65.42% <ø> (-0.15%) ⬇️
upgradability 0.29% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kapenacunmin
Copy link
Contributor Author

OK, I think this is the final problem here, I've pushed 122ff5f.

@kapenacunmin
Copy link
Contributor Author

Pushed 8925fba
Change matrix.name to matrix.type as there is no name in generate_coverage 😅

@kapenacunmin
Copy link
Contributor Author

Nice, all the CI passed! (Except Lychee Lints at it appears to be another problem)

@Ekleog-NEAR Ekleog-NEAR added this pull request to the merge queue May 14, 2024
@Ekleog-NEAR
Copy link
Collaborator

Cool! Let's merge and see what happens then :)

@Ekleog-NEAR
Copy link
Collaborator

Thank you for your PR!

Merged via the queue into near:master with commit d4cfd58 May 14, 2024
29 of 31 checks passed
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.

None yet

3 participants