Skip to content

feat(oci): Governance Rules in the Cloud Explorer - #478

Merged
fredpena merged 1 commit into
mainfrom
dev/442-oci-governance-rules
Nov 21, 2026
Merged

fredpena merged 1 commit into
mainfrom
dev/442-oci-governance-rules

Conversation

@fredpena

Copy link
Copy Markdown
Contributor

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

  • Bug fix (fix:)
  • New feature / service UI (feat:)
  • Breaking change (feat!: or fix!:)
  • Docs / chore

Area

  • Frontend (packages/frontend)
  • API / Cloud Proxy (packages/api)
  • Cloud Explorer adapter / schema
  • Build / CI / Docker

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, and pnpm build pass locally
  • New or updated tests added where it makes sense (bun test in packages/api)
  • No fake/mock data added — unwired states stay empty or show an explicit placeholder
  • Commit messages / PR title follow Conventional Commits
  • Layout or look-and-feel changes close an issue that came from an accepted Discussion (UI and Design Changes), or this PR has none (new services through the existing views, bug fixes that restore the intended layout, and accessibility fixes are exempt)
  • I have no more than 2 open, non-draft pull requests and no more than 4 open pull requests in total (drafts included) in this repository (maintainers and dependency bots are exempt).

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
@fredpena
fredpena requested a review from hectorvent as a code owner November 21, 2026 02:18
@greptile-apps

greptile-apps Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[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

  1. P2 Child tables cannot reload ▶

Summary

Adds read-only OCI Governance Rules to Cloud Explorer under Provisioning.

  • OCI Governance Rules appear in the Cloud Explorer.
  • Selected governance rules show their child-tenancy details.

The child tables need a manual refresh or retry control.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Explorer[Cloud Explorer] --> Adapter[OCI Governance adapter]
  Adapter --> Rules[Governance Rules API]
  Explorer --> Panel[Selected rule panel]
  Panel --> Collections[Shared child collection API]
  Collections --> Adapter
  Adapter --> Criteria[Inclusion criteria API]
  Adapter --> Attachments[Tenancy attachments API]
Loading

Reviews (1) · Last reviewed commit: "feat(oci): Governance Rules in the Cloud..." · Reviewed by Greptile

Comment on lines +79 to +84
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,
})),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Child tables cannot reload

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.

@fredpena
fredpena merged commit a64da62 into main Nov 21, 2026
8 checks passed
@fredpena
fredpena deleted the dev/442-oci-governance-rules branch November 21, 2026 17:08
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(oci): Governance Rules in the Cloud Explorer

1 participant