Skip to content

feat: serve service info from config #314

Closed

Description

@uniqueg

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?

  1. Add a config model for the static service info, validated against the GA4GH Service schema (service-info v1.0.0), in a top-level config section.
  2. Provide a controller that apps reference for GET /service-info in their specs, which builds the response from:
    • the config section;
    • version from 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.
  3. 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.
  4. 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-info from 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

  1. added this to the v0.15.0 milestone on Oct 20, 2026
  2. uniqueg commented on Oct 20, 2026

    @uniqueg
    MemberAuthor

    Note from elixir-cloud-aai/cloud-registry#100, which implements the config-only approach first: createdAt and updatedAt are optional in the config and omitted from the response if not set (both are optional in the GA4GH Service schema). Suggest the same default here.

  3. added a commit that references this issue on Oct 20, 2026
    b42d0f1
  4. uniqueg commented on Oct 20, 2026

    @uniqueg
    MemberAuthor

    Implemented in #318 (merged into dev).

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions