Repository navigation
Description
Part of #321 (step 1, "Dependency"), split off so that the engine work starts on a FOCA 0.18 base. Follows Cloud Registry's upgrade (elixir-cloud-aai/cloud-registry#226, PR elixir-cloud-aai/cloud-registry#261), the template for FOCA apps.
Problem
proTES depends on FOCA 0.17 (foca>=0.17.0,<0.18, base image elixircloud/foca:0.17.0-py3.13). The plugin engine (#321) needs FOCA 0.18.0, which also changes behaviour that proTES relies on (cf. FOCA's "Migrating to 0.18.0") and provides features that proTES has its own copies of.
Proposal
Upgrade to FOCA 0.18 without using the plugin engine yet (proTES's middlewares stay as they are; it is no gateway app until #321's engine child):
- Dependency:
foca>=0.18.0,<0.19; base imageelixircloud/foca:0.18.0-py3.13, pinned by digest; image requirements and release pin checks follow. - Breaking changes of FOCA 0.18 that apply to proTES:
- validation details on by default (
exceptions.validation_details): set it explicitly; tests and docs that expect the mappeddetailare updated; get_enforcer()removed: uselocked_enforcer()where proTES or its tests use the enforcer;- group settings that cannot apply (
group_mappingwithoutclaim_groups) are FOCA startup errors now.
- validation details on by default (
- Use FOCA's features instead of proTES's copies (as Cloud Registry did):
require_adminmoves fromcustom.access_control.require_admintosecurity.access_control.require_admin;check_role_groups()'s admin check and claim check go; the old key stops the app with a hint (config model and chart);- the service-client refusal of
check_task_ownership()becomesfoca.security.auth.require_no_service_clients(); the access control check stays; warn_placeholder_service_info()and its constants go (FOCA's startup check);pro_tes/gunicorn_config.pygoes if FOCA'sfoca.gunicorn_confighas the same settings (the image runs--config python:foca.gunicorn_config); keep only what proTES needs beyond it;pro_tes.utils.misc.get_custom_config()is replaced byfoca.get_custom_config(CustomConfig)where it works (also in Celery tasks; keep a thin wrapper otherwise).
- Docs: configuration, reference and "Upgrading" (breaking changes:
require_admin, Gunicorn module, validation details).
Out of scope: server.public_url (needed by the backend list, next child), the plugin engine.
Acceptance criteria
- proTES depends on
foca>=0.18.0,<0.19, and the image is built on FOCA 0.18.0. - The copies listed above are deleted or replaced; the old
require_adminkey is refused with a hint (app and chart). - Tests pass with 100% coverage; chart tests, docs build and pre-commit pass.
- Release notes: breaking changes (
require_admin, Gunicorn module, validation details).
Activity
refactor!: use FOCA 0.18 features (#338)