Repository navigation
build: support FOCA 0.20 - #54
Conversation
Raise the upper bound to foca<0.21 for the plugins, the template and the meta distribution, and add FOCA 0.20.0 to the CI matrix. Prepare the releases as docs/releasing.md sets out: both plugins go to 0.1.2 (the range only widens) and the meta distribution to 0.2.0 (added FOCA versions count as minor), pinning the new plugin versions. Install plugins in derived images with uv in docs/installing.md, as images on FOCA 0.20 have no pip. Closes #53 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideThis PR adds FOCA 0.20 support by widening dependency bounds, refreshing release pins and versions, extending CI coverage, updating documentation and changelogs, and replacing the derived-image pip installation recipe with uv for FOCA 0.20 images. Flow diagram for FOCA 0.20 derived-image installationflowchart LR
Plugins[plugins.txt] --> UvStage[uv binary from pinned image]
UvStage --> UvInstall[uv pip install --system]
UvInstall --> Check[uv pip check --system]
Check --> Image[FOCA 0.20 application image]
Flow diagram for FOCA compatibility CI matrixflowchart LR
Matrix[CI test matrix] --> F018[FOCA 0.18.0]
Matrix --> F019[FOCA 0.19.0]
Matrix --> F020[FOCA 0.20.0]
Matrix --> Dev[FOCA dev]
F018 --> Plugins[Plugin test suites]
F019 --> Plugins
F020 --> Plugins
Dev --> Plugins
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 #54 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 553 553
Branches 71 71
=========================================
Hits 553 553
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Documentation build overview
4 files changed± index.html± catalogue/index.html± installing/index.html± writing-plugins/index.html |
There was a problem hiding this comment.
Hey - I've found 4 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="docs/installing.md" line_range="15" />
<code_context>
- `tes.routing.distance` (0.1.1 each), are experimental; the first release
- train is `foca-plugins` 0.1.0. Distributions named below that don't
+ `tes.routing.distance` (0.1.2 each), are experimental; the latest release
+ train is `foca-plugins` 0.2.0. Distributions named below that don't
exist yet are examples of the naming scheme.
</code_context>
<issue_to_address>
**FOCA 0.20 installs fail**
When a reader follows either meta-distribution installation example with FOCA 0.20, the examples pin `foca-plugins` to 0.1.0, whose requirement excludes FOCA 0.20, so dependency resolution rejects the install or downgrades FOCA instead of installing the compatible train.
Update both installation examples to pin `foca-plugins` to 0.2.0.
Also at `README.md:46-47`.
</issue_to_address>
### Comment 2
<location path="plugins/tes/routing/distance/README.md" line_range="22" />
<code_context>
| Data transfers | none |
| Data stored | none (no plugin store) |
-| FOCA | 0.18, 0.19 (`>=0.18.0,<0.20`) |
+| FOCA | 0.18, 0.19, 0.20 (`>=0.18.0,<0.21`) |
## What it does
</code_context>
<issue_to_address>
**Derived image builds fail**
When an operator follows the distance-plugin README’s derived-image example with a FOCA 0.20-or-later image, the example runs `pip install` on an image without `pip`, so the Docker build exits with command-not-found and the image is not built.
Replace the example’s `pip install` step with the `uv` installation command.
Also at `docs/installing.md:78`.
</issue_to_address>
### Comment 3
<location path="docs/installing.md" line_range="75" />
<code_context>
+ UV_NO_CACHE=1 uv pip install --system --require-hashes --only-binary :all: \
+ --no-deps --compile-bytecode -r /tmp/plugins.txt \
+ && uv pip check --system
+USER 1000
```
</code_context>
<issue_to_address>
**Derived image runs as wrong user**
When the recipe is copied for a gateway image whose runtime UID is not 1000, `USER 1000` overrides the base image’s configured runtime user rather than restoring it; when another gateway image uses a different UID, the derived container runs with the wrong identity and can fail file-access checks or violate the app’s runtime policy.
Use an explicit placeholder for the base image’s runtime user and require operators to substitute that image’s actual user or UID.
</issue_to_address>
### Comment 4
<location path="meta/CHANGELOG.md" line_range="13" />
<code_context>
+## 0.2.0
+
+Release train for FOCA 0.20: the plugins of 0.1.0, each tested against
+FOCA 0.18, 0.19 and 0.20 (`foca>=0.18.0,<0.21`). Pins:
+
</code_context>
<issue_to_address>
**Release notes misstate plugin versions**
When a reader consults the 0.2.0 release-train changelog, the changelog describes the plugins as version 0.1.0, but the pins listed for the train are 0.1.2, so readers get an incorrect account of the installed plugin versions.
Change the release-train introduction to say the plugins are version 0.1.2.
</issue_to_address>Linked issues
#53 build: support FOCA 0.20 · 3 of 3 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Raise the cap on the plugins and meta package, and run the CI matrix against FOCA 0.20. | ✅ Met | The plugin, template, and meta package requirements use foca>=0.18.0,<0.21, and the CI matrix includes FOCA 0.20.0. |
| 2 | Check that the plugins work with what changes in 0.20.0. | ✅ Met | The PR reports tests passing for all three plugins with FOCA 0.20.0; the distance plugin's HttpError handling remains compatible with the described change. |
| 3 | Prepare plugin releases and a meta release, so they can follow the FOCA tag quickly. | ✅ Met | Both plugins are prepared as 0.1.2, the meta distribution as 0.2.0 with updated pins, and the changelogs and lockfile are updated. |
Sourcery assessment
Approval pending. 3 findings to address first.
Blocking findings: docs/installing.md:15, plugins/tes/routing/distance/README.md:22, docs/installing.md:75
Pin the examples to the new release train, install with uv in the distance plugin's derived image, and name the image's user in the recipes instead of assuming one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes #53
Summary
foca>=0.18.0,<0.21for both plugins, the templategeneric.example.noopand the meta distribution, and add FOCA 0.20.0 to the CI matrix.docs/releasing.mdsets out: both plugins to 0.1.2 (the range only widens: patch),foca-pluginsto 0.2.0 (adding FOCA versions: minor), with the new pins, changelog sections anduv.lock.docs/installing.mdusedpip install, which fails on images based on FOCA 0.20; it now uses the uv recipe of FOCA's migration guide. README, plugin READMEs anddocs/writing-plugins.mdname the new range.CITATION.cffstays as it is: it deliberately has no version or date, as the repository holds several distributions.Light lane: only dependency ranges, versions, changelogs, docs and the CI matrix change, with no plugin source and no change to secrets, permissions or the release workflow.
What changes in FOCA 0.20.0 for the plugins
GuardedClientclassifies errors differently, buttes.routing.distanceonly catches the base classHttpErrorand readsreason, so no change is needed.How it was verified
Locally, the steps of the CI job
test(ruff, ast-grep, mypy, pytest, coverage) for all three plugins:dev: all pass at 100% coverage (24, 141 and 15 tests).python -m scripts.checks check: passes.mkdocs build --strict: passes.pre-commit run --all-files: passes.Python 3.15 and the other Python and FOCA combinations run in CI only.
CI: all checks pass, including
Testfor Python 3.11, 3.13 and 3.15 with FOCA 0.18.0, 0.19.0, 0.20.0 anddev.Open questions
None.
🤖 Generated with Claude Code