Repository navigation
build: move to FOCA 0.23.0 - #523
Conversation
Base image elixircloud/foca:0.23.0-py3.13 (fixes the libzstd1 finding CVE-2026-124851 of the 0.22.0 image). Adapt to FOCA 0.23: - subjects are namespaced by issuer also with one issuer; tests use the stored form, and a test pins that `namespace: ""` keeps owners bare, the upgrade path of single-issuer deployments (D-455) - an `allow` of unknown identifiers gets 400 (invalid-backends) - the chart takes plugins.available.<id>.store.maxNamespaceSize - drop the checks of API paths and audiences that FOCA's ServiceEntry now makes Docs: upgrade notes for 0.7.0, owners, issuers, client choices, store. Closes #522 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqN5w1v5t1QRTKU7ad5
Pass the TES instances that cannot run a task as known to run.route(), so that FOCA 0.23 does not refuse a pin to one of them as unknown (invalid-backends); proTES answers with the fields that no chosen instance supports again. Review fixes of the docs: body limit vs token check, store namespaces per distribution, admin scripts; test and formatting fixes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqN5w1v5t1QRTKU7ad5
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqN5w1v5t1QRTKU7ad5
foca>=0.23.0,<0.24 and the release train foca-plugins 0.4.0 (random and distance plugins 0.2.0), locked. Upgrade notes for the distance plugin 0.2.0 (store cache, per-caller lookup budget, key secret). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqN5w1v5t1QRTKU7ad5
Reviewer's GuideUses of the APIPass known but ineligible TES instances to FOCA routing so pins to them reach proTES's existing unsupported-version error path instead of being rejected as unknown.
ImplementationRely on FOCA 0.23's ServiceEntry validation for API paths and audience constraints while retaining proTES-specific checks.
ConfigurationUpgrade the base image and Python dependencies to FOCA 0.23 and the foca-plugins 0.4.0 release train.
Expose FOCA's namespace-size store setting in the Helm chart's key conversion and schema, and document it in the values file.
DocumentationUpdate deployment guidance and API examples to identify FOCA 0.23 and its reported plugin version.
Explain issuer-based subject namespacing and the resulting task-owner representation.
Document the changed store limits, request-body authentication order, plugin behavior, and FOCA 0.23 upgrade actions.
Update the supported FOCA range in plugin-image guidance.
TestsUpdate tests and fixtures for issuer-namespaced subjects, including coverage that an empty namespace preserves bare owners.
Cover the changed distinction between unknown and ineligible backend pins, and account for the FOCA 0.23 plugin-schema keys.
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 #523 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 37 37
Lines 3544 3537 -7
=========================================
- Hits 3544 3537 -7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Linked issuesChecked at commit 3a51d80 #522 build: move to FOCA 0.23.0 · 5 of 7 met
|
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="pyproject.toml" line_range="116" />
<code_context>
# FOCA minors are bumped by hand, together with the base image in the
# `Dockerfile` (`.github/dependabot.yml`).
- "foca>=0.22.0,<0.23",
+ "foca>=0.23.0,<0.24",
# The routing plugins in the image: `generic.routing.random` (default
# pipeline, `pro_tes/config.yaml`) and `tes.routing.distance` (opt-in,
</code_context>
<issue_to_address>
**Upgrade resets per-user task quotas**
When a single-issuer deployment has existing tasks and configured task limits, then upgrades without setting the issuer’s `namespace: ""`, `get_owner()` now returns the issuer-namespaced subject, while `check_task_limits()` counts stored tasks by exact `user_id`; existing tasks still have bare subjects, so they are omitted from the user’s quota and that user can exceed configured limits.
Preserve or migrate existing owner identifiers before applying the new namespace by default, or provide an explicit upgrade step that retains their quota counts.
</issue_to_address>
### Comment 2
<location path="deployment/templates/_helpers.tpl" line_range="91" />
<code_context>
"recordFailed" "record_failed"
"secretHeaders" "secret_headers"
"maxEntrySize" "max_entry_size"
+ "maxNamespaceSize" "max_namespace_size"
"maxTtl" "max_ttl"
) -}}
</code_context>
<issue_to_address>
**Missing chart plugin keys**
The issue asks the chart to add `attachments`, `max_count`, and `max_namespace_size`. This change adds only `max_namespace_size`; the chart test explicitly excludes `attachments`, and `max_count` is not added.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 2 findings to address first, and FOCA now namespaces authenticated subjects by issuer by default, changing the identity used for task ownership and related access checks. Existing single-issuer task owners remain stored under bare subjects, so users may lose access to those tasks and usage may be split; reverting alone does not reconcile records created with the new subjects.
Blocking findings: pyproject.toml:116, deployment/templates/_helpers.tpl:91
Release notes: the FOCA 0.23 move (#522, #523: breaking changes, security, maintenance) and the service clients (#517, #521, D-451); citation date 2026-11-26. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqN5w1v5t1QRTKU7ad5
The version check of the release branch flags "proTES 0.7.0" in the upgrading guide (added by #523); the section heading names the release. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqN5w1v5t1QRTKU7ad5
Summary
Moves proTES to FOCA 0.23.0, on the base image
elixircloud/foca:0.23.0-py3.13@sha256:a3b53a07399a1e6c8d9ea192f6b6cd6b16db18d10cf10d29aa4cd4d2faec5057(fixes the libzstd1 finding CVE-2026-124851 of the 0.22.0 image that turns Scan image red), with the release trainfoca-plugins0.4.0 (D-435: no temporary apt fix).namespace: ""(D-455, per D-286). 0.7.0 has no data migration. A test pins that this keeps owners bare.run.route()gets the TES instances that can't run a task asknown, so FOCA 0.23 doesn't refuse a pin to one of them as unknown; such a pin gets proTES's400naming the fields again. Anallowof unknown identifiers now gets400 invalid-backends.plugins.available.<id>.store.maxNamespaceSize.ServiceEntrynow makes them. The existing tests still cover them.Closes #522
Verification
pytestwith coverage on the final lock (FOCA 0.23.0, foca-plugins 0.4.0): 2222 passed, 11 skipped, 100% coverage.mkdocs build --strict: OK. pre-commit (ruff, mypy, semgrep, actionlint, gitleaks): OK.Declined review findings
test_owner_stored_bare(quality reviewer): both key on the storeduser_id, which the test pins.NEEDS_11to the package conftest (quality reviewer): a cleanup; the module already imports helpers fromtest_pluginsthe same way.run.route()when backends exist, so unknown identifiers getinvalid-backendseven if no instance can run the task (adversarial, low): this behaviour is older than this PR. The docs now say what happens.503; adversarial, low): this path is unchanged and was checked by reading the code. The docs now name it.Open questions
None.
🤖 Generated with Claude Code
https://claude.ai/code/session_011FSoqN5w1v5t1QRTKU7ad5
Summary by Sourcery
Upgrade proTES to FOCA 0.23.0 and its plugin release train while aligning owner identity, backend selection, plugin storage, deployment configuration, and upgrade documentation with the new platform behavior.
New Features:
Bug Fixes:
Enhancements:
Build:
Deployment:
Documentation:
Tests: