Skip to content

docs: add the upgrade path from 0.3.0 - #368

Merged
uniqueg merged 2 commits into
devfrom
docs/upgrade-from-030
Oct 31, 2026
Merged

uniqueg merged 2 commits into
devfrom
docs/upgrade-from-030

Conversation

@uniqueg

@uniqueg uniqueg commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Summary

Docs findings of the 0.4.0 pre-release review (M2 and the docs lows).

Upgrade guide (M2, #362): docs/upgrading.md starts with "To version 0.4.0", a checklist for upgrades from 0.3.0 (image and chart on FOCA 0.19, custom.middlewares refused, the routing default, custom.tes.backends, the new rules users-list-plugins/users-get-plugins/owners-get-provenance/admins-get-provenance, the new collections and the createIndex right, the dropped middlewares collection, client-visible changes, library API changes), followed by the sections new in 0.4.0. Everything older is under "From versions before 0.3.0" (heading forms that tests/test_version_mentions.py allows; old anchors kept).

  • New section Routing: 0.3.0 routed by distance with random fallback, 0.4.0 defaults to foca.routing.ordered; how to keep distance routing with a derived image and the foca-plugins plugins (incl. the GeoIP database the distance plugin needs by default).
  • Important: foca-plugin-tes-routing-distance 0.1.0 and foca-plugin-generic-routing-random 0.1.0 are published on PyPI, but require foca>=0.18.0,<0.19, so they can't be installed into 0.4.0 images (FOCA 0.19). The docs say so and point to build: support FOCA 0.19 foca-plugins#32; examples pin >0.1.0. "Not published yet" wording is fixed in docs/plugin-images.md, docs/plugins.md and the values.yaml example.
  • Loop detection documented with its condition (server.public_url or plugins.gateway_id).

Docs lows (#363):

  • Plugins are fully trusted in-process code (warning in docs/plugins.md, docs/access-control.md): they can read proTES' credentials; the API limits guard against mistakes only.
  • Registry entries default to client_credentials: every registry-verified TES instance gets proTES' token, without per-instance audience (docs/access-control.md).
  • Provenance: "no personal data" qualified; plugin parameters and annotations are recorded, secret parameters must be SecretStr (docs/operations.md).
  • The public service info lists all TES instances (warning in docs/configuration.md).
  • GET /plugins lists plugins and the default pipeline only for callers who may choose pipelines (docs/plugins.md, docs/api.md).
  • Outdated FOCA versions in deployment/values.schema.json ($comment) and deployment/README.md.
  • The keep_group_subjects startup warning is documented as harmless (FOCA side: fix: group-subject warning, listing media type foca#577).
  • name_prefix matches the name as submitted (docs/api.md).

Code lows are tracked in #364, design questions in #366; the CI pip pin belongs to #336.

Closes #362
Closes #363

Light lane: docs and comments only (Markdown, a YAML comment in values.yaml, the $comment of the values schema); no behaviour change. Diff reviewed myself.

Verification

  • mkdocs build --strict: passed.
  • pytest -k "version_mentions or chart_readme or config_examples or docs_hooks or chart": 200 passed, 174 skipped (Helm chart tests: no helm locally; CI runs them).
  • pre-commit run --files <changed files>: passed.
  • CI: all checks passed (CI passed, incl. Chart, Docs, smoke test, tests); re-run after merging dev.

Not touched

CITATION.cff, docs/releases/0.4.0.md, the release verification commands in docs/operations.md, LAST_RELEASE_PROTES (M1, release-prep PR), .github/workflows/, the default routing.

🤖 Generated with Claude Code

Summary by Sourcery

Provide comprehensive documentation for upgrading proTES deployments to 0.4.0 and clarify the associated security, routing, plugin, and deployment requirements.

Enhancements:

  • Document the complete upgrade path to version 0.4.0, including configuration, routing, plugin, database, API, deployment, and client migration considerations.
  • Clarify operational and security guidance for trusted plugins, registry-discovered TES instances, provenance data, public service information, and plugin visibility.
  • Update deployment and plugin examples for FOCA 0.19 and current routing plugin availability.

Deployment:

  • Align deployment documentation and examples with FOCA 0.19 images, charts, plugin installation, and current values schema.

Documentation:

  • Reorganize the upgrading guide to distinguish upgrades from 0.3.0 from migrations from earlier versions, while retaining the historical migration guidance.

Start the upgrade guide with a checklist for upgrades from 0.3.0 and
move the older material under "From versions before 0.3.0". State the
change of the default routing and how to keep distance routing with a
derived image (once the foca-plugins releases support FOCA 0.19).

Also fix the docs findings of the 0.4.0 pre-release review: plugins
are fully trusted code, registry entries share proTES' token, what
provenance records hold (SecretStr), the public backend list in the
service info, what GET /plugins lists, the loop detection condition,
outdated FOCA versions, the keep_group_subjects warning, and that
name_prefix matches the submitted name.

Closes #362
Closes #363

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

sourcery-ai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

This documentation-only PR adds the complete upgrade path from proTES 0.3.0 to 0.4.0, including FOCA 0.19, plugin-based routing, backend and database migrations, API/library changes, and compatibility constraints. It also documents newly identified security, privacy, and operational caveats and refreshes deployment/API examples and release requirements.

Flow diagram for the proTES 0.3.0 to 0.4.0 upgrade path

flowchart TD
    A[proTES 0.3.0 deployment] --> B[Deploy matching 0.4.0 image and Helm chart]
    B --> C[Replace custom.middlewares with plugins]
    C --> D[Migrate TES configuration to custom.tes.backends]
    D --> E[Update access-control rules]
    E --> F[Grant MongoDB createIndex and add new collections]
    F --> G[Review client and library API changes]
    G --> H[proTES 0.4.0 on FOCA 0.19]
Loading

Flow diagram for routing choices after the 0.4.0 upgrade

flowchart LR
    A[Task] --> B{Configured routing}
    B --> C[foca.routing.ordered]
    C --> D[Backends in custom.tes.backends order]
    B --> E[Distance and random plugins]
    E --> F[Derived image with FOCA 0.19-compatible plugin releases]
    F --> G[GeoIP database for distance routing]
    D --> H[Next backend on rejection]
    G --> H
Loading

File-Level Changes

Change Details Files
Added a structured 0.3.0-to-0.4.0 migration guide, while reorganizing earlier migration material under a legacy-version section.
  • Added an upgrade checklist covering image/chart compatibility, plugin migration, routing, backend configuration, access-control rules, database collections and indexes, client/API changes, and library API changes.
  • Documented FOCA 0.18/0.19 configuration migrations and consolidated detailed guidance for backends, plugins, provenance, plugin storage, image/chart deployment, and removed middleware APIs.
  • Added compatibility guidance for loop detection, service registries, gateway tags, plugin listings, and database permissions.
  • Preserved older anchors and adjusted heading levels so existing links and version-reference checks remain valid.
docs/upgrading.md
Documented the security, privacy, and operational implications of the FOCA plugin and backend model.
  • Warned that in-process plugins are fully trusted and can access proTES credentials, tokens, environment variables, and the database.
  • Explained that registry-verified TES instances default to client-credentials authentication and share proTES' token without per-instance audiences.
  • Qualified provenance privacy claims and documented recording of plugin parameters and annotations, including SecretStr requirements.
  • Warned that public service info exposes configured and discovered TES instances and documented the harmless FOCA group-subject warning.
docs/plugins.md
docs/access-control.md
docs/operations.md
docs/configuration.md
Updated API and deployment documentation to reflect 0.4.0 behavior and configuration.
  • Clarified literal task-name prefix matching and restricted default-pipeline visibility in plugin listings.
  • Updated chart and image compatibility requirements to FOCA 0.19 and the release-matched image/chart pairing.
  • Replaced the routing plugin example with current package names, version constraints, and GeoIP configuration.
  • Corrected plugin publication status and FOCA version compatibility guidance.
  • Updated the values schema comment and deployment examples for the new release.
docs/api.md
deployment/README.md
deployment/values.yaml
deployment/values.schema.json
docs/plugin-images.md

Possibly linked issues


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 Oct 31, 2026 •

Copy link
Copy Markdown

@codecov

codecov Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (be3e6bb) to head (79d25bc).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #368   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines         2234      2234           
=========================================
  Hits          2234      2234           

☔ 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 October 31, 2026 22:33

@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 reviewed your changes and they look great!

Linked issues

#362 docs: add the upgrade path from 0.3.0 · 5 of 5 met

# Requirement Status Notes
1 Put the required upgrades from 0.3.0 in a checklist at the top of the guide. ✅ Met The checklist covers the image and chart, middleware-to-plugin changes, routing, TES backends, access-control rules, database collections and permissions, client changes, and library API changes.
2 Move the older upgrade material under a section for versions before 0.3.0. ✅ Met The guide introduces “From versions before 0.3.0” and places the earlier upgrade material beneath it.
3 Explain the routing change and how to keep distance routing with a derived image. ✅ Met The guide describes the ordered failover default and the derived-image setup, including the GeoIP database needed by default.
4 Correct the wording about publication of the foca-plugins routing plugins. ✅ Met The docs state that version 0.1.0 supports FOCA 0.18 only, is incompatible with this release’s FOCA 0.19 image, and point to the issue tracking compatible releases; examples use versions above 0.1.0.
5 Pass mkdocs build --strict. ✅ Met The PR description reports that mkdocs build --strict passed.

#363 docs: fix 0.4.0 review findings in the docs · 9 of 9 met

# Requirement Status Notes
1 Document that plugins are fully trusted in-process code and recommend reviewed, hash-pinned plugins. ✅ Met The docs explain that plugins can access proTES credentials, tokens, and the database; API limits guard against mistakes, and operators should review and hash-pin plugins.
2 Document the shared client-credentials token exposure for registry-verified TES instances. ✅ Met docs/access-control.md explains the default client_credentials behavior, lack of a per-instance audience, and the trust required in registry administrators.
3 Qualify the provenance personal-data claim and document the SecretStr requirement. ✅ Met docs/operations.md explains that plugin parameters and annotations are recorded, and requires secret parameters to use pydantic.SecretStr.
4 Warn that public service info lists all TES instances and document the opt-out. ✅ Met docs/configuration.md warns that unauthenticated service info exposes TES instance details and that hiding backends also hides gateway.
5 Clarify that GET /plugins lists the default pipeline only for callers who may choose pipelines. ✅ Met docs/api.md and docs/plugins.md describe the conditional listing and its relevant configuration.
6 Document the condition required for loop detection. ✅ Met docs/upgrading.md states that server.public_url or plugins.gateway_id must be set.
7 Update the outdated FOCA-version documentation in the chart schema and README. ✅ Met The schema comment and chart README are updated for the FOCA 0.19 release.
8 Document that the keep_group_subjects startup warning is harmless for proTES. ✅ Met docs/access-control.md explains the warning and links to the FOCA issue.
9 Document that name_prefix matches the submitted task name. ✅ Met docs/api.md says the filter uses the submitted name before plugins may rename it.

Sourcery assessment

Approved.


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

@uniqueg
uniqueg merged commit 988d35e into dev Oct 31, 2026
19 checks passed
@uniqueg
uniqueg deleted the docs/upgrade-from-030 branch October 31, 2026 22:48
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.

docs: fix 0.4.0 review findings in the docs docs: add the upgrade path from 0.3.0

1 participant