I think something needs to be done to simplify the...
# nucleus
s
I think something needs to be done to simplify the CI testing. I've spent the week trying to get it under control and it feels a bit hopeless. the test suites take too long. the github mac runners are too unreliably available. I finally had a run that looked like it was going to succeed and the mac graalvm part timed out after 90 minutes. I think a pre-merge check taking more than 45 minutes is too much. I'd love to get it down to under 20 minutes for simple changes. Maybe we can try to split up the tests to only run when related stuff is changed? Ideally, on a change that doesn't touch Mac-specific code there would be no Mac runner involved. The last successful merge check I see was Sep 4. That means for the past month running any test at all has been completely useless. I'm going to try to come up with a plan tomorrow. If you have some strong opinions on what to do or how to do this, please let me know.
u
First of all, thank you very much for trying, and yes, I also agree that they need to be simplified. These tests helped me catch a dozen bugs. I simply thought about writing in the claude.md that the tests should be run locally when native backend tao code has been modified, since the majority of PRs are assisted by Claude, it will surely listen and greatly simplify the process, because yes, GitHub runners are not viable; they often crash, especially the macOS runners which are lacking.
s
I opened #819 that cuts the the pre-merge process a lot. There's a list of follow ups on that PR. Deleting the old cache entries should get future builds cached and should get the checks down to a reasonable timeframe. Then adding the branch protection could be feasible.
s
What I do on my MapLibre projects: • Draft PRs against main run a small CI matrix. Draft upstack runs none • "Ready" PRs run a representative CI matrix (every os) but not every architecture or platform version • Main runs the full matrix, to catch if some specific android version bug, or windows arm64 specific bug sneaks through without wasting time on PRs for that ◦ Dependabot PRs and any PR with "ci:full" label applied gets the same full matrix, usually applied to build tooling PRs • If one cell in the matrix fails, it's automatically rerun. This catches most rare flakes and infra failures • If I ever notice a flake, I ask an agent (usually Sol) to file an issue, root cause, and pr if confident the test is either stabilized or deletable • My agents also have standing instructions to file an issue whenever they notice a test flake • GitHub actions infra is flaky still, especially on windows and with older android emulators. So I've got some retries in key spots in my CI workflow With all that, I've got it to be quite a good experience. Not perfect, can't be perfect on GitHub actions, but I'm rarely bothered by transient failures now despite some extremely heavy / complex CI
Oh, I also use trunk.io to monitor for flaky tests and test runtime it's not the best, but it's free and it's good enough for my purposes. At some point I had ~hundreds of flaky tests, now I know I have exactly four in maplibre-compose and they flake very rarely
(I don't use their other features like merge queue, quarantining, ticketing, etc. just a dashboard of test quality)
s
I keep getting bit by the mac runner queue. Yeah, I think running the full suite post-merge and auto-opening an issue on a test failure would be a big improvement.
s
Yeah, even with all my mitigations, I do see the mac runner queue delay my PR sometimes. You could try gating the Mac jobs behind a label like ci:apple and in agent instructions just telling it to apply that label in specific scenarios, or just a deterministic gate for code that is specific to Apple platforms
fyi I replaced my draft/ready/full ci tiers with a decision model (Jev) looking at each pr/diff to decide which ci jobs should run, based on descriptions in a config in the repo. Will probably need some tuning but it works really well so far (day 2) example config: github.com/maplibre/maplibre-compose/pull/1864 source: github.com/sargunv/rubberstamp I made it a service that any public repo can use for free, haven't written docs or anything yet but it's at rubberstamp.sargunv.dev if you'd like to poke around. It also handles labeling issues/prs.
Also, on the topic of mac runners, I applied to Blacksmith's OSS program and they're now providing CI runners for my projects. Much better than github's runners.