Skip to content

feat: let admins change a service's ID #243

Closed

Description

@uniqueg

Why?

Service IDs can't be changed. PUT /services/{serviceId} with a new ID registers a second service, so renaming one means registering it again and deleting the old one. That loses everything stored under the old ID:

  • the roles of users and groups (owners, maintainers);
  • the verification;
  • createdAt.

Between the two requests, both services exist, and if the second request fails, both stay.

What?

  • An admin-only operation that changes the ID of a service, e.g. POST /services/{serviceId}/rename with the new ID in the body (name and shape to be settled in the PR).
  • It moves everything stored under the old ID to the new one: the service document (including createdAt and the verification), the role policies and the stored user names.
  • No point in time at which both IDs exist, and no state with only part of the data moved:
    • MongoDB transactions need a replica set; today's deployments (Compose, Helm chart) run a standalone MongoDB. Either make transactions a requirement (and document it), or find an order of operations that is safe without them (e.g. the old ID answers 404 or 409 while the move runs, and a failed move is rolled back or resumed).
  • 409 if the new ID is taken, 404 if the old one doesn't exist, 400 for an invalid ID.
  • Logged like the other admin actions.

Acceptance criteria

  • After a rename, the service, its roles, its verification and createdAt are only reachable under the new ID.
  • A failed or concurrent rename never leaves both IDs, or a service without its roles.
  • Tests cover success, the error codes and a failure in the middle of the move.

A follow-up in cloud-registry-ui will let admins edit the ID in the edit form once this exists. Until then the UI shows the ID read-only.

Activity

  1. added
    priority: low
    status: triage
    type: feature
    workload: days
    on Oct 25, 2026
  2. added
    status: in progress
    and removed
    status: triage
    on Oct 26, 2026
  3. removed
    status: in progress
    on Oct 26, 2026
  4. 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: lowtype: featureworkload: days

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions