Skip to content

Migrate runtime service registry metadata #2041

Description

@josecelano

Goal

Migrate Registar registrations to carry canonical tracker service role, configuration-instance identity, and final listener binding metadata. Make this metadata queryable without running a health check or depending on bind-IP conventions.

Background

Issue #2036 now owns canonical tracker identity types only. This issue owns the dependent migration of torrust-server-lib registration metadata and tracker registrations after #2035 propagates that identity through actual bootstrap.

This migration is required before #2039 can use canonical runtime identity for event-metrics policy filtering. It also replaces #1419's temporary bind-IP classification and fixed registration delay.

Scope

  • Extend torrust-server-lib::ServiceRegistration with generic immutable metadata and optional health behavior.
  • Publish and upgrade a compatible torrust-server-lib release.
  • Carry canonical role and configuration-instance identity into all tracker service registrations.
  • Provide deterministic, side-effect-free registry queries and registration readiness.
  • Preserve health-check response compatibility.
  • Replace Allow multiple integration tests at the main app level #1419 bind-IP classification and fixed startup delay.

Prerequisites

Implementation outline

  1. Define generic registration metadata boundary.
  2. Extend registration/query/readiness API.
  3. Release and upgrade standalone server library.
  4. Migrate tracker registrations and health reporting.
  5. Replace Allow multiple integration tests at the main app level #1419 endpoint discovery helpers.
  6. Add tests and progressive manual baseline/post-change evidence.

Acceptance criteria

  • Registrations expose final binding and opaque metadata without network health checks.
  • Tracker registrations carry canonical role and configuration-instance identity.
  • Registry queries are deterministic and readiness is testable.
  • Health-check JSON stays compatible.
  • Allow multiple integration tests at the main app level #1419 discovers endpoints by role/identity without bind-IP conventions or fixed delay.
  • Port-zero/repeated configuration blocks retain identity.
  • Both repository validation suites and manual verification pass.

Related to #1419, #2035, #2036, and #2039.

See docs/issues/drafts/migrate-runtime-service-registry-metadata/ISSUE.md until the specification PR merges.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions