Skip to content

[release-4.22] OCPBUGS-85704: fix(api): add missing has() guards to servingCerts CEL validation rule#8526

Open
openshift-cherrypick-robot wants to merge 2 commits into
openshift:release-4.22from
openshift-cherrypick-robot:cherry-pick-8331-to-release-4.22
Open

[release-4.22] OCPBUGS-85704: fix(api): add missing has() guards to servingCerts CEL validation rule#8526
openshift-cherrypick-robot wants to merge 2 commits into
openshift:release-4.22from
openshift-cherrypick-robot:cherry-pick-8331-to-release-4.22

Conversation

@openshift-cherrypick-robot

Copy link
Copy Markdown

This is an automated cherry-pick of #8331

/assign rutvik23

rutvik23 added 2 commits May 15, 2026 08:57
  The CEL rule validating that APIServer loadBalancer hostname is not in
  servingCerts namedCertificates fails with "no such key" when
  servingCerts or namedCertificates are not set. This adds has() guards
  for servingCerts, namedCertificates, and cert.names fields to prevent
  the error.

  Fixes: OCPBUGS-77827
  Signed-off-by: rutvik23 <rkshirsa@redhat.com>
Add two additional envtest cases to exercise each has() guard
added in the servingCerts CEL validation fix:

- servingCerts present but no namedCertificates: exercises
  has(self.configuration.apiServer.servingCerts.namedCertificates)
- namedCertificates entry with no names field: exercises
  has(cert.names)

Signed-off-by: rutvik23 <rkshirsa@redhat.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 84dfb77e-0727-4f8d-9b0d-5a6ee7c90b8f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot requested review from bryan-cox and devguyio May 15, 2026 08:58
@openshift-ci openshift-ci Bot added area/api Indicates the PR includes changes for the API area/cli Indicates the PR includes changes for CLI and removed do-not-merge/needs-area labels May 15, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-cherrypick-robot: Jira Issue OCPBUGS-77827 has been cloned as Jira Issue OCPBUGS-85704. Will retitle bug to link to clone.
/retitle [release-4.22] OCPBUGS-85704: fix(api): add missing has() guards to servingCerts CEL validation rule

Details

In response to this:

This is an automated cherry-pick of #8331

/assign rutvik23

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot changed the title [release-4.22] OCPBUGS-77827: fix(api): add missing has() guards to servingCerts CEL validation rule [release-4.22] OCPBUGS-85704: fix(api): add missing has() guards to servingCerts CEL validation rule May 15, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels May 15, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@openshift-cherrypick-robot: This pull request references Jira Issue OCPBUGS-85704, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.
  • expected dependent Jira Issue OCPBUGS-77827 to target a version in 5.0.0, but it targets "5.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

This is an automated cherry-pick of #8331

/assign rutvik23

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci

openshift-ci Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@codecov

codecov Bot commented May 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 34.79%. Comparing base (cf680a5) to head (4066159).
⚠️ Report is 27 commits behind head on release-4.22.

Additional details and impacted files
@@              Coverage Diff              @@
##           release-4.22    #8526   +/-   ##
=============================================
  Coverage         34.79%   34.79%           
=============================================
  Files               767      767           
  Lines             93445    93445           
=============================================
  Hits              32511    32511           
  Misses            58255    58255           
  Partials           2679     2679           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JoelSpeed

Copy link
Copy Markdown
Contributor

/approve

For API

@openshift-ci

openshift-ci Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: JoelSpeed, openshift-cherrypick-robot
Once this PR has been reviewed and has the lgtm label, please assign enxebre for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Stale PRs are closed after 21d of inactivity.

If this PR is still relevant, comment to refresh it or remove the stale label.
Mark the PR as fresh by commenting /remove-lifecycle stale.

If this PR is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci Bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api Indicates the PR includes changes for the API area/cli Indicates the PR includes changes for CLI jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/severity-low Referenced Jira bug's severity is low for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants