Repository navigation
docs: set up documentation on Read the Docs - #56
Conversation
Inserting shared mock data into a collection adds an `_id`, and later tests couldn't serialize it. Two more tests lacked an app context. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Replaces Travis and `main.yaml`. Tests run in the image. The smoke test uses MongoDB 7, which needs a newer pymongo than FOCA 0.7 pins. Excludes `.env*` from the image build context. Closes #32 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each call has a timeout and follows no redirects. A failure stays with its subscriber, and other than 2xx counts as one. The build stores one result per subscriber, without URLs or tokens. Closes #34 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
With builds off, the default, the POST takes one prebuilt image and notifies subscribers. Build requests and PUT get a 403. Registration can be closed by configuration, and a subscription value `*` matches any tag or branch, as registering again won't work then. Closes #33 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Configuration from a Secret, and defaults in the image with no users and no debug mode. Without builds, no updater, shared volume, or rights. Route or Ingress with TLS, ClusterIP services with own selectors, no fixed user IDs, MongoDB 7 and camelCase values. The image runs under any user ID. Closes #35 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Admin users follow the configuration, the probe avoids the database, the build path finds its own namespace, and the README covers moving from the old chart. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A shared thread limit let calls that hang keep later subscribers in the queue until the overall wait ended, so these were never called. Each subscriber now gets a thread, and the setting `endpoints.subscriptions.max_per_repository` (default: 100) limits the number of subscriptions per repository, and with it the threads. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ages # Conflicts: # pubgrade/errors/exceptions.py # pubgrade/modules/endpoints/subscriptions.py # tests/pubgrade/endpoints/test_subscriptions.py
# Conflicts: # pubgrade/config.yaml
One publish upgrades Deployments in two namespaces of a throwaway k3s cluster, with Pubgrade from its chart and sidecars built from the branch `master` of Pubgrade-Sidecar. Also covers an unreachable subscriber and a tag that doesn't exist. Runs in CI as the job `Upgrade test`, part of the gate. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sidecars now accept a notification with a 202 and roll out in the background, so a missing tag only shows in their report, after retries. The test reads that report, and the README says what `delivered` means. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Threads per notification stay within the limit of subscriptions, also for lists longer than that. Completing a build needs the token of the repository that the build belongs to. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Image references follow Docker's rules, and requests without images or image names get a 400 instead of a server error. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # tests/pubgrade/endpoints/test_builds.py
MongoDB listens on the configured port, and the builds' Role has no rights on Services, which nothing uses. The README names the storage class that builds need, and says to use HTTPS for callbacks outside the cluster. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The test looks for the actual tokens in public builds, not only for field names, and by default no longer reuses the name of existing containers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Push both images by digest in the environment dev-images, scan exactly those digests, then attest, sign with Sigstore and tag them, as cloud-registry does. Report unit test coverage to Codecov. Drop the date tag, which the other repos don't publish. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Always write the coverage report and hand it to the host user, also when tests fail. Document the environment, secrets and variable that publishing needs, and how to verify an image's signature. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # .github/workflows/ci.yml
…images # Conflicts: # tests/smoke.sh
MkDocs Material, as in the org's other repos, with usage, deployment, API and development pages from the README, which now follows cloud-registry's layout. Pubgrade-Sidecar's documentation is a section of the site, from a pinned submodule added by a build hook. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add a Docs job, with the Pubgrade-Sidecar submodule checked out, and pin the submodule to the Sidecar's newest dev commit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep the deployment's configuration copy outside the checkout and ignore it, and local docs builds, in Git and image builds. Fail on snippets in the Sidecar's pages instead of rewriting them, now that they are self-contained; drop the unused edit links. Restore the versioning note, and pin the Sidecar's newest dev commit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # .github/workflows/ci.yml # README.md
A Citation section that points to CITATION.cff, as there's no DOI before the first release, and the Lint job in the CI description. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideSets up a strict MkDocs Material documentation site published through Read the Docs, incorporates pinned Pubgrade-Sidecar documentation, refreshes the README as a concise project entry point, and makes documentation validation a required CI check with updated repository and image exclusions. Sequence diagram for the strict documentation buildsequenceDiagram
participant Checkout as actions/checkout
participant Submodule as Pubgrade-Sidecar submodule
participant MkDocs
participant Hook as docs/hooks.py
participant Build as Read the Docs or CI
Build->>Checkout: checkout repository with submodules
Checkout->>Submodule: checkout pinned commit
Build->>MkDocs: mkdocs build --strict
MkDocs->>Hook: on_config(config)
Hook->>Submodule: _docs_dir()
Hook-->>MkDocs: append Sidecar nav section
MkDocs->>Hook: on_files(files, config)
Hook-->>MkDocs: add Sidecar docs under sidecar/
MkDocs->>Hook: on_page_markdown(markdown, page, config, files)
Hook-->>MkDocs: reject Sidecar snippets
MkDocs-->>Build: fail on warnings or produce site
Flow diagram for documentation validation in CIflowchart TD
Start["Pull request or push"] --> Checkout["Checkout repository and submodules"]
Checkout --> Install["Install .[docs] extra"]
Install --> Build["Run mkdocs build --strict"]
Build --> Docs["Docs job"]
Docs --> Gate["CI passed gate"]
Gate --> Result["Required checks pass"]
File-Level Changes
Possibly linked issues
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 #56 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 7 7
Lines 669 669
=========================================
Hits 669 669 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="docs/usage.md" line_range="60" />
<code_context>
+Pubgrade sends `access_token` to `callback_url` with each notification, so use
+`https` for anything outside the cluster. A subscription's `value` must equal
+the `tag` or `branch` of a published image; the value `*` matches any of them,
+e.g. every new tag. A repository takes at most 100 subscriptions
+(`endpoints.subscriptions.max_per_repository`); further ones get a 403.
+
</code_context>
<issue_to_address>
**Subscription limit is misreported**
When the configured `endpoints.subscriptions.max_per_repository` differs from 100, `register_subscription()` compares the count against the configured `max_per_repository`, so readers who change that setting get an incorrect limit from the stated 100-subscription cap.
Describe 100 as the default limit and note that `endpoints.subscriptions.max_per_repository` can change it.
</issue_to_address>Linked issues
#40 docs: set up documentation on Read the Docs · 3 of 4 met · 1 to check by hand
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Build the docs strictly in CI | ✅ Met | The Docs job runs mkdocs build --strict and is included in the CI gate. |
| 2 | Publish the docs on Read the Docs | 👀 Check by hand (external system) | Verify that the Read the Docs project is configured to publish a successful build and that the published site is available at the linked URL. |
| 3 | Provide user, operator, developer and API documentation | ✅ Met | The site has Usage, Deployment, Development and API pages. |
| 4 | Keep the README short and point to the docs | ✅ Met | The README links to the documentation and keeps its content to a synopsis, quick start, citation, contributing and license. |
#49 docs: align the README with the other repos · 1 of 2 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Use the requested README structure | ✅ Met | The README includes the logo, synopsis, quick start, a documentation link, contributing, citation and license. |
| 2 | Include CI, Codecov, docs, license and Python shields | 🟡 Partly met | The README includes CI, Codecov, docs and license shields, but no Python shield. |
Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: docs/usage.md:60
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Linked issues
#40 docs: set up documentation on Read the Docs · 3 of 4 met · 1 to check by hand
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Build the documentation strictly in CI. | ✅ Met | The Docs job runs mkdocs build --strict and is included in the CI gate. |
| 2 | Publish the documentation on Read the Docs. | 👀 Check by hand (external system) | Check that the Read the Docs project publishes the intended branch and versions using this configuration. |
| 3 | Keep the README short and point to the documentation. | ✅ Met | The README is streamlined and links to the full documentation. |
| 4 | Provide user, operator, developer, and API documentation. | ✅ Met | These are covered in docs/usage.md, docs/deployment.md, docs/development.md, and docs/api.md. |
#49 docs: align the README with the other repos · 0 of 1 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Align the README's structure and shields with cloud-registry's. | 🟡 Partly met | The README has the logo, overview, quick start, documentation, contributing, citation, and license sections, plus CI, Codecov, docs, and license shields; it lacks the requested Python shield. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Linked issues
#40 docs: set up documentation on Read the Docs · 3 of 4 met · 1 to check by hand
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | MkDocs Material documentation with usage, deployment, developer, and API pages | ✅ Met | The site config uses MkDocs Material, and the docs include the requested guides and API reference. |
| 2 | A strict documentation build in CI | ✅ Met | The Docs job checks out the Sidecar submodule and runs mkdocs build --strict; the job is included in the CI gate. |
| 3 | Documentation published on Read the Docs | 👀 Check by hand (external system) | Check that the documentation is published and accessible on the project's Read the Docs site. |
| 4 | A short README that points to the documentation | ✅ Met | The README is substantially shortened and links to the documentation. |
#49 docs: align the README with the other repos · 1 of 3 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | A logo and CI, Codecov, docs, license, and Python shields | ✅ Met | |
| 2 | A one-line description | 🟡 Partly met | The README has a synopsis, but it is a multi-sentence paragraph rather than a one-line description. |
| 3 | Short sections for what it is, quick start, documentation, contributing, citation, and license | 🟡 Partly met | The quick start, contributing, citation, and license sections are present, but the description is unheaded and the documentation link is prose rather than a section. |
Summary
Closes #40. Closes #49. (Part of #51; #40's acceptance criteria include a short README that points to the docs, which is #49, so both are in one PR.)
mkdocs.yml, strict validation,.readthedocs.yamlwith a fail-on-warning build). Pages: Home, Usage (repositories, users, subscriptions, publishing, notifications), Deployment (chart, configuration, builds, moving from chart 0.1), API (spec, endpoint table), Development (tests, CI, publishing, signatures, docs, versioning). Content moved from the README, checked against the API spec, config and chart.CITATION.cff; no DOI before the first release), contributing, license. The old "optional link with the Cloud Registry" claim is dropped on purpose: there's no such integration in the code.Docsjob (strict build, as on Read the Docs), part of the gate.external/pubgrade-sidecar, pinned to a commit of the Sidecar'sdev; the MkDocs hookdocs/hooks.pyadds itsdocs/undersidecar/(where the Sidecar's own links andsite_urlpoint), appends itsnavas the last section, and fails on snippets in its pages (they would resolve against this repo). Its code reference builds with mkdocstrings pointed at the submodule'sapp/. Read the Docs checks out submodules (submodules: include: all), CI'sDocsjob too, and Dependabot'sgitsubmoduleentry proposes the newest Sidecar commit monthly.actions/checkoutsupport it natively, Dependabot bumps it, and no extra plugin or network code runs during the build. The multirepo plugin pins branches only, and copying pages would drift.setup.py: adocsextra (moves topyproject.tomlwith ci: add lint, type checks and pyproject.toml #38);long_descriptionno longer reads the README..dockerignore: docs, submodule, build output and venvs stay out of the image;/config.yaml(a deployment's copy with tokens, as the quick start suggests keeping it outside the checkout) is ignored in Git and images.docs/images/.How it was verified
mkdocs build --strict(Python 3.12 and 3.13, docs extra): passes; Sidecar section with all its pages, images and the code reference rendered.Declined review findings
🤖 Generated with Claude Code
Summary by Sourcery
Establish a strict, Read the Docs-hosted documentation site with refreshed project guidance and integrated Pubgrade-Sidecar documentation.
New Features:
Bug Fixes:
Enhancements:
Build:
CI:
Documentation:
Chores: