Skip to content

fix(docker-compose): Download v5.6.0 from GitHub with a stall timeout - #332

Merged
joshuarli merged 2 commits into
mainfrom
fix/docker-compose-github-download
Oct 14, 2026
Merged

joshuarli merged 2 commits into
mainfrom
fix/docker-compose-github-download

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Sentry CI shards hung on the docker-compose download: urlretrieve has no timeout, so a stalled connection to the GCS mirror spun until the caller's timeout 10m killed devservices up (e.g. sentry run 38623855049, monolith-dbs test, exit 124). Another getsentry shard sat ~7m on the same download before the retry got through.

Changes

  • Bump docker compose from 2.29.7 to 5.6.0 (latest) and download it from docker/compose GitHub releases. The storage.googleapis.com/sentry-dev-infra-assets mirror is no longer used.
  • install_binary now downloads with urlopen(..., timeout=DOWNLOAD_TIMEOUT) (15s for connect and for each read, not the whole download) plus 3 attempts with 1s/2s backoff. A stalled download now fails in ~48s worst case instead of hanging. The retry warning includes the error.
  • The remote-dependency zipball download gets the same timeout, since its existing retries could never fire on a stall.

Compose v5 note: v5 skips 3/4 to avoid confusion with the old file-format versions. Its main breaking change is dropping the internal builder in favor of Bake, and devservices doesn't build images. Everyone will pick up the v5.6.0 download on their next devservices run, because the version check is an exact match.

Tested

  • pytest (394 passed), ruff, mypy.
  • Real install from GitHub: v5.6.0 downloaded and verified in ~0.6s.
  • Stall test against a local server that sends headers and then hangs: 3 attempts, each timing out at 15s, then BinaryInstallError after 48.1s.
  • Sentry devservices up --mode backend-ci with compose v5.6.0 on Docker 25.0.16: all services healthy in 33s, and status, logs and down all work.

sentry and getsentry will need their devservices pin bumped after a release.

via @joshuarli.

--

View Junior Session [Sentry]

Install docker compose v5.6.0 (latest) from docker/compose GitHub releases
instead of the GCS mirror, which was pinned to v2.29.7.

urlretrieve has no timeout, so a stalled download hung until the caller's
timeout (10m in sentry CI). Downloads now use urlopen with a 15s
connect/read timeout and 3 attempts with backoff, so a stalled download
fails in ~48s worst case. The dependency zipball download gets the same
timeout.

Co-Authored-By: Joshua Li <14209781+joshuarli@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit d5e3f93. Configure here.

Comment thread tests/utils/test_docker_compose.py Resolved
…cess test

The test still reported 2.29.7, so after the bump it no longer matched the
pinned version and fell through to a real install_docker_compose download.
Use MINIMUM_DOCKER_COMPOSE_VERSION and mock the installer so the test can
never download.
@joshuarli
joshuarli merged commit b57c6e1 into main Oct 14, 2026
18 checks passed
@joshuarli
joshuarli deleted the fix/docker-compose-github-download branch October 14, 2026 20:19
joshuarli added a commit that referenced this pull request Oct 14, 2026
The version check required an exact match, so after the bump to v5.6.0
every developer with a different Compose (including Docker Desktop's
bundled one) would have it replaced on their next devservices run.

Treat MINIMUM_DOCKER_COMPOSE_VERSION as a real minimum (v2.29.7, the
version devservices pinned until #332) and only install
DOCKER_COMPOSE_INSTALL_VERSION (v5.6.0) when Compose is missing,
unparseable or older than the minimum.

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Joshua Li <14209781+joshuarli@users.noreply.github.com>
joshuarli added a commit to getsentry/sentry that referenced this pull request Oct 14, 2026
Bumps `devservices` from 1.5.1 to 1.5.4 (`pyproject.toml` floor +
`uv.lock`).

### What it brings in (devservices 1.5.1..1.5.4)
- [devservices#332](getsentry/devservices#332):
docker-compose is downloaded from docker/compose GitHub releases instead
of the `storage.googleapis.com` mirror, with a 15s stall timeout and 3
attempts. A stalled download now fails in ~48s instead of burning the
full 10m `devservices up` timeout (seen in [run
38623855049](https://github.com/getsentry/sentry/actions/runs/38623855049)).
- [devservices#333](getsentry/devservices#333):
any installed Compose >= 2.29.7 is accepted rather than forcing an exact
version. The `ubuntu-24.04` runner ships Compose 2.38.2, so CI should
skip the Compose download entirely.
- #330: retries transient GitHub errors when downloading remote
dependencies.
- #329: resolves compose services concurrently.
- #328: disables auto-enabled Sentry SDK integrations in devservices.

### Notes
- The CI early-devservices path reads this version from `uv.lock`, so it
picks up 1.5.4 automatically.
- getsentry needs no separate PR: `bin/bump_sentry.py` copies this
`uv.lock` into getsentry's `sentry-uv-lock` on the next sentry bump.
- The `uv.lock` diff is only the devservices entry; the lock `revision`
is left at 3.

<!-- junior-request-attribution:start -->
via @joshuarli.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC8V02RHC7%3A1791911755.006269 -->

--

[View Junior
Session](https://junior-prod.sentry.dev/conversations/slack%3AC8V02RHC7%3A1791911755.006269)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC8V02RHC7%3A1791911755.006269/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Joshua Li <14209781+joshuarli@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant