Skip to content

refactor!: use FOCA 0.18 features #331

Closed

Description

@uniqueg

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):

  1. Dependency: foca>=0.18.0,<0.19; base image elixircloud/foca:0.18.0-py3.13, pinned by digest; image requirements and release pin checks follow.
  2. 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 mapped detail are updated;
    • get_enforcer() removed: use locked_enforcer() where proTES or its tests use the enforcer;
    • group settings that cannot apply (group_mapping without claim_groups) are FOCA startup errors now.
  3. Use FOCA's features instead of proTES's copies (as Cloud Registry did):
    • require_admin moves from custom.access_control.require_admin to security.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() becomes foca.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.py goes if FOCA's foca.gunicorn_config has 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 by foca.get_custom_config(CustomConfig) where it works (also in Celery tasks; keep a thin wrapper otherwise).
  4. 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_admin key 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

  1. added
    priority: high
    status: in progress
    type flag: breaking change
    type: maintenance
    workload: days
    on Oct 28, 2026
  2. added a commit that references this issue on Oct 29, 2026
    183dd5b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: highstatus: in progresstype flag: breaking changetype: maintenanceworkload: days

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions