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

Use setup-python for cache #7442

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

Dreamsorcerer
Copy link
Member

No description provided.

@Dreamsorcerer Dreamsorcerer added bot:chronographer:skip This PR does not need to include a change note backport-3.9 Trigger automatic backporting to the 3.9 release branch by Patchback robot labels Jul 27, 2023
@webknjaz
Copy link
Member

I remember avoiding this because of some quirks. But can't recall why exactly.. I'll try to look into this.

@Dreamsorcerer
Copy link
Member Author

OK, on other repos the cache wasn't working correctly with the old cache action, and setup-python worked first time (I think it's aiohttp-demos which takes about 10 mins extra without caching).

@webknjaz webknjaz added the backport-3.10 Trigger automatic backporting to the 3.10 release branch by Patchback robot label Jan 28, 2024
@webknjaz
Copy link
Member

@Dreamsorcerer

OK, on other repos the cache wasn't working correctly with the old cache action

One common mistake is making checkout prior to invoking cache. Check for that first.

I remember avoiding this because of some quirks. But can't recall why exactly.. I'll try to look into this.

I tried to recall what were the corner cases. And I found two:

  1. Skipping caching for release CI/CD invocations — this allows to catch weird cases that don't come up in PRs because they use older versions of packages, for example: https://github.com/cherrypy/cheroot/blob/0fd16f0/.github/workflows/ci-cd.yml#L246-L247
  2. Skipping caching for unstable/nightly/dev Python jobs, especially in the period when CPython transitions between alpha/beta/rc. This is because older package versions may be picked up by pip earlier and the, they'd break when GitHub updates their CPython alpha build but the cached packages aren't updated. Example: https://github.com/cherrypy/cheroot/blob/0fd16f0/.github/workflows/ci-cd.yml#L717-L775.

@webknjaz
Copy link
Member

FTR, the caching works as it is configured today: https://github.com/aio-libs/aiohttp/actions/runs/7688751163/job/20950541567#step:5:25.

It doesn't implement those stable ABI-conditional hacks, though. Would be nice to have them here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-3.9 Trigger automatic backporting to the 3.9 release branch by Patchback robot backport-3.10 Trigger automatic backporting to the 3.10 release branch by Patchback robot bot:chronographer:skip This PR does not need to include a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants