Repository navigation
ci(backend): Run backend test shards on ubuntu-26.04-arm - #129387
Draft
sentry-junior[bot] wants to merge 4 commits into
Draft
sentry-junior[bot] wants to merge 4 commits into
sentry-junior[bot] wants to merge 4 commits into
Conversation
sentry-junior
Bot
force-pushed
the
ci/backend-tests-arm
branch
from
October 30, 2026 22:49
0cb84c1 to
8be587f
Compare
This was referenced Oct 30, 2026
- backend test job runs on ubuntu-26.04-arm - odiff download picks the arm64 or x64 binary for the machine - resource monitor records Arm implementer/part ids, since Arm kernels don't report a CPU model name - uv.lock picks up the compiled linux aarch64 pydantic wheels now on the internal index (getsentry/pypi#2693) Co-Authored-By: Joshua Li <14209781+joshuarli@users.noreply.github.com>
- backend test and acceptance pick ubuntu-26.04-arm on pull_request events and ubuntu-26.04 (amd64) everywhere else, so master stays on amd64 - acceptance on Arm installs the Chromium snap behind google-chrome and chromedriver wrappers, since the Arm runner image has no Chrome Co-Authored-By: Joshua Li <14209781+joshuarli@users.noreply.github.com>
The snap store timed out (HTTP 408) on one shard. Co-Authored-By: Joshua Li <14209781+joshuarli@users.noreply.github.com>
sentry-junior
Bot
force-pushed
the
ci/add-xdist-worker-backend-tests
branch
from
October 30, 2026 23:04
83ebd20 to
06e6ecc
Compare
sentry-junior
Bot
force-pushed
the
ci/backend-tests-arm
branch
from
October 30, 2026 23:04
0d3bafe to
26f6011
Compare
This was referenced Oct 30, 2026
…failure Selenium's default 0.5s poll adds up to half a second to every unsatisfied wait, and acceptance tests wait many times each. Screenshots, page source and browser logs were captured for every phase of every test, but only a failing phase needs them. On Arm with 2 workers this cut summed acceptance test time by 7% (779s to 728s) and the median job from 286s to 275s, with no new reruns. Co-Authored-By: Joshua Li <14209781+joshuarli@users.noreply.github.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.
Stacked on #129338 (4 xdist workers, ubuntu-26.04). Land that first.
Runs
backend testandacceptanceonubuntu-26.04-armfor pull requests only. Master and every other event stay on amd64ubuntu-26.04.Headline: on pull requests, backend test time drops 27% (slowest shard −33%, median job −25%), and acceptance jobs get about 10% faster. Faster Selenium polling (below) takes another 7% off acceptance test time.
Rollout order
Land these in order. Each is stacked on the one before, so after one merges, retarget the next PR's base to
masterand rebase it. Each can be reverted on its own.ubuntu-26.04backend testandacceptancemove to x64ubuntu-26.04. Also adds the Kafka healthcheck shim, the assert-rewrite prewarm, Postgres with durability off, and the resource monitor.backend testandacceptancerun onubuntu-26.04-armfor pull requests only; master stays on amd64. Also includes the Chromium snap for Arm acceptance, the compiled Arm pydantic wheels inuv.lock, and inselenium.py0.1s wait polling plus debug capture only on failure.uv.lockchange only adds Arm wheels, which x64 installs ignore.Trigger: Override Selective Testing) are unchanged.test_organization_agent_token.py.Whole stack, on pull requests: backend test time is about −40% compared with master today, the slowest shard about −45% and the median job about −31%. Roughly a quarter of the gain comes from the 4th worker and most of the rest from Arm. Selective PR runs should land near a 3-minute slowest job.
Acceptance results (2 workers, 5 shards)
ubuntu-24.04x64, 9 runs, median)ubuntu-26.04x64)The Arm runner image has no Chrome, so acceptance installs the Chromium snap behind
google-chromeandchromedriverwrappers. The install takes about 66s, but it runs alongside the rest of setup, so it only delays the ~15s webpack step that waits on it.Acceptance: faster Selenium waits
src/sentry/testutils/pytest/selenium.py, from the experiment in #129404:Browser.wait_until*andwait_until_script_executionpoll every 0.1s instead of Selenium's default 0.5s.pytest_runtest_makereportcaptures the URL, screenshot, page source and browser logs only when a test phase fails. It used to do this for every phase of every test.This file is shared test code, so it applies on x64 and in getsentry's acceptance tests too. On #129404,
getsentry dispatchandgetsentry / backendpassed. Reusing one Chrome per worker (#129405, #129406) saved more but made the TOTP auth tests flaky, so it isn't included.Backend results (4 workers, full suite, 30 shards, run at the same time as an x64 baseline)
From the experiment in #129372 (run 41138038705, comparison):
The latest full-suite run on this PR (41142216945, rebased on master) matched: 4,620s summed, slowest shard 199s.
ubuntu-26.04on x64 was within noise of 24.04 on the same CPU types (ci(backend): experiment: backend test shards on ubuntu-26.04 #129378), so the speedup comes from the ARM hardware, not the OS image.Changes
.github/workflows/backend.ymlandacceptance.yml:runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-26.04-arm' || 'ubuntu-26.04' }}forbackend testandacceptance..github/workflows/backend.yml: the odiff download picks thearm64orx64binary based onuname -m. It was hard-coded to x64..github/workflows/acceptance.yml: on Arm, install the Chromium snap (retried up to 5 times; the snap store returned a transient HTTP 408 once) and pointgoogle-chrome/chromedriverat it..github/workflows/scripts/monitor-resources.py: ARM kernels don't report amodel name, so the monitor records the CPU implementer and part IDs instead. A test for this is intest_monitor_resources.py.src/sentry/testutils/pytest/selenium.py: 0.1s wait polling and failure-only debug capture (see above).uv.lock: adds the compiled linux aarch64 pydantic 1.10.26 wheels, now published on the internal index by build: Build a compiled pydantic 1.10.26 wheel for linux arm64 pypi#2693. Without them, ARM installs pure-Python pydantic andtest_pydantic_1x_compiledfails. The change only adds wheel entries, so x64 is unaffected.All images the backend tests use already have ARM builds. Only
image-mirror-google-cloud-sdkis x64-only, and these tests don't use it.Next in the stack: #129398 sizes selective backend shards for a ~3 minute slowest job on these runners.
Checks
test_monitor_resources.pypasses locally, andbackend.ymlparses as YAML.0aa275df.selenium.py: ruff check/format and mypy pass locally.via @joshuarli.
--
View Session [Sentry]