Skip to content

fix: keep probes independent of the database #267

Closed

Description

@uniqueg

Found in the pre-release review of 0.6.0.

#262 registers resume_renames_periodically() (cloud_registry/ga4gh/registry/rename.py) as a before_request hook of the whole app (cloud_registry/app.py). At most every 10 seconds per worker, it queries the service_locks collection, without catching database errors. So the probe path (/ga4gh/registry/v1/ui/, also the image's HEALTHCHECK), the spec and GET /service-info now depend on MongoDB:

  • While MongoDB is unreachable (e.g., the bundled pod restarts during helm upgrade, or a failover), the first request in a worker after the interval waits for pymongo's server selection timeout (30 seconds) and then returns 500.
  • Probes time out after 5 seconds (the HEALTHCHECK after 4), so they may fail and the pod may be restarted. Before feat: let admins change a service's ID #262, the UI and /service-info kept working.
  • The chart README (Probes) says the probe path "needs neither authentication nor the database", which is no longer true.

Proposal

  • Resume interrupted renames only before requests to the registry's own operations, not before the Swagger UI, the spec, /service-info or FOCA's admin API.
  • Catch database errors (PyMongoError) in the hook: log them and continue the request; the next interval tries again.
  • Check for stale locks with a short timeout, so that API requests don't wait 30 seconds for the check.
  • Keep the probe text in deployment/README.md accurate.
  • Regression tests: the hook failing with ServerSelectionTimeoutError still lets /ui/, the spec and /service-info return 200; API requests still resume renames.

Activity

  1. added
    priority: high
    status: in progress
    type: bug
    workload: hours
    and removed on Oct 28, 2026
  2. removed
    status: in progress
    on Oct 28, 2026
  3. added this to the v0.6.0 milestone on Oct 28, 2026
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: hightype: bugworkload: hours

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions