-
Notifications
You must be signed in to change notification settings - Fork 454
Closed
Labels
Description
Description
All doctl registry subcommands (repository list-v2, repository list-manifests, repository delete-manifest, etc.) fail with an opaque 412 error when the account has multiple container registries, even though the --registry flag is documented as "optional."
This appears to be a server-side API change — these commands previously worked without --registry. There was no deprecation notice, changelog entry, or doctl release noting this breaking change.
Steps to Reproduce
- Have a DigitalOcean account with multiple container registries
- Run any registry command without
--registry:
doctl registry repository list-v2 --output jsonExpected Behavior
Either:
- A clear CLI-level error message like:
Error: multiple registries found. Please specify one with --registry <name>. Available: reg1, reg2 - Or the command prompts the user to select a registry
Actual Behavior
Raw API error passed through:
{
"errors": [
{
"detail": "failed to get registry: GET https://api.digitalocean.com/v2/registry: 412 (request \"...\") This API is not supported if you have created multiple registries. Please use '/v2/registries/{registry_name}' instead. Refer to https://docs.digitalocean.com/reference/api/digitalocean/#tag/Container-Registry for more info."
}
]
}Suggested Fix
- Detect multi-registry accounts in doctl and surface a user-friendly error with available registry names
- Update the
--registryflag description — it's not truly "optional" for multi-registry accounts - Document this as a breaking change for users who previously had a single registry and later created a second one
Environment
doctlversion: 1.151.0 (also reproduced with 1.141.0 viadigitalocean/action-doctl@v2)- Affected commands:
registry get,registry repository list-v2,registry repository list-manifests,registry repository delete-manifest,registry garbage-collection start
Impact
This silently broke CI/CD pipelines (GitHub Actions cron jobs) that were using doctl registry commands without --registry. The workaround is to add --registry <name> to every command (or positional arg for garbage-collection start).
Reactions are currently unavailable