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: upload-artifact and download-artifact v4 #3312

Conversation

ramonpetgrave64
Copy link
Collaborator

@ramonpetgrave64 ramonpetgrave64 commented Mar 8, 2024

Summary

Testing Process

This change is tested with our existing PR Check workflows that use both directly and indirectly call upload-artifact and download-artifact.

  • One test for secure-upload-folder should fail in this PR because it will use secure-upload-artifact@main. There's no workaround to dynamically use the PR's ref instead of @main, but after merging this PR, the test should start passing.

Checklist

  • Review the contributing guidelines
  • Add a reference to related issues in the PR description.
  • Update documentation if applicable.
  • Add unit tests if applicable.
  • Add changes to the CHANGELOG if applicable.

@ramonpetgrave64 ramonpetgrave64 changed the title fix: upload and download artifact v4 fix: upload-artifact and download-artifact artifact v4 Mar 8, 2024
@ramonpetgrave64 ramonpetgrave64 changed the title fix: upload-artifact and download-artifact artifact v4 fix: upload-artifact and download-artifact v4 Mar 8, 2024
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
This reverts commit 90909d4.

Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
@ramonpetgrave64 ramonpetgrave64 force-pushed the ramonpetgrave64-upload-download-artifact-v4 branch from 14806b8 to 8909854 Compare March 8, 2024 18:35
@ramonpetgrave64 ramonpetgrave64 marked this pull request as ready for review March 8, 2024 18:40
Copy link
Collaborator

@laurentsimon laurentsimon left a comment

Choose a reason for hiding this comment

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

LGTM. Had a comment on the workflow update

CHANGELOG.md Outdated
@@ -99,6 +100,10 @@ duplication."

## Unreleased

### Unreleased: Breaking Change: upload-artifact and download-artifact

- Our workflows now use the new `@v4`s of `actions/upload-artifact` and `actions/download-artifact`, which are incompatiblle with the prior `@v3`. See Our docs on the [generic generator](./internal/builders/generic/README.md#compatibility-with-actionsdownload-artifact).
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Add a sentence (or a section) on how to upgrade from v2 to v3. I know it looks obvious, but let's call it out explicitly. (We can clean up the "how to upgrade" into. dedicated section when we do the release if needed) Wdut?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think you're right. A little bit of extra docs can go a long way. Added.

.github/workflows/pre-submit.actions.yml Outdated Show resolved Hide resolved
Copy link
Collaborator

@laurentsimon laurentsimon left a comment

Choose a reason for hiding this comment

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

Any reason you ad to update the package-lock.json? That should not be necessary. Maybe a leftover from prior experiments :)?

@ramonpetgrave64
Copy link
Collaborator Author

Any reason you ad to update the package-lock.json? That should not be necessary. Maybe a leftover from prior experiments :)?

Just a package that had a vulnerability. I bumped the version with npm audit fix.

Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Copy link
Collaborator

@laurentsimon laurentsimon left a comment

Choose a reason for hiding this comment

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

LGTM, thanks1

Can we do the package json update in a separate PR to avoid "polluting" this PR's changes?

@laurentsimon
Copy link
Collaborator

please check the linter warning

Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
@ramonpetgrave64
Copy link
Collaborator Author

@laurentsimon I removed the npm change and fixed the makrdownlint errors

@laurentsimon
Copy link
Collaborator

secure-upload-folder seems to be failing. can you take a look?

@ramonpetgrave64
Copy link
Collaborator Author

Yes, it should fail because

  • One test for secure-upload-folder should fail in this PR because it will use secure-upload-artifact@main. There's no workaround to dynamically use the PR's ref instead of @main, but after merging this PR, the test should start passing

Signed-off-by: laurentsimon <64505099+laurentsimon@users.noreply.github.com>
@laurentsimon laurentsimon enabled auto-merge (squash) March 13, 2024 20:28
@laurentsimon
Copy link
Collaborator

  • secure-upload-folder

Got it. I created #3320 for tracking. Should be easy to fix.

I'll disable the check temporarily to merge

@laurentsimon
Copy link
Collaborator

laurentsimon commented Mar 13, 2024

Any idea why pre-submit e2e generic default / build / final (pull_request) is failing? I suppose it's related to the secure-upload folder...

@laurentsimon laurentsimon merged commit b595e06 into slsa-framework:main Mar 13, 2024
72 of 74 checks passed
ramonpetgrave64 added a commit that referenced this pull request Mar 20, 2024
ramonpetgrave64 added a commit that referenced this pull request Mar 20, 2024
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.

[feature] Use upload-artifact v4
2 participants