revert(rulesets): drop the provider-uncreatable CodeRabbit required-check ruleset#75
Conversation
…heck ruleset Reverts #74. The merged OrganizationRuleset failed to reconcile on-cluster: create failed: async create failed: recovered from panic: interface conversion: interface {} is nil, not bool Root cause: terraform-provider-github v6.6.0 (bundled in provider-upjet-github v0.19.1) expands required_status_checks via `requiredStatusMap["do_not_enforce_on_create"].(bool)` (respository_rules_utils.go:343), but v0.19.1's CRD does not expose `doNotEnforceOnCreate`, so the key is nil at runtime → nil.(bool) panics. The field can't be set from the CR to avoid it, and v0.19.1 is the latest release, so no `required_status_checks` ruleset is provider-creatable today. The strict server dry-run that validated #74 only checks the CRD schema, never the provider/GitHub API, so it could not catch this. The CR never created a GitHub ruleset (external-name is null), so nothing is orphaned and no merges are gated. README documents the limitation; the CodeRabbit gate must stay UI-created + Observe-imported (like the existing "Require status checks to pass") until the provider is fixed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughRemoves the ChangesRevert CodeRabbit required-status-checks org ruleset
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
The revert #75 (dropping the panic-on-create CodeRabbit ruleset) merged to main but semantic-release reported "no release": the default release rules cover feat/fix/perf but not the `revert` type, so the deploy/ change was never published — the github-config OCI artifact stayed at v1.8.0 (which still contains the broken ruleset) and the failing OrganizationRuleset CR was never pruned. Add a commit-analyzer releaseRule mapping `revert` -> patch so revert commits cut a release (and reach the cluster). This `fix:` commit itself triggers the patch that republishes current main — with #75's removal already applied. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Reverts #74 — the merged
OrganizationRulesetfails to reconcile on-cluster, and cannot be made to work with the current provider.Symptom
(
OrganizationRuleset/github-config/require-status-checks-coderabbit-review, panic loop every ~60s.)Root cause
terraform-provider-githubv6.6.0 (bundled inprovider-upjet-githubv0.19.1) expands therequired_status_checksrule with an unchecked assertion —respository_rules_utils.go:343:But v0.19.1's CRD does not expose
doNotEnforceOnCreate(verified: absent from the live CRD), so the key isnilat runtime →nil.(bool)panics. The field can't be set from the CR to avoid the nil, v0.19.1 is the latest release, and the same shared code path meansRepositoryRulesetwould panic too. So norequired_status_checksruleset is provider-creatable today — which is why every existing status-check ruleset here is UI-created + Observe-imported.The strict server-side dry-run that validated #74 only checks the CRD schema, never the provider/GitHub API, so it could not catch a runtime panic in the Terraform layer.
Impact / safety
The CR never created a GitHub ruleset (
external-nameis null), so nothing is orphaned and no merges are or were gated — the CodeRabbit check is not currently enforced. This revert restores a clean, greendeploy/reconcile.Path forward (the CodeRabbit gate still needs a home)
Because the provider can't create required-status-check rulesets, the requirement must be UI-created + Observe-imported, exactly like the existing "Require status checks to pass" ruleset. Recommended: add the
CodeRabbitcontext (pinned to app347564) to that existing ruleset in the UI — it's already Observe-imported here, so no new resource is needed and nothing would drift. I can also file the upstream provider bug. README now documents this limitation so it isn't retried.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Documentation