Skip to content

config: add ExperimentalConfig for OU delete#186

Merged
Prabhjot-Sethi merged 1 commit into
go-core-stack:mainfrom
dev-arya23:issue-180-experimental-config
Jun 27, 2026
Merged

config: add ExperimentalConfig for OU delete#186
Prabhjot-Sethi merged 1 commit into
go-core-stack:mainfrom
dev-arya23:issue-180-experimental-config

Conversation

@dev-arya23

Copy link
Copy Markdown
Contributor

Summary

Adds experimental configuration block to enable and control org-unit soft-delete behavior (issue #180):

  • ExperimentalConfig struct with two fields:
    • allow_ou_delete (bool) — feature flag to enable OU deletion; when false (default), existing 501 Unimplemented behavior is preserved
    • hold_deleted_ou (int, seconds) — duration to retain a soft-deleted OU before the reconciler hard-deletes it
  • Wired into BaseConfig with yaml:"experimental,omitempty" tag — YAML parsing picks it up automatically via the existing yaml.NewDecoder flow
  • GetExperimental() getter — follows the same accessor pattern as GetResourceAliases()
  • default.yaml updated with commented-out example showing both fields

Design decisions

Decision Rationale
Value type struct (not pointer) Zero value is safe default — AllowOUDelete: false, HoldDeletedOU: 0 — no nil checks needed
No WithDefaults() method Unlike RateLimitsConfig, there are no non-zero defaults to apply; zero values mean "disabled"
int for hold duration (not time.Duration) Matches issue spec; seconds granularity is sufficient for hold periods

Default behavior

When experimental is absent from the config file, ExperimentalConfig zero-initializes to {AllowOUDelete: false, HoldDeletedOU: 0} — deletion remains unimplemented, no behavior change for existing deployments.

Closes #180

Add ExperimentalConfig struct with:
- allow_ou_delete (bool) — feature flag to enable OU deletion
- hold_deleted_ou (int, seconds) — hold period before hard-delete

Wire into BaseConfig and YAML parsing. Default behavior unchanged
when config is absent (deletion remains unimplemented).

Closes go-core-stack#180
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@dev-arya23, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 28 minutes and 7 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a2538ed0-a118-477f-9caf-bda6af95285d

📥 Commits

Reviewing files that changed from the base of the PR and between 6272f10 and 3559a3e.

📒 Files selected for processing (2)
  • default.yaml
  • pkg/config/config.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Prabhjot-Sethi Prabhjot-Sethi merged commit 5dbf366 into go-core-stack:main Jun 27, 2026
1 of 2 checks passed
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.

Config: add ExperimentalConfig for OU delete

2 participants