Skip to content

feat: add cre registry limits command - #637

Closed
j-nowak wants to merge 2 commits into
mainfrom
feat/registry-quotas-list
Closed

j-nowak wants to merge 2 commits into
mainfrom
feat/registry-quotas-list

Conversation

@j-nowak

@j-nowak j-nowak commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Adds cre registry limits as a separate view for registry quotas. cre registry list is unchanged — it stays the simple, context-only command it was before, with no GraphQL call.

Behaviour

  • Reads registry labels and IDs from the cached tenant context, but fetches registryQuotas live on every run: quotas change as workflows deploy, so they must not be cached.
  • Joins on-chain quotas by chain selector, not ID: the CLI uses onchain:<chain name> while the API returns the bare chain name.
  • Private-registry families render as 1 / 3 used 2 remaining; a disabled family with active workflows renders 4 / 0 used no headroom and is never hidden. remaining is clamped at zero.
  • On-chain registries show the linked-owner quota, then the on-chain workflow count and limit per linked owner.
  • A partial response (owners: null after a chain failure) keeps the available data and prints a warning; the command still exits successfully.
  • A missing platform:limits:read fails the command, since limits are its entire purpose.

Tests

cmd/registry/limits/limits_test.go covers the chain-selector join, private-registry rendering, the gated family, the partial-response warning, missing permission, no registries, and an empty quota response.

go build ./... and go test ./cmd/registry/... pass. Docs are regenerated with make gendoc (docs/cre_registry_limits.md, plus the new subcommand entry in docs/cre_registry.md).


Jira: DEVSVCS-7106

@j-nowak
j-nowak force-pushed the feat/registry-quotas-list branch 4 times, most recently from 5accc71 to a8d4b0c Compare November 20, 2026 09:36
Adds a dedicated registry limits view instead of extending cre registry list with GraphQL quota fetches. The command reads the registries from the cached tenant context for labels and IDs, fetches registryQuotas live, and joins on-chain quotas by chain selector rather than the CLI's onchain:<name> ID.

Disabled families with active workflows render as no headroom, remaining is clamped at zero, and a partial owners response keeps the available data and warns. A missing platform:limits:read permission fails the command, since limits are its entire purpose.
@j-nowak
j-nowak force-pushed the feat/registry-quotas-list branch from a8d4b0c to 860bea7 Compare November 20, 2026 09:49
@j-nowak j-nowak changed the title feat: show registry quotas in cre registry list feat: add cre registry limits command Nov 20, 2026
Drop registryId from the registryQuotas query and require both the chain selector and address when matching on-chain registries.
@j-nowak j-nowak closed this Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant