Repository navigation
Description
Why?
Every GA4GH API defines GET /service-info, and the FOCA-based apps of ELIXIR Cloud & AAI each implement it themselves. cloud-registry, proWES, TRS-Filer and DRS-Filer also add their own POST /service-info, which stores the service info in MongoDB next to the one in the config. Two sources of truth need precedence rules (which one is served, and whether a restart resets a posted one); cloud-registry needed several fixes for this (elixir-cloud-aai/cloud-registry#75, elixir-cloud-aai/cloud-registry#96).
Service info is deployment metadata. When apps are deployed declaratively (Helm, GitOps), it belongs in the versioned config, and changes are rolled out with the deployment. A writable endpoint lets the database drift from the config. Some fields are not editorial at all: version is a fact about the installed package, and some APIs have fields that are computed at runtime (e.g., WES system_state_counts, supported workflow engines).
How?
- Add a config model for the static service info, validated against the GA4GH
Serviceschema (service-info v1.0.0), in a top-level config section. - Provide a controller that apps reference for
GET /service-infoin their specs, which builds the response from:- the config section;
versionfrom the app's package metadata unless set in the config;- an optional, app-provided callable (configured by dotted path) whose result is merged in, for fields computed at runtime.
- No database and no write endpoint by default. If a runtime write turns out to be needed, add it later as
PUT /service-info(replacing the single resource), restricted to admins and disabled by default, with documented precedence over the config. - Document the pattern and how to migrate an app (remove its own controller and
POST /service-info).
To decide during implementation: how createdAt and updatedAt are set without a database (e.g., from the config, which a Helm chart can set at release time, or omitted; both are optional in the GA4GH schema).
Acceptance criteria
- An app gets a valid
GET /service-infofrom configuration only, without code of its own. - An invalid service info config fails at startup with a clear error.
- Runtime fields from the app's callable appear in the response.
- Tests and documentation, including a migration guide.
Related: elixir-cloud-aai/cloud-registry implements the config-only approach first (elixir-cloud-aai/cloud-registry#100), designed so that it can move here.
Activity
uniqueg commentedon Oct 20, 2026
Note from elixir-cloud-aai/cloud-registry#100, which implements the config-only approach first:
createdAtandupdatedAtare optional in the config and omitted from the response if not set (both are optional in the GA4GHServiceschema). Suggest the same default here.feat!: serve service info from config (#318)
uniqueg commentedon Oct 20, 2026
Implemented in #318 (merged into
dev).