Skip to content

switch to map list for OlmConfig GroupKind - #542

Merged
openshift-merge-bot[bot] merged 1 commit into
operator-framework:masterfrom
grokspawn:listtype-map-for-enableapis
Nov 20, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
operator-framework:masterfrom
grokspawn:listtype-map-for-enableapis

Conversation

@grokspawn

@grokspawn grokspawn commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

We found a warning with the earlier OlmConfig implementation, so have shifted to list-type:map with all struct fields as the key.

The warning was:

I1119 13:55:01.437096   58207 warnings.go:110] "Warning: x-kubernetes-list-type: set for items of type \"object\" is not supported by server-side apply or CEL validation rules"

Summary by CodeRabbit

  • Updates
    • Enabled API entries are now treated as map-style items keyed by API group and kind, rather than as a set. Existing field names and format remain unchanged. This updates how entries are represented in the configuration schema.

Signed-off-by: grokspawn <jkeister@redhat.com>
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The EnableAPIs Go declaration and OLMConfig CRD schema now define enableAPIs as a map list keyed by group and kind. The embedded CRD asset was regenerated.

Changes: OLMConfig API list keys

Layer / File(s) Summary
Update the enableAPIs list contract
pkg/operators/v1/olmconfig_types.go, crds/operators.coreos.com_olmconfigs.yaml, crds/zz_defs.go
The Go declaration and CRD schema define enableAPIs as a map list keyed by group and kind. The embedded CRD asset was regenerated.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Feature

Possibly related PRs

Suggested reviewers: tmshort, camilamacedo86

Merge Risk: Minimal · up to 9b180

This change redefines the OLMConfig enableAPIs list as a map list keyed by group and kind, and the embedded CRD asset was regenerated to match. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "switch to map list for OlmConfig GroupKind" matches the main change. The PR changes the enableAPIs list type from set to map, keyed by group and kind, in the OlmConfig CRD schema, the gener…
Full details: Title check

Explanation

The title "switch to map list for OlmConfig GroupKind" matches the main change. The PR changes the enableAPIs list type from set to map, keyed by group and kind, in the OlmConfig CRD schema, the generated embedded asset, and the Go type. The title names the list-type change and the GroupKind key, so it describes the primary change. The title does not mention the CEL enforcement purpose, which is a minor omission and does not make the title misleading.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: f6888e27-1c02-4b76-a500-1adbc379c18e
Commits

Reviewing files that changed from the base of the PR and between dd8d5c3 and 9b180cb.

Files selected for processing: 3

  • crds/operators.coreos.com_olmconfigs.yaml
  • crds/zz_defs.go
  • pkg/operators/v1/olmconfig_types.go

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@codecov

codecov Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 22.27%. Comparing base (dd8d5c3) to head (9b180cb).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #542   +/-   ##
=======================================
  Coverage   22.27%   22.27%           
=======================================
  Files          60       60           
  Lines        7893     7893           
=======================================
  Hits         1758     1758           
  Misses       5983     5983           
  Partials      152      152           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tmshort

tmshort commented Nov 20, 2026

Copy link
Copy Markdown
Member

/approve
/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Nov 20, 2026
@openshift-ci

openshift-ci Bot commented Nov 20, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tmshort

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 20, 2026
@grokspawn grokspawn changed the title switch to map list for CEL enforcement switch to map list for OlmConfig GroupKind Nov 20, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit 94b3dac into operator-framework:master Nov 20, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants