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

Upgrade upload-artifact and download-artifact actions from v3 to v4 #178

Merged
merged 2 commits into from
Jan 29, 2024

Conversation

ConorMacBride
Copy link
Member

The v3 to v4 upgrade introduces three breaking changes: https://github.com/actions/upload-artifact#breaking-changes

Two of them are not relevant as we don't support self-hosted runners, and we only ever save one artifact per job.

The other is that the artifacts are now immutable -- we cannot keep uploading wheels to the same artifact in each job. I've updated the workflow to write a separate artifact per build job and merge them in the upload job.

Supersedes #173 and #174.

Should not be a breaking upgrade as `artifact-name` is generated from the tox environment name so should already be unique to the job. (Artifacts are immutable in v4.)
@pllim
Copy link
Contributor

pllim commented Jan 4, 2024

Thanks! Is this compatible with how astropy uses this workflow in https://github.com/astropy/astropy/blob/main/.github/workflows/publish.yml ? cc @astrofrog and @saimn

@pllim
Copy link
Contributor

pllim commented Jan 4, 2024

For other downstream packages that uses this, will things just work or we have to change stuff too in our own repos?

@pllim
Copy link
Contributor

pllim commented Jan 4, 2024

Given that some artifacts are uploaded as nightly wheels (say, to https://anaconda.org/astropy/astropy/files?type=pypi ), how will this affect the "old files pruning" script that @astrofrog previously implemented?

@ConorMacBride
Copy link
Member Author

@ConorMacBride ConorMacBride marked this pull request as ready for review January 4, 2024 18:42
@ConorMacBride
Copy link
Member Author

Thanks! Is this compatible with how astropy uses this workflow in https://github.com/astropy/astropy/blob/main/.github/workflows/publish.yml ? cc @astrofrog and @saimn

The astropy workflow looks to be compatible with the changes in this PR.

This PR should not introduce any breaking changes for any repo. The only new breakage would be workflows that are building the same target more than once which is likely a mistake – the astropy workflow doesn't have this issue because the upload to PyPI is disabled in the first job so only one artifact is saved for that duplicate build target.

@ConorMacBride
Copy link
Member Author

Given that some artifacts are uploaded as nightly wheels (say, to https://anaconda.org/astropy/astropy/files?type=pypi ), how will this affect the "old files pruning" script that @astrofrog previously implemented?

This PR should not affect that. The publish workflow changes in this PR only affect how built wheels and sdists are passed from the build jobs to the upload job.

@pllim
Copy link
Contributor

pllim commented Jan 23, 2024

Can this be merged and a release made?

I dunno what is going on but the released upload workflow is terribly broken: https://github.com/astropy/astropy/actions/runs/7620855779/job/20756741326 (it keeps the very old wheel but deletes the new wheels that are supposed to be uploaded) 🔥

nvm astropy/astropy#15935

@Cadair Cadair merged commit 36c724c into OpenAstronomy:main Jan 29, 2024
66 checks passed
@ConorMacBride ConorMacBride deleted the upgrade-artifact-v4 branch January 29, 2024 19:12
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.

3 participants