Skip to content

CI: enable python dependencies caching - #18835

Merged
Cadair merged 1 commit into
astropy:mainfrom
neutrinoceros:tst/enable-python-deps-caching
Nov 24, 2025
Merged

Cadair merged 1 commit into
astropy:mainfrom
neutrinoceros:tst/enable-python-deps-caching

Conversation

@neutrinoceros

@neutrinoceros neutrinoceros commented Nov 4, 2025 •

Copy link
Copy Markdown
Contributor

Description

context: https://pyfound.blogspot.com/2025/10/open-infrastructure-is-not-free-pypi.html
Caching is already supported by OpenAstronomy's reusable workflows, although I'm not 100% sure it'll work out of the box, because cache keys can only be supplied before the test matrix is even output, so it doesn't seem possible to set pet-job cache keys. Any way, let's give this a spin and see how it behaves in practice !

TODO:

  • stabilize the first impl (provided it's usable)
  • propagate to other places we use this workflow (except unstable CI, were caching may work against upgrades)
  • By checking this box, the PR author has requested that maintainers do NOT use the "Squash and Merge" button. Maintainers should respect this when possible; however, the final decision is at the discretion of the maintainer that merges the PR.

@neutrinoceros neutrinoceros added this to the v8.0.0 milestone Nov 4, 2025
@github-actions

github-actions Bot commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

@github-actions

github-actions Bot commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

Welcome to Astropy 👋 and congratulations on your first pull
request! 🎉

A project member will respond to you as soon as possible; in the
meantime, please have a look over the Checklist for Contributed
Code

and make sure you've addressed as many of the questions there as
possible.

If you feel that this pull request has not been responded to in a
timely manner, please send a message directly to the
development mailing
list
. If the issue is
urgent or sensitive in nature (e.g., a security vulnerability)
please send an e-mail directly to the private e-mail
[email protected].

@github-actions

github-actions Bot commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

👋 Thank you for your draft pull request! Do you know that you can use [ci skip] or [skip ci] in your commit messages to skip running continuous integration tests until you are ready?

@neutrinoceros

Copy link
Copy Markdown
Contributor Author

As I suspected, this doesn't seem to work: with jobs competing for a single cache key, only one of them is able to save a cache, which in turn will be essentially useless on re-runs since the bulk of resources (mostly bandwidth) we're trying to save are taken up by platform-specific binaries (extensions from numpy, scipy ...), so, I'm not sure that we can cache anything efficiently with the current interface from OpenAstronomy/github-actions-workflows

I'll report this upstream

@neutrinoceros

Copy link
Copy Markdown
Contributor Author

reported as OpenAstronomy/github-actions-workflows#324

@neutrinoceros neutrinoceros added the Upstream Action Required Was: Upstream Fix Required label Nov 4, 2025
@neutrinoceros
neutrinoceros force-pushed the tst/enable-python-deps-caching branch 2 times, most recently from 3bffcc2 to 56c2f9e Compare November 5, 2025 14:19
@neutrinoceros neutrinoceros removed the Upstream Action Required Was: Upstream Fix Required label Nov 5, 2025
@neutrinoceros
neutrinoceros force-pushed the tst/enable-python-deps-caching branch 2 times, most recently from de6d6e8 to b02a091 Compare November 5, 2025 15:21
@nstarman

Copy link
Copy Markdown
Member

@neutrinoceros
neutrinoceros force-pushed the tst/enable-python-deps-caching branch from b02a091 to e77ff5c Compare November 16, 2025 16:10
@neutrinoceros
neutrinoceros marked this pull request as ready for review November 16, 2025 16:10
@neutrinoceros

Copy link
Copy Markdown
Contributor Author

Indeed, and apparently I already did the work ! I just forgot to check the logs and undraft. I did now !

Comment thread .github/workflows/ci_workflows.yml Outdated
macos: py312-test-alldeps
posargs: --durations=50 --run-slow
runs-on: macos-latest
posargs: --durations=50

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This line overrides 102?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oh, this wasn't intentional. Thanks for ca(t)ching it !

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

(fixed)

@nstarman

Copy link
Copy Markdown
Member

I don't think the test failure caused by a failed file download is related, but with dependency caching it's hard to tell.

@neutrinoceros

Copy link
Copy Markdown
Contributor Author

Note that I'm intentionally not enabling cache for unstable CI, so we can trust the failure isn't related.

@neutrinoceros
neutrinoceros force-pushed the tst/enable-python-deps-caching branch from e77ff5c to 71c7cd0 Compare November 20, 2025 13:30

@nstarman nstarman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@pllim

pllim commented Nov 20, 2025

Copy link
Copy Markdown
Member

I want a couple of other devs to review as well and requested them. If you don't hear back in a week, feel free to ping me and then maybe we can just merge at that point. Thanks.

@Cadair

Cadair commented Nov 24, 2025

Copy link
Copy Markdown
Member

Let's merge this, it seems to be working. If it all goes to hell the revert button is not far away.

@Cadair
Cadair merged commit 5d0876b into astropy:main Nov 24, 2025
34 checks passed
@neutrinoceros
neutrinoceros deleted the tst/enable-python-deps-caching branch November 24, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants