Skip to content

build: bump FOCA to 0.22.0 - #463

Merged
uniqueg merged 5 commits into
devfrom
build/foca-0.22.0
Nov 9, 2026
Merged

uniqueg merged 5 commits into
devfrom
build/foca-0.22.0

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Closes #462

Summary

Same approach as cloud-registry#382.

  • FOCA 0.22.0: foca>=0.22.0,<0.23 in pyproject.toml, uv.lock, and the base image elixircloud/foca:0.22.0-py3.13, pinned by digest, in the Dockerfile. That base image no longer has the zlib1g findings that fail the image scan with the 0.21.0 base. There were no Trivy ignores for them to remove.
  • foca-plugins and its two routing plugins are pinned to 7a08e7f, the merge of build: support FOCA 0.22 foca-plugins#62, which allows FOCA 0.22. The pin is the same in pyproject.toml, uv.lock and the ADD of the Dockerfile. The releases of foca-plugins still cap foca<0.21, so the commit pin stays until one allows FOCA 0.22.
  • exceptions.validation_reasons: True in pro_tes/config.yaml keeps the validator's reason as detail, as up to FOCA 0.21 and as test_validation_details expects. Responses gain FOCA 0.22's type, code (invalid-request) and errors. In cloud-registry the same setting goes away once the app names invalid fields itself (cloud-registry#378); proTES can follow later.
  • Docs:
    • docs/upgrading.md (To version 0.6.0): FOCA 0.22, validation errors, plugin gateway messages, logs, and the plugin cap.
    • FOCA versions in docs/api.md (provenance example), docs/plugins.md, docs/plugin-images.md and deployment/README.md.
    • The smoke-test plugin (tests/smoke/plugin) now requires foca>=0.22.0,<0.23.

Deprecations left for follow-ups

  • The exception map (pro_tes/exceptions.py) uses werkzeug classes, and FOCA logs a warning per class at startup. The switch to foca.errors isn't compatible yet: raw werkzeug exceptions such as Flask's 404 would stop matching.
  • Preparing for the ASGI release: Flask and Werkzeug imports and Flask test clients (FOCA's ast-grep rule flask-import). Foca.create_celery_app() is already the supported API.

How it was verified

  • coverage run -m pytest -W ignore::DeprecationWarning: 1807 passed, 11 skipped, 100% coverage (Helm 3.22.1, with helm dependency build deployment and the charts.sha256 check passing).
  • Not run locally: the Docker build, smoke tests and image scan, mkdocs build --strict, pre-commit (CI runs it), and the integration tests with services. CI runs them.

Review

Full lane (it changes config and pins), one round of the adversarial reviewer. It had low findings only; two doc findings are fixed (log levels, plugin gateway messages).

Declined review findings

  • "The pyproject.toml comment mixes foca<0.21 and FOCA 0.22": both are right. The releases of foca-plugins cap foca<0.21, and the commit pin can go once a release allows FOCA 0.22, which docs/development.md describes too.

Open questions

None.

🤖 Generated with Claude Code

Summary by Sourcery

Upgrade proTES and its container dependencies to FOCA 0.22 while maintaining compatible plugin, validation, and deployment behavior.

Enhancements:

  • Upgrade proTES to FOCA 0.22 and update the bundled routing plugins to a compatible revision.
  • Preserve validation reasons while adopting FOCA 0.22 validation response fields and updated plugin gateway behavior.

Build:

  • Update the pinned FOCA base image, Python dependency constraints, lockfile, smoke-test plugin dependency, and plugin source revision.

Documentation:

  • Update upgrade guidance, API examples, plugin documentation, and deployment documentation for FOCA 0.22.

uniqueg and others added 4 commits November 9, 2026 10:52
Work in progress; local checks not finished yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Pin foca-plugins and its routing plugins to the merge commit of
foca-plugins#62 (7a08e7f), which allows FOCA 0.22, in pyproject.toml,
uv.lock and the Dockerfile. The upgrade notes of 0.6.0 name FOCA 0.22
and what changes in responses, plugin gateway messages and logs.

Refs #462

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Configuration

Upgrade the application and container to FOCA 0.22, pin compatible routing plugins, and keep the smoke-test plugin dependency aligned.

  • Dockerfile L15, L52
  • pyproject.toml L116-126
  • tests/smoke/plugin/pyproject.toml L17
  • uv.lock L1888-1891 (+6 small edits)

Retain validation reasons in error details under FOCA 0.22 while enabling the updated validation response behavior.

  • pro_tes/config.yaml L241-245

Documentation

Update migration guidance and FOCA version references to explain the 0.22 behavior and compatibility requirements.

  • deployment/README.md L249
  • docs/api.md L143, L151
  • docs/plugin-images.md L29, L177
  • docs/plugins.md L98
  • docs/upgrading.md L14-19, L44-65

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@read-the-docs-community

read-the-docs-community Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 proTES | 🛠️ Build #35753505 | 📁 Comparing 995adc2 against latest (c7fcfff)

  🔍 Preview build  

5 files changed · ± 5 modified

± Modified

@codecov

codecov Bot commented Nov 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (c7fcfff) to head (995adc2).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #463   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           31        31           
  Lines         3013      3013           
=========================================
  Hits          3013      3013           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review November 9, 2026 12:34

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 2 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="pro_tes/config.yaml" line_range="245" />
<code_context>
+  # 0.21; the reason quotes the rejected values (FOCA 0.22's default names
+  # the invalid fields by location and code instead)
   validation_details: True
+  validation_reasons: True

 # Custom configuration
</code_context>
<issue_to_address>
**Generated clients miss validation details**

When a caller generates a client from the served OpenAPI document and handles validation errors, the served OpenAPI document omits a 400 response for task creation, and its `ProblemDetails` schema lists only `title`, `status`, and `detail`, so generated clients cannot discover or type the `type`, `code`, and `errors` validation fields.

Document the task-creation 400 response and add `type`, `code`, and `errors` to the served `ProblemDetails` schema.

Also at `docs/upgrading.md:49-50`.
</issue_to_address>

### Comment 2
<location path="docs/upgrading.md" line_range="15" />
<code_context>
-notes](https://github.com/elixir-cloud-aai/foca/releases/tag/v0.21.0)). What this
-changes:
+**FOCA 0.22 (all deployments):** proTES now requires FOCA 0.22.0, on the FOCA
+0.22.0 image (see FOCA's release notes of
+[0.21.0](https://github.com/elixir-cloud-aai/foca/releases/tag/v0.21.0) and
+[0.22.0](https://github.com/elixir-cloud-aai/foca/releases/tag/v0.22.0), and
</code_context>
<issue_to_address>
**Add release notes**

The issue asks for both upgrade notes and release notes. The change updates the upgrade notes but does not add or update release notes for this upgrade.
</issue_to_address>

Linked issues

#462 build: bump FOCA to 0.22.0 · 2 of 3 met

# Requirement Status Notes
1 Bump FOCA to 0.22.0 in the dependency, lockfile, and pinned base image. ✅ Met The dependency constraint and base image are updated; the PR description also reports the lockfile update.
2 Follow the migration guide, adjust affected tests, and fix compatible deprecations or list the rest as follow-ups. ✅ Met The config preserves validation reasons, the migration effects are documented, and the PR description lists the deferred deprecations.
3 Update docs naming the FOCA version, including upgrade notes and release notes. 🟡 Partly met The upgrade notes and other version references are updated, but no release notes for this upgrade are added or changed.

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: pro_tes/config.yaml:245


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread pro_tes/config.yaml Resolved
Comment thread docs/upgrading.md Resolved
@uniqueg
uniqueg merged commit a8ec7ee into dev Nov 9, 2026
49 of 50 checks passed
@uniqueg
uniqueg deleted the build/foca-0.22.0 branch November 9, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build: bump FOCA to 0.22.0

1 participant