Repository navigation
feat(oci): Governance Rules in the Cloud Explorer - #478
Conversation
Lists the governance rules of a parent tenancy with their type, state and creation time, and shows the inclusion criteria and tenancy attachments of a rule. Read only, and the console says that Floci-OCI enforces only ALLOWED_REGIONS rules. Closes #442
[Medium impact] The change adds a read-only governance view for OCI tenancy operators. The PR appears safe to merge, with a non-blocking gap in refreshing and retrying the child tables. Findings
|
| const pages = useQueries({ | ||
| queries: cursors.map((cursor) => ({ | ||
| queryKey: ['oci-governance', accountId, rule, collection, cursor], | ||
| queryFn: ({signal}: {signal: AbortSignal}) => listCollectionItems('oci', 'governance', rule, collection, cursor, signal), | ||
| enabled: runtimeReachable, | ||
| })), |
There was a problem hiding this comment.
The page's Refresh button reloads the rules and inspector but leaves these child queries untouched. If a later page fails, next becomes null and Load more disappears, with no retry control. Users must leave and return or wait for an automatic retry. Wire these queries into Refresh, or add a control that retries them and resets paging.
Summary
Adds OCI Governance Rules to the Cloud Explorer as its own row under Provisioning, next to Organizations. It lists the rules of the tenancy with type, state and creation time, and a rule's inspector shows its template. A read only panel lists the inclusion criteria and the tenancy attachments of the selected rule, through the generic child collection store. A standing notice says that Floci-OCI enforces ALLOWED_REGIONS rules only, and the panel repeats it for QUOTA and TAG rules. It is a separate row because the API version, the root resource and the child collections differ from Organizations. Closes #442
Type of change
fix:)feat:)feat!:orfix!:)Area
packages/frontend)packages/api)Verification
OCI Governance Rules against Floci-OCI. A fresh runtime lists empty. With an ALLOWED_REGIONS, a QUOTA and a TAG rule, an inclusion criterion for all children and one for a child tenancy, and an attached child, the list, search and inspect match the runtime responses, and the two child collections match too. A deleted rule shows as DELETED. A bad id is a 400, a missing rule or collection a 404, create and delete a 501. The empty and populated views were rendered in the browser with no console errors. Type-check, tests, build and lint pass.
Checklist
pnpm lint,pnpm type-check,pnpm test, andpnpm buildpass locallybun testinpackages/api)