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] use actions/{upload,download}-artifact@v4 #676

Open
wants to merge 14 commits into
base: devel
Choose a base branch
from

Conversation

NilashishC
Copy link
Contributor

@NilashishC NilashishC commented Feb 10, 2025

SUMMARY

As per the failure in https://github.com/ansible/pylibssh/actions/runs/13234496470/job/36936955478?pr=675, v3 of actions/upload-artifact and actions/download-artifact are deprecated and cannot be used. This PR updates it to v4.

ISSUE TYPE
  • Maintenance Pull Request

This comment was marked as off-topic.

Signed-off-by: NilashishC <[email protected]>
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Feb 10, 2025
@NilashishC
Copy link
Contributor Author

@webknjaz Hi. Could you please have a look at this PR? This needs to be merged before #675.

Thank you.

Signed-off-by: NilashishC <[email protected]>
Signed-off-by: NilashishC <[email protected]>
@NilashishC NilashishC requested a review from webknjaz February 10, 2025 11:36
Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

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

@NilashishC this is a move in the right direction. It is, however, incomplete.

You have to upgrade re-actors/checkout-python-sdist@release/v1 to re-actors/checkout-python-sdist@release/v2 (because v1 uses an older version of the download action).

And additionally, the wheel uploads must change their artifact names to be unique (example: https://github.com/aio-libs/yarl/blob/07c1b4f/.github/workflows/reusable-build-wheel.yml#L92C15-L95C28).

Finally, the download step in the publishing jobs must change to merge+pattern (example: https://github.com/aio-libs/yarl/blob/07c1b4f/.github/workflows/ci-cd.yml#L532C9-L533C29). The last one will not be testable in the PR CI runs and will only fail later if you don't get it right.

@NilashishC NilashishC requested a review from webknjaz February 11, 2025 06:48
@NilashishC
Copy link
Contributor Author

@webknjaz thanks for the review.

The variables required to make the wheel name unique in reusable-build-wheel.yml seems to be commented out in inputs - https://github.com/ansible/pylibssh/blob/devel/.github/workflows/reusable-build-wheel.yml#L17-L26. Should I uncomment those and add it to the wheel name? Or should I choose other inputs.

@NilashishC
Copy link
Contributor Author

@webknjaz thanks for the review.

The variables required to make the wheel name unique in reusable-build-wheel.yml seems to be commented out in inputs - https://github.com/ansible/pylibssh/blob/devel/.github/workflows/reusable-build-wheel.yml#L17-L26. Should I uncomment those and add it to the wheel name? Or should I choose other inputs.

Okay, I did try something to make it unique - https://github.com/ansible/pylibssh/pull/676/files#diff-3826dffee70012c1e07ee3d63a4cf5ba7ed82c17bbac68145432a97e71dbade7R187-R192.

However, now some of the build jobs in the matrix fail.

@webknjaz
Copy link
Member

@NilashishC your commit message says

use merge+pattern for download artifact

But that commit only makes use of the merge input and doesn't replace name with pattern. So these jobs only download the sdist while they expect the wheels to be present.

There might be other problems (I saw some weirdness in the logs) but I would imagine that those are unrelated. Fix this first and we'll see how it goes then.

@NilashishC
Copy link
Contributor Author

@webknjaz Apologies for my lack of understanding here. But I'm unsure what the pattern would be . The patterns differ in reusable-cibuildwheel vs reusable-build-wheel (because the inputs are different). How do you recommend we handle this in the download steps?

@webknjaz
Copy link
Member

Wouldn't just adding an asterisk at the end do it? This should work for as long as the prefix remains the same.

Signed-off-by: NilashishC <[email protected]>
Signed-off-by: NilashishC <[email protected]>
@NilashishC
Copy link
Contributor Author

So, all x86 ones are passing, but not the other architectures.

@webknjaz
Copy link
Member

@NilashishC will you be cleaning up the commits?

@webknjaz
Copy link
Member

So, all x86 ones are passing, but not the other architectures.

As for https://github.com/ansible/pylibssh/actions/runs/13268100337/job/37040748168?pr=676#step:9:50, it's probably a separate issue that I'd look into separately from this PR.

@NilashishC
Copy link
Contributor Author

@webknjaz I think I have resolved all your comments now. Here's the PR for actions/cache - #677.

@NilashishC
Copy link
Contributor Author

@NilashishC will you be cleaning up the commits?

Do you want me to squash them into a single one?

@webknjaz
Copy link
Member

Do you want me to squash them into a single one?

It's up to you now. I like a series of atomic commits. Not a blind squash. Currently, the repo still allows the fake merge methods like “squash” or “rebase” but I'm eventually going to enable the merge queues feature which will take those away.
So if you want this to be accepted via the squash method, it's fine for now. Just make sure there's nothing unrelated to the title of the PR in the diff.

name: ${{ inputs.dists-artifact-name }}
name: ${{ inputs.dists-artifact-name }}-
${{ inputs.manylinux-year-target }}-
${{ inputs.manylinux-image-target-arch }}-
Copy link
Member

Choose a reason for hiding this comment

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

Looks like one more factor is missing here:

Suggested change
${{ inputs.manylinux-image-target-arch }}-
${{ inputs.manylinux-image-target-arch }}-
${{ inputs.manylinux-image-target-qemu-arch }}-

It's not breaking the CI in PR builds because a portion of jobs are being skipped. However, it'll likely explode on release.

@webknjaz
Copy link
Member

Urgh.. https://github.com/ansible/pylibssh/actions/runs/13306998592/job/37160303882?pr=676#step:6:15 fails due to asterisks. Looks like that inputs hashing idea will probably have to make its way into this PR's scope. I'll think about it and maybe make a direct commit into your branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants