Skip to content

Update validation checks#5056

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
psalajova:fix-validation
Apr 1, 2026
Merged

Update validation checks#5056
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
psalajova:fix-validation

Conversation

@psalajova
Copy link
Copy Markdown
Contributor

No description provided.

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d201d883-2eff-4d36-8e26-aedb09d10472

📥 Commits

Reviewing files that changed from the base of the PR and between b1071de and 74e5a8d.

📒 Files selected for processing (2)
  • pkg/validation/test.go
  • pkg/validation/test_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/validation/test.go

Walkthrough

Added duplicate-source detection to credential validation: checks for identical non-empty Bundle values and identical (Namespace, Name) pairs across credentials, emitting errors and skipping further pair checks. Tests were updated and expanded to cover these duplicate scenarios and valid combinations.

Changes

Cohort / File(s) Summary
Validation Logic
pkg/validation/test.go
Extended validateCredentials to detect duplicate credential sources: error when two entries share the same non-empty Bundle, or when two entries have the same non-empty (Namespace, Name), and skip further collision checks for that pair.
Test Cases
pkg/validation/test_test.go
Modified existing credential test inputs (Name values) and added new cases asserting errors for duplicate Bundle values and duplicate (Namespace, Name) pairs, plus cases asserting valid behavior for different bundles and mixed credential types.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

✨ 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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 27, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pkg/validation/test.go`:
- Around line 848-859: The bundle-duplicate check is incorrectly wrapped by a
Namespace presence guard; update the logic so that if credential.Bundle != ""
and other.Bundle != "" and credential.Bundle == other.Bundle you always append
the same error (using the existing error message pattern that references
fieldRoot, i, index, credential.Bundle) regardless of credential.Namespace or
other.Namespace, and keep the existing secret-name duplicate check
(credential.Name/Namespace) separate; also add a regression test that creates
two credentials with empty Namespace and identical Bundle values to assert the
duplicate-bundle validation error is produced (target the same validation
function where credential.Bundle/other.Bundle are compared).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f8aa00a3-313b-4b33-aadf-f0a734c65922

📥 Commits

Reviewing files that changed from the base of the PR and between 6280ffc and b1071de.

📒 Files selected for processing (2)
  • pkg/validation/test.go
  • pkg/validation/test_test.go

@psalajova
Copy link
Copy Markdown
Contributor Author

the checkconfig job is correctly failing (those credentials are duplicated), so after openshift/release#76976 merges it should be ok

@psalajova
Copy link
Copy Markdown
Contributor Author

/test checkconfig

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e

@psalajova
Copy link
Copy Markdown
Contributor Author

/cc @openshift/test-platform

@openshift-ci openshift-ci bot requested a review from a team March 30, 2026 07:38
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 30, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 30, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Prucek, psalajova

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-robot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 715c3b8 and 2 for PR HEAD 74e5a8d in total

@psalajova
Copy link
Copy Markdown
Contributor Author

/override ci/prow/images

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 30, 2026

@psalajova: Overrode contexts on behalf of psalajova: ci/prow/images

Details

In response to this:

/override ci/prow/images

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.

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 489209d and 1 for PR HEAD 74e5a8d in total

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 5442cf5 and 0 for PR HEAD 74e5a8d in total

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

/hold

Revision 74e5a8d was retested 3 times: holding

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 31, 2026
@psalajova
Copy link
Copy Markdown
Contributor Author

/test images

@psalajova
Copy link
Copy Markdown
Contributor Author

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 31, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 7043768 and 2 for PR HEAD 74e5a8d in total

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 1, 2026

@psalajova: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/breaking-changes 74e5a8d link false /test breaking-changes

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.

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD ced59e4 and 1 for PR HEAD 74e5a8d in total

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage.

@openshift-merge-bot openshift-merge-bot bot merged commit 258547f into openshift:main Apr 1, 2026
14 of 15 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.

3 participants