Repository navigation
build: move to FOCA 0.21 - #434
Conversation
Base image and pin on FOCA 0.21.0, whose image has the fixed apt, so the workaround goes. The releases of foca-plugins cap foca<0.21, so pin it and its two routing plugins to a commit of dev, and build their wheels in the image's build stage. The release pin check flags these references until foca-plugins has a release. Closes #433 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideMoves proTES to the digest-pinned FOCA 0.21 image and dependency lock, temporarily builds FOCA 0.21-compatible routing plugins from a verified source commit, strengthens build-time consistency checks, updates affected tests, and documents operational and upgrade implications. Flow diagram for pinned plugin dependency validationflowchart TD
Requirements[pyproject.toml plugin commit references]
Validator[scripts/image_requirements.py]
Docker[Dockerfile plugin commit]
Test[Commit consistency test]
Wheels[Plugin wheels built offline]
Requirements --> Validator
Requirements --> Test
Docker --> Test
Validator -->|Exclude from exported image requirements| Wheels
Test -->|Matching commit| Wheels
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 #434 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 24 24
Lines 2679 2685 +6
=========================================
+ Hits 2679 2685 +6 ☔ 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="tests/test_image_requirements.py" line_range="217" />
<code_context>
+ (root / "Dockerfile").read_text(),
+ re.M,
+ )
+ assert set(built) == set(locked)
</code_context>
<issue_to_address>
**Missing plugin pins go unnoticed**
When all plugin commit references are removed from both files, in `test_image_builds_plugins_of_pyproject`, line 217, equality succeeds for two empty sets, so the test passes even though no plugin commit is declared or built.
Assert that both extracted sets are non-empty before comparing them.
</issue_to_address>Linked issues
#433 build: move to FOCA 0.21 · 4 of 4 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Use FOCA 0.21.0 for the base image and dependency pin, with the lock updated. | ✅ Met | The Dockerfile pins the FOCA 0.21.0 image by digest, and pyproject.toml and uv.lock are updated for FOCA 0.21. |
| 2 | Remove the apt upgrade if the new image makes it unnecessary. | ✅ Met | The apt upgrade workaround and its test are removed; the PR description reports that the new image has apt 3.0.4. |
| 3 | Use foca-plugins dev at a pinned commit until a compatible release, and have the release pin check flag it. | ✅ Met | The meta distribution and both routing plugins point to the same pinned commit, whose wheels are built in the Dockerfile. The release pin checker flags direct references. |
| 4 | Review FOCA 0.21.0 breaking changes for proTES and document the applicable changes in the upgrade notes. | ✅ Met | The new upgrade section covers the applicable discovery, configuration, request, worker, logging, MongoDB, index, and plugin impacts. |
Sourcery assessment
Needs a human reviewer. 1 finding to address first, and failed-run records will store generated request IDs by default instead of clients’ X-Request-ID values, so reverting will not restore the identifiers already written to those records. The impact is bounded to those records; the other documented behavior changes, such as rejecting query parameters or timing out sooner on MongoDB connections, are reverted with the FOCA version.
Blocking findings: tests/test_image_requirements.py:217
Closes #433
Summary
elixircloud/foca:0.21.0-py3.13by digest, with the pinfoca>=0.21.0,<0.22and the lock.foca<0.21, sopyproject.tomlpins the meta distribution and the two routing plugins to commit 8c5e0c2 ofdev, which allows<0.22. Compared with the plugins' last tag, that commit changes no plugin source.buildstage fetches that commit withADD <repo>.git#<sha>and builds their wheels offline, with the locked build requirements.scripts/image_requirements.pyleaves them out and rejects any other form of reference. A test checks that the commits inpyproject.tomland theDockerfilematch.docs/development.mdlists what to remove then.No release, tag or version bump of proTES. The chart stays on foca-common 0.4.0.
FOCA 0.21 for proTES
Went through the release notes' breaking changes. In the code, only the tests of index errors needed changing, for FOCA's new message. proTES keeps no MongoDB client across forks, doesn't read
jobs.backendand doesn't callis_admin. What applies to operators is in the new section "To version 0.6.0" ofdocs/upgrading.md. That number follows the milestone of #433;docs/operations.md, the chart's README and the examples in the docs follow.How it was verified
Locally, with a private Compose project, port and image tag, removed afterwards:
Dockerfile: FOCA 0.21.0, apt 3.0.4, plugins 0.1.2 from the commit, and itsuv pip checkpassed.tests/smoke/check.shpassed.pytestpassed (1613 passed, 11 skipped), andpre-commit run --all-filesandmkdocs build --strictpassed.Not run locally, left to CI:
tests/smoke/plugins.sh(it would overwrite the shared local tagprotes:plugins), the Trivy scan, and the integration jobs on Funnel, TESP-API and TESK.CI: see the checks of this PR.
Declined review findings
None open: the reviewers' findings on
uv.lock(regenerated with the locked uv 0.13.6) and the docs were fixed.Open questions
None.
🤖 Generated with Claude Code
Summary by Sourcery
Move proTES to FOCA 0.21 with compatible pinned plugin builds and refreshed documentation, dependency validation, and tests.
Bug Fixes:
Enhancements:
Build:
Documentation:
Tests: