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

CI: update upload-artifact action #3689

Closed
JakobLichterfeld opened this issue Feb 25, 2024 · 15 comments
Closed

CI: update upload-artifact action #3689

JakobLichterfeld opened this issue Feb 25, 2024 · 15 comments
Labels
github_actions Pull requests that update Github_actions code

Comments

@JakobLichterfeld
Copy link
Collaborator

JakobLichterfeld commented Feb 25, 2024

Run output: https://github.com/teslamate-org/teslamate/actions/runs/8035109824

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/upload-artifact@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

--> Update to upload-artifact@v4

Breaking changes --> see Migration Guide

@JakobLichterfeld JakobLichterfeld added the github_actions Pull requests that update Github_actions code label Feb 25, 2024
@JakobLichterfeld JakobLichterfeld changed the title CI: update build artefact action CI: update upload-artifact action Feb 26, 2024
@micves
Copy link
Contributor

micves commented Feb 27, 2024

Think this is causing errors in:
https://github.com/teslamate-org/teslamate/actions/runs/8064800308/job/22029399915

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

Found something here that could explain it:
actions/upload-artifact#478

@JakobLichterfeld
Copy link
Collaborator Author

Thanks, GitHub Actions are hard to test locally (even if it is possible in most cases).
Will take a deeper look into the naming. I was aware of the breaking change and considered it as not relevant, as we use it differently.

@micves
Copy link
Contributor

micves commented Feb 27, 2024

Thanks for looking into it. There are many small steps in CI at the moment, but at some point it's all going to be sorted out :)

@JakobLichterfeld
Copy link
Collaborator Author

fixed with 39ab647
Unfortunately not tested, as for security reasons changes in .githubfolder are excluded for our automatic ci

@micves
Copy link
Contributor

micves commented Feb 28, 2024

It looks like it works on master, but still not on PRs :(
https://github.com/teslamate-org/teslamate/actions/runs/8082839912/job/22084555821

in the log it seems to ignore ${{ matrix.runs-on }}

2024-02-28T15:27:19.5466184Z ##[group]Run actions/upload-artifact@v4
2024-02-28T15:27:19.5466740Z with:
2024-02-28T15:27:19.5467093Z name: single-digest-

@JakobLichterfeld
Copy link
Collaborator Author

Test with #3702

@JakobLichterfeld
Copy link
Collaborator Author

As I needed to adopt the digest naming again and our security is working, new test with #3703

@JakobLichterfeld
Copy link
Collaborator Author

JakobLichterfeld commented Feb 29, 2024

Good thing our security guards works perfectly. Bad thing: testing GitHub actions is now a pain.

@JakobLichterfeld
Copy link
Collaborator Author

Test with #3704

@JakobLichterfeld
Copy link
Collaborator Author

Ok test looks good for the upload now, the merging is still failing: https://github.com/teslamate-org/teslamate/actions/runs/8089110554/job/22104597849?pr=3485

@JakobLichterfeld
Copy link
Collaborator Author

new test for merging with #3705

@JakobLichterfeld
Copy link
Collaborator Author

JakobLichterfeld commented Feb 29, 2024

Merging works as expected, as path is not supported anymore, the working directory needs to be set beforehand, so follow-up steps can use the downloaded artifacts directly

@JakobLichterfeld
Copy link
Collaborator Author

new test with #3706

This was referenced Feb 29, 2024
@JakobLichterfeld
Copy link
Collaborator Author

JakobLichterfeld commented Feb 29, 2024

Finally working with v4 action, https://github.com/teslamate-org/teslamate/actions/runs/8094659397?pr=3708

@micves fyi

@micves
Copy link
Contributor

micves commented Feb 29, 2024

Thanks a lot, that looks like it was a rough one :|

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update Github_actions code
Projects
None yet
Development

No branches or pull requests

2 participants