Skip to content

Re-opening the discussion about retention policy #171

Closed

Description

@betatim

(This is related to #119 but that issue is closed and quite old so I thought I'd make a new one)

scikit-learn recently ran into the problem that we didn't upload a nightly wheel for >30 days. As a result there were no wheels in the nightly channel which meant the testing with nightly wheels for a different package broke.

I thought/understood the policy in the README as "we will keep the last five wheels no matter what, everything else >30 days gets deleted".

While I agree that a wheel >30days old is no longer a "nightly" really, it also seems annoying to break the CI of a package that uses the wheels for no other reason than that we didn't manage to fix our nightly wheel producer job in a timely fashion. The problem in this case was not not noticing, just not being fast enough.

I'd propose we keep the last five wheels no matter what.

Do we want to re-open the discussion?

Activity

  1. Carreau commented on Jul 22, 2026

    @Carreau
    Member

    if prefer a signal that something is broken (no more wheels) than silently not testing nightly.

    To disagree with myself (because of course) it is hard to know which project are supposed be available once the last wheel is removed.

    Maybe we can strike a mid-ground; if 30 days is reached; open an issue and give a grace period of 30days after which the issue is closed and last wheel deleted ?

  2. bsipocz commented on Jul 22, 2026

    @bsipocz
    Member

    I like the middle ground suggestion better as I vaguely recall a situation in the past with terribly outdated nightlies (that were older than the latest release), something us downsteam users didn't notice and just assumed we had a passing dev testing build. And not having a strictly time-based cleanup mechanism, in theory, we could end up in the same situation here.

  3. bsipocz commented on Jul 22, 2026

    @bsipocz
    Member

    OTOH, I think there is value in breaking downstream in the situation above, as they are indeed not testing the latest dev version. It's not their fault, but still, they don't have a passing build and should expect possible problems when a new nightly is out -- a heads up is thus great.

    The situation in #119 is different in the sense that in smaller packages there may be legit 30day gaps without commits, so the old nightly could be still the most up-to-date.

  4. matthewfeickert commented on Jul 22, 2026

    @matthewfeickert
    Member

    I haven't fully caught up on the conversation (sorry), but just jumping in to ask what's the problem with having projects just upload on a regular cadence even if they don't have new changes? Does

    scikit-learn recently ran into the problem that we didn't upload a nightly wheel for >30 days. As a result there were no wheels in the nightly channel which meant the testing with nightly wheels for a different package broke.

    mean that there were no commits to scikit-learn for over a month? Even so, can't there just be a scheduled CI job to rebuild and reupload on a fortnightly basis regardless? Even if you're just replacing the exact same wheels that isn't a problem in this case.

  5. Carreau commented on Jul 22, 2026

    @Carreau
    Member

    Cron autostop if no commits after 90 days. But again i think we are reaching edge cases there. if something has not moved in 90days there should (likely) be a stable release.

  6. lesteve commented on Jul 23, 2026

    @lesteve

    mean that there were no commits to scikit-learn for over a month?

    scikit-learn wheels CI was broken for a month (in part because we did not realize that this was the case) 1. This feels kind of bad and shouldn't have happened but this is what happened 😅. I don't think this is likely to happen again in scikit-learn though. I am trying to think of ways to improve the visibility of a consistently failing CI in scikit-learn.

    While I am at it, I am curious if some of you have heard of projects that have some kind of a CI dashboard. A bit like https://www.githubstatus.com/ but for the project CI where you see the status of last week CI (doc, push to main, scheduled workflows like wheels, etc ...). Probably vibe-codable but if humans already come up with a good solution, I'd rather go with the latter. We mostly use GHA except CircleCI for doc.

    Footnotes

    1. to be explicit we don't upload wheels on push to main but in a separate daily workflow ↩

  7. larsoner commented on Jul 23, 2026

    @larsoner
    Contributor

    I don't think this is likely to happen again in scikit-learn though

    I looked and I would agree about scikit-learn! Looking more broadly based on my personal experience, I've opened for different packages over the last few years:

    • scikit-learn: just one issue
    • PyTables: just one recently
    • statsmodels: about one per year-ish for a while there, but none recently (maybe there is something to learn about how they fixed this problem)
    • PyArrow: just one

    But this is just me and what MNE-Python touches (basically: the above plus SciPy, NumPy, Pandas, dipy, matplotlib, and h5py) and reported before anyone else noticed and got it fixed. So it is a diffuse problem, not limited to scikit-learn.

    It makes me think that @Carreau was onto something with #171 (comment) -- basically push back to 60 day retention (almost all were fixed within 30 days of my issue opening), add a scheduled action in this repo that looks at the wheels, and any package for which the newest wheel is >= 30 days old gets an issue posted to their tracker. It adds a tiny bit of maintenance at our end (a well-crafted and maintained scheduled GHA run; ensuring all projects properly set project metadata for where to post issues or we add an override, etc.), and increases issue popups for the repos who are 30 days old... but I'm already doing that (and I assume not the only one!) and so far it has gotten quick responses and fixes.

    I use a mne[bot] GitHub user + token for MNE-Python things, happy to create a scientific-python[bot] user (or just reuse the mne[bot]) that could open these issues if it makes sense.

    While I am at it, I am curious if some of you have heard of projects that have some kind of a CI dashboard.

    No idea of existing implementations. In principle we could have the scheduled run build a little table of the dates/ages and add it to the GitHub action job summary. Not super visible but maybe it could be posted somewhere. At the very least it could auto-update a single issue with the current status (age, version, ... ?) of all wheels in the repo.

  8. Carreau commented on Jul 23, 2026

    @Carreau
    Member

    Is that ok if I submit a PR made by claude ? Not sure about the AI contribution guideline.

    It would transform the current action into a composite action ? This allows to set report_failures: true, if the workflow is given permissions: issues: write; and a workflow on this repo that checks regularly if any packages have not uploaded for 30 anf 60 days.

  9. betatim commented on Jul 23, 2026

    @betatim
    ContributorAuthor

    Reading the comments here and pondering things, maybe having a short section in the docs of this repo that explains how/why you might want to upload a wheel even when nothing in your repository has changed is a good idea for low traffic repos. Then we can point people at that when they get added. Helps with each "low traffic" repo having to rediscover this problem.

    For repos like scikit-learn where the problem was not "no commits happened" but "infra was broken" I'm not sure what to do. Extending the period to 60 days will help and hopefully make this even more rare. Maybe having an issue posted by a bot from this repo would have added more urgency to getting things fixed. The question is should the bot wait 30 days or should it post after 15 (say) because if you were regularly uploading then even 15 days signals "something significant has changed/broken". In this particular case I think the problem was that some tests failed and that we only upload the nightly if the tests pass. Maybe changing it to an unconditional upload is a good idea for nightlies)?

  10. Carreau commented on Jul 23, 2026

    @Carreau
    Member

    i have no objections to 15day; and unconditional upload; we can also test if there is a large time difference between last commit and last upload.

  11. bsipocz commented on Jul 23, 2026

    @bsipocz
    Member

    The question is should the bot wait 30 days or should it post after 15 (say) because if you were regularly uploading then even 15 days signals "something significant has changed/broken".

    This sounds good, but OTOH, I wished having good out-of-the-box reporting mechanisms for failing cron jobs in the original repos themselves. I suppose noticing it in scikit-learn via an issue could have, at least partially, helped with discovering that there is a problem and the cadence of that would have been better tied into the cadence of the actual nightly generation rather than being an overly generalized timeframe here.

    (that being said, we should probably also do it here -- I would say opening a new issue would make me notice it much better than just having a dashboard or tracking issues, I would not have checked those out regularly to notice this problem with scikit-learn. )

  12. matthewfeickert commented on Jul 23, 2026

    @matthewfeickert
    Member

    (Sorry, slow responses on a busy week.)

    having a short section in the docs of this repo that explains how/why you might want to upload a wheel even when nothing in your repository has changed is a good idea for low traffic repos. Then we can point people at that when they get added. Helps with each "low traffic" repo having to rediscover this problem.

    I am 👍 on this @betatim.

    The question is should the bot wait 30 days or should it post after 15 (say) because if you were regularly uploading then even 15 days signals "something significant has changed/broken".

    Better sooner than later sounds good to me, so 15 days sounds fine.

    In this particular case I think the problem was that some tests failed and that we only upload the nightly if the tests pass. Maybe changing it to an unconditional upload is a good idea for nightlies?

    Were the tests that were failing big breaking things? Or small minutia? I think in most situations my stance would be that the goal of the nightlies is "test at HEAD and if library X is breaks the tests then everyone can determine if this is a bug or new behavior that they will need to discuss and/or get ready for".

    add a scheduled action in this repo that looks at the wheels, and any package for which the newest wheel is >= 30 days old gets an issue posted to their tracker.

    ...

    This allows to set report_failures: true, if the workflow is given permissions: issues: write; and a workflow on this repo that checks regularly if any packages have not uploaded for 30 anf 60 days.

    @larsoner @Carreau the idea here is to have the action run in https://github.com/scientific-python/upload-nightly-action/ but post to the "offending" package upstream source, correct? If so, I think this SGTM.

    that being said, we should probably also do it here

    @bsipocz as in post to the package source repository and then seperatley raise an issue here for us?

  13. bsipocz commented on Jul 23, 2026

    @bsipocz
    Member

    I may have misunderstood the suggestions above, but I wasn't thinking about opening issues upstream but here, but no strong opinions, if upstream finds it more useful to get reports there, then I suppose we could do that, too.

  14. larsoner commented on Jul 23, 2026

    @larsoner
    Contributor

    My thinking is that the action should run from here but open an issue in the tracker for the offending package itself, yeah! I don't think it would be much work to do it this way (famous last words) and helps let the right people know. I think reports here would be too easy to miss, and would basically require manual intervention again (someone here noticing, then pinging the package people or opening an issue in their tracker anyway).

  15. matthewfeickert commented on Jul 24, 2026

    @matthewfeickert
    Member

    I think reports here would be too easy to miss, and would basically require manual intervention again (someone here noticing, then pinging the package people or opening an issue in their tracker anyway).

    I'm in agreement with this. 👍 This would be something that scientific-python[bot] would do?

  16. larsoner commented on Jul 24, 2026

    @larsoner
    Contributor

    Yeah that's what I'm thinking, the bot would open an issue

  17. Carreau commented on Jul 24, 2026

    @Carreau
    Member

    the idea is to have the upload action open an issue on the repo in which it is deployed immediately on failure and close it on next successful upload.

    And for the action in this repo to open an issue on this repo after 15/30/60 days;

    No cross-repo authorisation to post issues (at first) as this would lead to maintaing infra

  18. larsoner commented on Jul 24, 2026

    @larsoner
    Contributor

    open an issue on the repo in which it is deployed

    You by where it's deployed, you mean this repo? That isn't the idea I had in mind, which got a couple thumbs up above.

    No cross-repo authorisation to post issues (at first) as this would lead to maintaing infra

    I thought it would just be a PAT in here as a GitHub actions secret, which doesn't sound like too much to maintain. Do I miss something?

  19. Carreau commented on Jul 24, 2026

    @Carreau
    Member

    i think the issue with your approach is that this would open an issue as the person who provides the PAT;

    and both approach are fine; if you have a bot account that does have a PAT you want to share it's fine;

    But if each repo does not already respond to their own automatically opened issues that the upload failed; then i'm not sure there is a point in opening one saying it has not been uploaded in X days.

    But i'm ok with both approaches, something is better than nothing in this case.

  20. larsoner commented on Jul 24, 2026

    @larsoner
    Contributor

    and both approach are fine; if you have a bot account that does have a PAT you want to share it's fine;

    If we don't mind the notifications coming from mne[bot] then it's super low effort for me. Maybe we start there and I create a scientific-python[bot] if people are too confused 😄

    But if each repo does not already respond to their own automatically opened issues that the upload failed; then i'm not sure there is a point in opening one saying it has not been uploaded in X days.

    Thinking about the sklearn issue, this is essentially what happened, though. They already had an issue open that told them that their wheel build broke, then I opened another issue saying that the wheel disappeared, and that brought additional attention to the urgency of the matter. I think making this behavior automatic and not opt-in is actually better -- it's something each library can and I think should reasonably accept by uploading wheels, and gives it more likelihood of succeeding in getting wheels fixed before they disappear. And if someone hates it, we can add an opt-out mechanism (hopefully YAGNI!).

    Would you be up for seeing if your PR could be reframed this way (like my proposal above), with a yet-to-be-added ISSUE_OPENER_TOKEN (or whatever) GH secret ? Also, given the repo expertise (scientific-python after all!), I'd rather have this done with a ~100-200-line Python script than 1,700 lines of JavaScript -- it'll be a tiny bit slower, but only runs once a day and will be more maintainable (and reviewable) by humans

  21. Carreau commented on Jul 25, 2026

    @Carreau
    Member

    Sure, we'll need to maintain a package-name/repo mapping, and have an extra check/action to post an issue here if the PAT is expired or anything else fail to post issues cross-repositories.

    PR updated.

  22. larsoner commented on Jul 25, 2026

    @larsoner
    Contributor

    we'll need to maintain a package-name/repo mapping

    I was planning to pull this from the wheel metadata. I assume (hope) that all packages here set the appropriate field for source code or bug reports, either of which should point to GH. Then we'd only need to maintain a ledger of those that don't (and hopefully make that shrink by fixing metadata upstream)

  23. larsoner commented on Jul 25, 2026

    @larsoner
    Contributor

    @Carreau your PR is still opt-in, looks like it's still coded to be run by each uploading repo rather than on a schedule by this repo, doesn't contain a ledger, etc. So it doesn't seem like it's going in the direction I suggested yet?

  24. Carreau commented on Jul 25, 2026

    @Carreau
    Member

    I can close and work on it later I'm travelling

  25. betatim commented on Jul 27, 2026

    @betatim
    ContributorAuthor

    In scikit-learn we knew that there was a problem that needed fixing. There is a bot that reports failures as an issue. Why no one spent enough time on resolving it is probably more a social problem than a technological one. As such the solution to it is social one IMHO. Should you upload wheels or not when (some amount of) testing fails is a long and often had discussion - I don't know if I want to re-open that discussion in scikit-learn, I assume that there is some reasoning behind the current choice (I might even risk contradicting my historical self ... ;-) )

    For me it is fine to leave things as they are in terms of deletion. Having a reminder via an issue that says "we noticed you used to regularly upload but haven't in a while. Everything Ok?" seems useful to raise awareness.

  26. larsoner commented on Aug 12, 2026

    @larsoner
    Contributor

    @Carreau want me to take a shot at a PR?

  27. Carreau commented on Aug 13, 2026

    @Carreau
    Member

    Yes; go ahead i'm unlikely to look at that before september

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions