Skip to content

feat(quota): add Feature to ResourceRegistration type enum#594

Merged
kevwilliams merged 4 commits into
mainfrom
feat/quota-feature-registration-type
May 5, 2026
Merged

feat(quota): add Feature to ResourceRegistration type enum#594
kevwilliams merged 4 commits into
mainfrom
feat/quota-feature-registration-type

Conversation

@kevwilliams
Copy link
Copy Markdown
Contributor

Summary

  • Adds Feature as a valid value for spec.type on ResourceRegistration, alongside the existing Entity and Allocation values
  • Feature is a boolean entitlement grant for org-level feature flags — no admission enforcement or claim machinery is used; the registration simply signals that a feature is available to an organization
  • Regenerates the CRD YAML (quota.miloapis.com_resourceregistrations.yaml) so the new enum value is enforced at the API level
  • Adds a Chainsaw test step (create-valid-feature-registration) to verify that type=Feature is accepted and the registration reaches Active=True

No controller logic branches on spec.type — grep confirms zero usages of registration.Spec.Type in internal/quota/. This is a schema/validation-only change. The field is immutable after creation (CEL rule already in place).

Closes #575
Related: datum-cloud/enhancements#695

Test plan

  • task generate:code runs cleanly and Feature appears in config/crd/bases/quota/quota.miloapis.com_resourceregistrations.yaml enum
  • Chainsaw test create-valid-feature-registration passes: creates a ResourceRegistration with type: Feature and waits for Active=True
  • Existing Chainsaw tests (test-invalid-type-enum, immutability tests, etc.) continue to pass
  • Attempting to create a registration with an invalid type still returns an error mentioning spec.type

Add `Feature` as a valid value for `spec.type` on ResourceRegistration.
Feature is a boolean entitlement grant used for org-level feature flags —
no admission enforcement or claim machinery is involved. Regenerate CRD
YAML and add a Chainsaw test step to verify type=Feature is accepted and
reaches Active=True.

Closes #575
@joggrbot

This comment has been minimized.

## ✨ Autofixed 2 outdated doc(s)

This pull was automatically generated by Joggr to fix 2 outdated doc(s)
due to code changes in pull #594

### Fixed docs

The following docs were fixed:

- `docs/api/quota.md`: The documentation was outdated because it omitted
the newly-added 'Feature' type for resource registration, which is now a
valid registration type with unique semantics. All locations describing
valid types, measurement types, or the table entry were updated to
include a clear explanation of Feature and its behavior.
- `test/quota/registration-validation/README.md`: Documentation is
outdated because a significant validation scenario—the creation and
validation of a 'Feature' type ResourceRegistration—was added to tests
and type enums but was not reflected in the test case matrix or steps in
the README. I've inserted this missing scenario in both the test listing
and detailed test description sections.

### How to fix

To fix the docs, you can either:

1. Merge this pull request into your pull request to fix the docs
2. Wait for your pull request to be merged and then merge this pull
request into your base branch

---

Powered by
[Joggr](https://joggr.ai?utm_source=gh&utm_medium=gh&utm_campaign=ghapr&utm_id=ghapr)
- The documentation assistant for your codebase.
@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented May 4, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ kevwilliams
❌ joggrbot[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

🤖 Automatically added newlines to 1 file(s)

Co-Authored-By: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

🤖 I automatically added missing newlines at the end of 1 file(s) in this PR.

All files should now end with a newline character as per coding standards.

@kevwilliams kevwilliams requested a review from scotwells May 4, 2026 23:41
@kevwilliams kevwilliams merged commit 2e53e7e into main May 5, 2026
3 of 4 checks passed
@kevwilliams kevwilliams deleted the feat/quota-feature-registration-type branch May 5, 2026 17:15
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.

feat(quota): add Feature to ResourceRegistration type enum

2 participants