Skip to content

chore: pin Compose images to those of the chart - #440

Merged
uniqueg merged 3 commits into
devfrom
chore/435-compose-pins
Nov 6, 2026
Merged

uniqueg merged 3 commits into
devfrom
chore/435-compose-pins

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Summary

Docker Compose floated on rabbitmq:4.1 and mongo:7.0 while the Helm chart pins rabbitmq:4.3.7 and mongo:7.0.45, and Dependabot covered neither file.

  • docker-compose.yaml now uses exactly the chart's image references (docker.io/library/mongo:7.0.45, docker.io/library/rabbitmq:4.3.7, docker.io/mher/flower:2.0.1); the chart pins patch tags without digests, so Compose does too. Existing comments (MongoDB 8 / kernels) are kept; the header explains the pin.
  • RabbitMQ 4.3 denies transient non-exclusive queues by default, which Celery declares (rpc:// result backend, remote control); the first CI run's smoke test failed on it (Queue.declare: (541) INTERNAL_ERROR - Feature transient_nonexcl_queues is deprecated, worker unhealthy). Compose now mounts the same setting as FOCA's library chart mounts for the chart's broker (deprecated_features.permit.transient_nonexcl_queues = true in /etc/rabbitmq/conf.d/90-foca.conf), via an inline Compose configs entry (needs Docker Compose 2.23 or later).
  • tests/test_repository.py::test_compose_images_of_chart asserts that the Compose images equal mongodb.image, broker.image and flower.image of deployment/values.yaml (it runs without Helm, unlike tests/test_chart.py), so the two can't drift.
  • .github/dependabot.yml: new docker-compose (/) and helm (/deployment) entries in one multi-ecosystem group service-images (monthly, target-branch: dev on the group), so a bump changes both files in one PR and the drift test passes. The helm entry ignores foca-common, the library chart that is bumped by hand with Chart.lock and charts.sha256.
  • Docs: docs/development.md (Helm chart section: the pins, the check, the Dependabot group; foca-common ignored) and docs/upgrading.md (To version 0.6.0: Compose's RabbitMQ 4.1 to 4.3.7, MongoDB 7.0.45, what to do if RabbitMQ doesn't start on old data).

Closes #435

Dependabot sources

Verification

  • pytest tests/test_repository.py: 6 passed; the new test fails against the old docker-compose.yaml ({'rabbitmq': 'rabbitmq:4.1'} != {'rabbitmq': 'docker.io/library/rabbitmq:4.3.7'}).
  • ruff check . / ruff format --check . (0.17.3, as in pre-commit): passed; mypy: no issues in 77 files.
  • Full suite with Helm 3.22.1 and helm dependency build deployment (charts.sha256 OK): 1614 passed, 11 skipped
  • Dependabot config validated with jsonschema against https://json.schemastore.org/dependabot-2.0.json: 0 errors.
  • The pre-commit run itself couldn't fetch hook repos in the sandbox; ruff and mypy ran directly, semgrep/ast-grep via the push hook.
  • docker compose config --quiet (2.39.1): valid. Docker isn't reachable from my sandbox, so the stack ran only in CI.
  • CI on 69b89cc: all checks passed (CI passed, including the smoke test with RabbitMQ 4.3.7; the run on 3214119 failed in the smoke test, fixed by 69b89cc).

Light lane: configuration (image pins, Dependabot) plus a check with its test and docs; no reviewer subagents, diff reviewed by me.

Declined review findings

None.

Open questions

None. Side note, outside this issue: CI's MongoDB service (.github/workflows/ci.yml) and the local test example in docs/development.md still use mongo:7.0.

Follow-up commit 5f7a178 (main session): the new docker-compose and helm entries ignore minor and major MongoDB updates, so Dependabot doesn't propose MongoDB 8.0 (kernel issue, see the Compose comment). CI on 5f7a178: all checks passed.

🤖 Generated with Claude Code

Summary by Sourcery

Synchronize Docker Compose service images with the Helm chart and automate coordinated dependency updates while preserving RabbitMQ compatibility.

Bug Fixes:

  • Keep the Docker Compose RabbitMQ service compatible with Celery when upgrading to RabbitMQ 4.3.7 by enabling transient non-exclusive queues.

Enhancements:

  • Pin Docker Compose MongoDB, RabbitMQ, and Flower images to the same patch-level references used by the Helm chart.
  • Add a repository test that prevents Docker Compose and Helm chart image references from drifting.
  • Configure Dependabot to update Compose and Helm service images together in a monthly multi-ecosystem group.

Documentation:

  • Document the shared image pins, Dependabot configuration, and RabbitMQ data-volume considerations when upgrading the Compose deployment.

Tests:

  • Add coverage verifying that Docker Compose service images match the corresponding Helm chart values.

Docker Compose ran rabbitmq:4.1 and mongo:7.0, floating tags, while
the Helm chart pins rabbitmq:4.3.7 and mongo:7.0.45, and Dependabot
covered neither file.

- docker-compose.yaml runs the chart's image references for MongoDB,
  RabbitMQ and Flower; tests/test_repository.py checks they match
  deployment/values.yaml.
- Dependabot updates both files in one pull request, with a
  multi-ecosystem group (service-images) of new docker-compose and
  helm entries; the helm entry ignores the library chart foca-common,
  which is bumped by hand.
- Development docs and the upgrade notes of 0.6.0 describe the pins
  and the RabbitMQ upgrade of the Compose setup.

Closes #435

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@uniqueg uniqueg added this to the v0.6.0 milestone Nov 5, 2026
@sourcery-ai

sourcery-ai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

The PR aligns Docker Compose with the Helm chart's pinned MongoDB, RabbitMQ, and Flower images, adds RabbitMQ 4.3 compatibility configuration for Celery, enforces cross-file image consistency with a YAML-based test, and groups Dependabot updates so future image bumps remain synchronized.

Sequence diagram for RabbitMQ 4.3 Celery compatibility

sequenceDiagram
    participant Compose as Docker Compose
    participant RabbitMQ
    participant Celery

    Compose->>RabbitMQ: Mount rabbitmq-foca config
    Note over Compose,RabbitMQ: deprecated_features.permit.transient_nonexcl_queues = true
    Celery->>RabbitMQ: Queue.declare for transient non-exclusive queues
    RabbitMQ-->>Celery: Queue declaration accepted
Loading

File-Level Changes

Change Details Files
Pin Compose service images to the Helm chart's exact patch-tagged references and document the synchronization rule.
  • Update MongoDB, RabbitMQ, and Flower image references to match chart values.
  • Add explanatory documentation for image pins and the upgrade implications.
docker-compose.yaml
docs/development.md
docs/upgrading.md
Configure RabbitMQ 4.3 for Celery's transient non-exclusive queues using the same compatibility setting as the chart.
  • Mount an inline Compose config enabling transient_nonexcl_queues.
  • Place the config at RabbitMQ's conf.d path for automatic loading.
docker-compose.yaml
Add a repository test that prevents image drift between Compose and Helm values.
  • Parse both YAML files without invoking Helm.
  • Compare the mapped MongoDB, RabbitMQ, and Flower image strings exactly.
tests/test_repository.py
Configure Dependabot to update Compose and Helm image pins together.
  • Add monthly docker-compose and helm entries to the service-images multi-ecosystem group targeting dev.
  • Ignore foca-common because its chart dependency and integrity files are maintained manually.
.github/dependabot.yml

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@read-the-docs-community

read-the-docs-community Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 proTES | 🛠️ Build #35685436 | 📁 Comparing 5f7a178 against latest (7a2325b)

  🔍 Preview build  

2 files changed
± development/index.html
± upgrading/index.html

@codecov

codecov Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (7a2325b) to head (5f7a178).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #440   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           24        24           
  Lines         2685      2685           
=========================================
  Hits          2685      2685           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

RabbitMQ 4.3 denies transient non-exclusive queues by default, which
Celery declares (rpc:// result backend, remote control), so the
worker of the smoke test never became healthy. Mount the same
conf.d setting as FOCA's library chart does for the chart's broker.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@uniqueg
uniqueg marked this pull request as ready for review November 6, 2026 00:04

@sourcery-ai sourcery-ai 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.

Hey - I've reviewed your changes and they look great!

Linked issues

#435 chore: pin Docker Compose images · 1 of 2 met

# Requirement Status Notes
1 Docker Compose uses the chart's exact versions, pinned like the repo's other images (tag plus digest where used). 🟡 Partly met The Compose image tags match the chart, but none includes a digest, so the references are not immutable as the issue asks where the repo uses tag-plus-digest pins.
2 .github/dependabot.yml covers docker-compose.yaml, grouped like the existing docker entry. ✅ Met The docker-compose entry is included in the monthly service-images multi-ecosystem group.

Sourcery assessment

Needs a human reviewer. Compose upgrades RabbitMQ from 4.1 to 4.3.7 while reusing its persisted data volume. If RabbitMQ cannot start with that data, the documented recovery deletes the volume and loses queued tasks; reverting the image cannot restore messages already deleted.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

MongoDB 8.0 refuses to start on Linux kernels 6.19 to 7.0.13, so the
new docker-compose and helm entries ignore its minor and major updates;
patches still come.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@uniqueg
uniqueg merged commit 2ac2094 into dev Nov 6, 2026
51 checks passed
@uniqueg
uniqueg deleted the chore/435-compose-pins branch November 6, 2026 00:29
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.

chore: pin Docker Compose images

1 participant