Repository navigation
docs: describe services with several images - #85
Conversation
Document that each notification names one image and that subscribers match notifications by image repository: a listener updates every container whose image repository equals image_name, as Pubgrade-Sidecar does with PUT /deployment, optionally limited to deployments with a label. Describe this in the notification callback of the API as well. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Bump Pubgrade-Sidecar to the merge of its PR 40, whose docs describe updates of all containers of an image repository. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideAPIClarify in the OpenAPI contract that notifications name one image and subscribers match by image repository, and specify which containers a notification updates.
DocumentationExplain how listeners and Pubgrade-Sidecar handle services with several images, including subscription scope and per-image rollouts.
Lock files and vendored codeBump the Pubgrade-Sidecar submodule to include its documentation of updating containers by image repository.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #85 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 17 17
Lines 1471 1471
=========================================
Hits 1471 1471 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="docs/usage.md" line_range="136-137" />
<code_context>
+Pubgrade-Sidecar does this with `PUT /deployment`: in every Deployment it
+manages (its `targetDeployments`, optionally only those with the label
+`deploymentLabel`), it updates every container of the notified image
+repository. Subscribe its callback URL `<sidecar URL>/deployment` once per
+image repository, i.e., to each repository of the service that publishes an
+image (see the sidecar's [API](sidecar/api.md) and
+[Deployment](sidecar/deployment.md)). `PUT /deployment/<deployment name>`
</code_context>
<issue_to_address>
**Sidecars receive duplicate updates**
When one source repository publishes multiple image repositories and a user follows the instruction to subscribe once per image repository, pubgrade subscriptions target the source repository, not image repositories, and each matching build triggers every subscription; the sidecar therefore receives repeated callbacks and performs redundant deployment updates.
Instruct users to subscribe once per source repository rather than once per image repository.
</issue_to_address>
### Comment 2
<location path="pubgrade/api/pubgrade.yaml" line_range="595-596" />
<code_context>
aren't followed. A subscriber that takes longer answers at
once (e.g., with 202) and acts in the background, as
- Pubgrade-Sidecar does.
+ Pubgrade-Sidecar does. Each call names one image; a service
+ with several images gets one call per published image.
+ Subscribers match calls by image repository and update
+ every container whose image repository equals `image_name`
</code_context>
<issue_to_address>
**Multi-image callback payload**
The issue asks for the callback schema to handle multiple images in a broker request, but the change specifies one image per call and one call per published image. The schema still accepts only one `image_name` and `tag` pair, so it does not describe a multi-image payload.
</issue_to_address>Linked issues
#4 How to handle multiple Docker images in single service · 1 of 2 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Handle multiple images in a broker callback request. | 🟡 Partly met | The change describes handling a multi-image service through separate one-image notifications; the callback request schema still contains only one image_name and tag. |
| 2 | Allow deployments to identify which pod or deployment should be updated with which image. | ✅ Met | The documentation says the sidecar updates containers matching the notified image repository, optionally limiting the managed Deployments by label. |
Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: docs/usage.md:137, pubgrade/api/pubgrade.yaml:596
Subscriptions belong to Pubgrade repositories, so a callback subscribed twice to one repository gets every notification twice. Also say that a build publishes only the first entry of `images`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Linked issues
#4 How to handle multiple Docker images in single service · 1 of 2 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Handle multiple images in one callback request | ❌ Not addressed | The callback still names one image and tag; the docs direct publishers to send further images as separate builds. |
| 2 | Identify which deployment or pod should use each image | ✅ Met | The documented behavior matches containers by image repository and updates every match, optionally limiting the deployments. |
A prebuilt image must be the only entry of `images`; only with builds on are further entries ignored. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Documents how services with several images are upgraded. Pubgrade keeps one notification per built image (
{image_name, tag}); a listener matches by image repository. Pubgrade-Sidecar (since elixir-cloud-aai/Pubgrade-Sidecar#40, closing elixir-cloud-aai/Pubgrade-Sidecar#39) updates every container in its namespace whose image repository equalsimage_name, optionally limited to deployments with a label.docs/usage.md: new section "Services with several images", plus a note on what listeners do with a notificationpubgrade/api/pubgrade.yaml: callback andNotificationRequest.image_namedescriptions (matching by image repository, one notification per image); descriptions only, no schema changeexternal/pubgrade-sidecar: bumped to the merge of Pubgrade-Sidecar PR 40, so that the included sidecar docs describe the new behaviourCloses #4
Light lane: docs, OpenAPI descriptions and a submodule bump only; no code or schema change. I reviewed the diff myself.
Verification
mkdocs build --strictwith the bumped submodule: cleanpytest --cov: 597 passed, 100% coverageCI: all checks passed (incl. Docs, Read the Docs build, Upgrade test, image scans)
Sourcery: 2 findings; subscribing once per Pubgrade repository (not per image) fixed in 7dedcf1, which also documents how many images a build publishes (a prebuilt image is the only entry of
images; with builds on, only the first entry counts; 14c9733)Declined review findings
Open questions
None.
🤖 Generated with Claude Code
Summary by Sourcery
Document independent notification and rollout behavior for services that use several container images.
Enhancements:
Documentation:
Chores: