Repository navigation
ci(integration): shorten the longest integration jobs - #367
Draft
earakely-scale wants to merge 3 commits into
Draft
earakely-scale wants to merge 3 commits into
earakely-scale wants to merge 3 commits into
Conversation
Each of the five tests in test_register_env_triggers_local.py deployed its own items env and registry. They now share one per module, which a per-test fixture returns to a fresh deploy's state: /triggers/clear, /clock/clear and data/reset. local_stack_at lets a module hold the stack local_stack gives a single test. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… and run the gateway tests on three runners server_env_local_test.py and openenv/build_app_test.py deploy envs in nearly every test and took about 8.6 of the fast tier's 15.5 minutes, which made it the longest job. They are now int_test_slow, so the eight slow shards share them. The gateway tests, the longest job after that, run on three runners instead of two. The table weighs the moved files by their times in the fast tier on main, and the trigger tests by their time now, until a refresh from CI's reports. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… run From the JUnit reports of run 40642453175, which ran the moved files and the shared-env trigger tests in the slow shards and the gateway tests on three. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
After the slow tier went to eight runners, the longest integration jobs on
mainwere the fast tier,integration-local, at 15.9 minutes, and the two gateway shards at 12.8 and 11.9 minutes. The slow shards took 5.5–8.8 minutes. Most of that time goes to deploys rather than to the tests themselves.What
test_register_env_triggers_local.pyshare one deployed items env and its registry, made by a module fixture,suite.items_env, returns the env to the state a fresh deploy leaves it in:POST /triggers/clearremoves triggers, events, watch roles, executors and config.POST /clock/clearstops the clock.data/resetempties the items.local_parallel_deploy_test.pymoves into a context manager,local_stack_at, which a module can hold for all its tests.local_stackstill gives one test its own.env/envs/server_env_local_test.pyandopenenv/build_app_test.pydeploy envs in nearly every test. They ran first in the fast tier, on a cold image cache, and took about 8.6 of its minutes. They are nowint_test_slow, as the marker's definition says: real Docker builds and deploys. In the slow shards, where earlier modules have warmed the image cache, they take 72 and 79 seconds.integration-local-gateway (1/3)to(3/3). The required checks keep their names.slow_durations.jsonis refreshed from this branch's own run (40642453175), so the shards balance with the moved files and the new trigger times.Tests
CI on this branch, compared with
mainat f6ae9cc:mainintegration-local(fast tier)integration-local-gatewayshardsintegration-local-slowshardsThe longest integration job goes from 15.9 to 9.8 minutes.
unit(7.5 minutes) is unchanged.The trigger tests on their own, on a 4-vCPU Ubuntu 24.04 VM set up as the slow-tier job sets up its runner:
main, warm image cachelocal_parallel_deploy_test.pyin the same sessionNo test containers were left behind after any run.
ruff checkandtst/unit/test_shards.pypass.🤖 Generated with Claude Code