Claim snippet_id and organization_id for Cells
What does this MR do and why?
This MR registers two additional Cells claims so the Topology Service can enforce global uniqueness of these identifiers across cells:
- Snippets —
Snippetnow includesCells::Claimableand claims itsid(newSNIPPET_IDSbucket), with the owning organization as the claim subject. - Organizations —
Organizationnow claims itsid(newORGANIZATION_IDSbucket) in addition to the existingpathclaim.
References
- Feature issue:
- Docs on how to claim an attribute: https://docs.gitlab.com/development/cells/claims/#how-to-claim-attributes
How to set up and validate locally
-
Enable the feature flags in the Rails console:
Feature.enable(:cells_claims_snippets) Feature.enable(:cells_claims_organizations) -
Create a snippet and an organization (UI or console).
-
Confirm that creating/updating/destroying these records triggers the corresponding claim create/destroy calls to the Topology Service (via the
after_save/before_destroyhooks inCells::Claimable), and that no claims are attempted when the flags are disabled.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.
Edited by Marco Gregorius