Seems like a lot of the last PRs have been mysteriously cancelled and that new ones aren't being built: https://travis-ci.org/conda-forge/staged-recipes/pull_requests
All OSX builds are currently stopped.
relevent https://www.traviscistatus.com/
So, my proposal on best practices on staged-recipes for situations like this. @conda-forge/staged-recipes, do you agree?
noarch packages can definitely be merged normally.noarch packages (because of a version constraint or whatever):skip: true # [osx], and send a PR to the feedstock enabling Mac builds. Merge that once Travis is working again.(i) is not ideal, especially when Travis is bad for a long time (as it's been this week). (ii) and (iii) have essentially the same end-user behavior (Mac builds aren't available until they're working). (iii) is more likely to work faster once Travis is up again and reduces the load on Travis (because there'll only be one build, instead of a PR plus one when it's merged), but also has added risk that a broken Mac build will be published (if it for some reason passes the tests but we would have noticed from the logs that it's broken). I'd probably go with (iii), but maybe people prefer (ii), or maybe there's some other option?
The Travis-CI OSX situation is worsening over time and may eventually become unavailable entirely. Travis-CI is aware of the situation but they simply lack the budget to resolve it. It is therefore unreasonable to delay any PR because the OSX build has not finished.
First, I suggest that OSX builds be disabled entirely in staged-recipes because there is no reason to build them if the OSX result won't make a difference. Second, I suggest modifying the bot to automatically submit an OSX PR once the recipe has been added. It's not a pretty solution but it is simply acknowledging reality.
Note that the linter and re-renderer should also be modified to skip OSX by default in staged-recipes.
@xoviat I think there are a few Mac-only packages where that wouldn't work, but that's not a terrible idea. I don't entirely understand how the Travis queue works, but it also might speed up feedstock builds substantially to eliminate a lot of usually-irrelevant staged-recipes builds.
@xoviat what do you mean that the linter should also skip OSX? The linter doesn't run on Travis' infrastructure and doesn't have any dedicated OSX linting (to the best of my knowledge).
When someone submits a PR to staged-recipes that includes Windows or Linux, the linter should include the following message:
"Please add skip: true # [osx] to the recipe."
Sorry not following your suggestions to always skip macOS, @xoviat. If it amounts to skip all macOS builds entirely, that will be a -1 from me. Though I suspect you are referring to something else that I'm still not picking up on.
I think @xoviat's suggestion is:
staged-recipes. Always merge (non-noarch) packages with skip: true #[osx] in them.skip statement and re-rendering.What I mean is that submissions to this repository should skip OSX by default. Once the "-feedstock" repository is created, the bot should submit a PR to enable OSX (simply removing the skip line).
Have you considered testing OSX on circle CI? They seem to offer it as an option and I think it's worth considering.
CircleCI's free Mac builds for open source projects only give 500 minutes of build per month: https://circleci.com/pricing/#build-os-x. Though they do say "If you are building a bigger open-source project and need more resources, let us know how we can help you!" – so maybe someone should get in touch with them and see if there are options.
It's true it is a pay for service though I think I agree we might need to figure out some funding (joining NumFOCUS will make it easier to collect donations) and pay for macOS support. The other option is MacStadium, which is what Travis CI uses. Though we might have to do more legwork to configure that to build. Unfortunately Travis CI doesn't provide a similar option. Though maybe we should ask them again. I'm sure they would like the revenue.
Generally core has also been interested in having some sort of "conda-forge@home" type solution where users give us build time on their machines. There are some challenges to that approach. Some of which are addressed by conda-concourse-ci. The rest is automatic configuration, which normally is tricky with anything, but definitely worth the effort for those that have time and interest.
Also we have had discussions about culling builds on CIs at staged-recipes (based on the content of skip in the recipe). Some discussion within issue ( https://github.com/conda-forge/conda-forge-webservices/issues/79 ). It might be time to resurrect this as there are many noarch builds at staged-recipes yet no way to restrict just to CircleCI yet.
If we went with the always skip osx in staged why do we need to explicitly skip OSX. Can't we just eliminate travis from staged all together? Then when the feedstock renders we can have it build OSX as normal (or send it a signal if need be).
I don't think it is a good idea to disable Travis CI on staged-recipes outright.
@CJ-Wright That's probably a simpler option.
Note that a major problem with the Travis-CI and CircleCI offering is that they run untrusted code on a VM. Performance can be significantly improved if you're willing to relax the trust requirements (meaning that a malicious feedstock can affect another feedstock, but that's not really a concern here).
@CJ-Wright The skip would be so that the new feedstock doesn't automatically try to build a completely-untested Mac build. I guess that's my option (ii) vs (iii) above, but I'd be worried about having that be a global default.
@jakirkham I am pretty sure that it's not possible to do a conda-forge@home that can guarantee that a rogue client can't inject malicious binary code. That's just not possible unless you have complete control of the build machine. (Relatedly, I hope Travis and friends have well-funded security teams! The are probably the targets of sophisticated government-backed attacks.)
Reproducible builds could help with possible conda-forge@home concerns, though it's definitely beyond our scope to require all packages we build to be reproducible. :)
There are already plenty of potential security flaws in the current conda-forge setup, though.
For clarity, what I mean is that if you were to purchase a dedicated OSX instance on MacStadium, you could simply reuse the same OS image to build the recipes, which would remove the startup time completely. You also would not need to patch the recent processor vulnerabilities.
We can also customize the image. For instance, see all the time we waste cleaning up Homebrew and installing Miniconda on Travis CI (something like 2m30s). Should add that if you enable caching on Travis CI it ends up taking a whopping 7-8mins (suffered this recently) just to get to the point where you run your own code.
Would encourage everyone to take a look at issue ( https://github.com/conda-forge/conda-forge.github.io/issues/306 ). Many similar points have come up before.
Forgot that Travis CI did offer us more concurrency though it might not matter if the queue is still very backlogged. MacStadium is a much better deal.
Note that the MacStadium plan you listed there is the highest-end option: the cheapest plan is $50/month, for one i5 Mac Mini. There's more infrastructure someone needs to code up and less parallelism, but that's already ~43,000 build minutes per month, compared to CircleCI's $449/month plan that gives you 25,000.
Getting away from the macOS-specific problems, as I recall, the staged-recipes housekeeping activities (creating repos for approved feedstocks, etc.) also run on Travis, which seems to have the biggest reliability problems. Would it be possible and/or helpful to transition those to Circle CI instead?
Indeed. I think the comment mentioned it as well. There are definitely a variety of options. Essentially we are paying for the CI build infrastructure and image updates with the other CIs. Though I think we want to ultimately control the latter if we want to make any statements about compatibility. One definitely saves a lot of money if they are willing to do some upkeep for this stuff. We are definitely in a better place now to take this on than when we initially discussed moving off CIs.
Would it be possible and/or helpful to transition those to Circle CI instead?
Right. Raised issue ( https://github.com/conda-forge/staged-recipes/issues/916 ) on this topic some time ago. As noted in the final comment, we have managed to get these builds to run on Travis CI's sudo-free Linux images, which Travis CI started running on a separate queue from the macOS builds. So I don't think this matters any more. That said, if you are seeing issues, would be good to know. Can always reopen that issue.
Would it be possible and/or helpful to transition those to Circle CI instead?
As @jakirkham said, container-based Travis-CI reliability is not a problem. The problem is only with the OSX builds.
Back to your original questions @dougalsutherland, my recommendation would be some form of ii. Feel free to present the option of adding skip: true # [osx] to recipes for users eager to get things in. Would not require users to add skip: true # [osx] as it should be their choice. However I expect much like noarch: python, people will be very excited to speed up getting their recipes in and packages out there. So encouragement is likely unnecessary. Have already seen some users do exactly this without suggestion.
Would add that with noarch packages, feel free to cancel non-CircleCI builds (including AppVeyor). Ultimately we want a webservice to do this for us, but in the interim that is an ok thing to do. Resources are limited. So they certainly shouldn't be wasted. Also feel free to merge noarch packages that have CircleCI, linter, and reviewer comments addressed.
With all the gray areas, ultimately I trust your judgement. Though certainly feel free to ask if unsure.
So, to summarize, and please correct me if I'm wrong somewhere:
noarch packages / those that skip that platformnoarch is:noarch: python packages that depend on e.g. python >=3; this apparently doesn't work with conda-build 2 (https://github.com/conda-forge/conda-forge.github.io/issues/486#issuecomment-345301145)noarch this could drastically reduce our Travis load from staged-recipesconda-concourse-ci, but with more work to be done)Are there any Mac Travis builds running anywhere in the conda-forge organization right now, or is everything triggered in the past 5-6 days completely stuck? At https://www.traviscistatus.com/incidents/p1g70p3qrq4z they say
Please restart any builds that are currently "hanging". We will cancel any remaining stalled jobs later today.
Note: I may be wrong, but Travis-CI appears to have disabled conda-forge OSX builds entirely to reduce load on their system. Have any OSX packages been uploaded to anaconda.com within the last week?
A quick look says no, which means that we might as well drop the pretense that conda-forge supports OSX at all, because it no longer does.
@xoviat I think this went in https://travis-ci.org/conda-forge/cmd2-feedstock
From what I guess, every time 2 jobs (not 2 builds) are run in conda-forge, we go to the back of the queue which is around 3000 jobs at the moment. So, we have to wait until 3000 of those jobs to build before we get 2 more jobs.
Does anyone affiliated with conda-forge have access to Travis CI's slack channel? I used to be on there but was removed without any warning or having done anything recent other than lurk. If not, someone can contact their support channel and ask why throughput seems so low. Having this repo and all feedstocks in the same organization makes the problem much worse, and recovery times much longer after any issues on Travis' side.
Throughput is lower because the patches to address recently-discovered processor vulnerabilities disabled speculatively executing certain kernel calls, which reduced build performance.
Having this repo and all feedstocks in the same organization makes the problem much worse, and recovery times much longer after any issues on Travis' side.
Travis-CI considers this to be a feature: there are only so many OSX machines to go around, and if they can throttle the OSX builds from any particular organization, their queue is reduced.
So I think the original question was answered and the plan laid out. Going to close this out.
Also further discussion about acquiring macOS workers should be directed to issue ( https://github.com/conda-forge/conda-forge.github.io/issues/306 ), which is actively being discussed. Your feedback and help gathering information about options and current usage would be very useful. Thanks all.
Most helpful comment
So, my proposal on best practices on
staged-recipesfor situations like this. @conda-forge/staged-recipes, do you agree?noarchpackages can definitely be merged normally.noarchpackages (because of a version constraint or whatever):skip: true # [osx], and send a PR to the feedstock enabling Mac builds. Merge that once Travis is working again.(i) is not ideal, especially when Travis is bad for a long time (as it's been this week). (ii) and (iii) have essentially the same end-user behavior (Mac builds aren't available until they're working). (iii) is more likely to work faster once Travis is up again and reduces the load on Travis (because there'll only be one build, instead of a PR plus one when it's merged), but also has added risk that a broken Mac build will be published (if it for some reason passes the tests but we would have noticed from the logs that it's broken). I'd probably go with (iii), but maybe people prefer (ii), or maybe there's some other option?