Skip to content

OCPBUGS-99903: Fixing test issue where error result was for other resource type - #1524

Open
vr4manta wants to merge 2 commits into
openshift:mainfrom
vr4manta:OCPBUGS-99903
Open

OCPBUGS-99903: Fixing test issue where error result was for other resource type#1524
vr4manta wants to merge 2 commits into
openshift:mainfrom
vr4manta:OCPBUGS-99903

Conversation

@vr4manta

@vr4manta vr4manta commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

OCPBUGS-99903

Changes

  • Fixed jobs to accept any other VAP error.

Summary by CodeRabbit

  • Tests
    • Updated end-to-end coverage for vSphere failure-domain removal denial/success using dry-run polling helpers with a bounded attempt timeout.
    • Improved error-text assertions to tolerate non-deterministic denial messages by accepting multiple possible blocking resource types.
    • Adjusted test sequencing to wait for denial readiness before applying live denied updates, and to wait for success readiness before applying live succeeding updates.
    • Enhanced failure diagnostics to include exclusivity context where applicable.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 27, 2026
@openshift-ci

openshift-ci Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Jul 27, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@vr4manta: This pull request references Jira Issue OCPBUGS-99903, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

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

Details

In response to this:

OCPBUGS-99903

Changes

  • Fixed jobs to accept any other VAP error.

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.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 41620c55-d126-4607-a812-31cef11a12ac

📥 Commits

Reviewing files that changed from the base of the PR and between 1cd51f0 and 8a0b932.

📒 Files selected for processing (1)
  • test/e2e/vsphere/failure_domain_vap.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/e2e/vsphere/failure_domain_vap.go

Walkthrough

The vSphere end-to-end tests now poll dry-run Infrastructure updates before selected live updates, synchronize denied and successful failure-domain removal checks, and accept non-deterministic reference errors from Machine, MachineSet, or ControlPlaneMachineSet resources.

Changes

vSphere failure-domain validation

Layer / File(s) Summary
Dry-run Infrastructure polling helpers
test/e2e/vsphere/failure_domain_vap.go
Adds a per-attempt timeout and helpers that poll until Infrastructure updates are denied or failure-domain removal succeeds.
Failure-domain removal assertions
test/e2e/vsphere/failure_domain_vap.go
Uses dry-run synchronization before live updates, removes exclusivity-based branching, and accepts denial messages naming Machine, MachineSet, or ControlPlaneMachineSet; diagnostics include exclusive.

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

Suggested reviewers: mdbooth

Sequence Diagram(s)

sequenceDiagram
  participant E2ETest
  participant InfrastructureAPI
  participant InfrastructureVAP
  E2ETest->>InfrastructureAPI: Submit dry-run update
  InfrastructureAPI->>InfrastructureVAP: Validate failure-domain removal
  InfrastructureVAP-->>InfrastructureAPI: Deny or allow update
  InfrastructureAPI-->>E2ETest: Return validation result
  E2ETest->>InfrastructureAPI: Submit synchronized live update
Loading
🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is clearly related to the test update and captures the core issue of unexpected resource-type-specific error results.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Stable And Deterministic Test Names ✅ Passed All Ginkgo titles in the changed file are static string literals; no fmt.Sprintf, concatenation, or runtime-generated values appear in test names.
Test Structure And Quality ✅ Passed The changed e2e tests are single-purpose, use BeforeEach/DeferCleanup for setup and cleanup, and all new cluster waits are bounded with explicit timeouts.
Microshift Test Compatibility ✅ Passed All new/modified Ginkgo tests in the file are tagged [apigroup:machine.openshift.io], which MicroShift auto-skips; no extra MicroShift guard is needed.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The changed vSphere e2e tests use zero-replica MachineSets and API-only checks; they skip when required resources are absent and make no multi-node/SNO-unsafe assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed Only test/e2e/vsphere/failure_domain_vap.go changed; no manifests, operators, or controllers, so no scheduling assumptions were introduced.
Ote Binary Stdout Contract ✅ Passed Touched file is a Ginkgo spec file; no main/TestMain/suite setup or stdout writes (fmt.Print/klog/log.SetOutput to stdout) were added.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No IPv4 literals, host/IP parsing, or external URLs found; the new tests only use cluster APIs and internal MachineSet/Infrastructure resources.
No-Weak-Crypto ✅ Passed The only changed file is an e2e test helper/assertion update; it adds no crypto imports or weak-crypto primitives/comparisons.
Container-Privileges ✅ Passed Changed file is test logic only; no privileged, hostPID/hostNetwork/hostIPC, SYS_ADMIN, allowPrivilegeEscalation, or root settings found.
No-Sensitive-Data-In-Logs ✅ Passed No new logs expose passwords, tokens, PII, or hostnames; only test status messages and non-sensitive resource names/FD labels are logged.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions


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

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@vr4manta: This pull request references Jira Issue OCPBUGS-99903, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)
Details

In response to this:

OCPBUGS-99903

Changes

  • Fixed jobs to accept any other VAP error.

Summary by CodeRabbit

  • Tests
  • Updated end-to-end validation for vSphere failure-domain removal errors.
  • Tests now accept valid variations in blocking-resource messages caused by evaluation order.
  • Improved diagnostic messaging for failure-domain reference scenarios.

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.

@vr4manta

Copy link
Copy Markdown
Contributor Author

/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-rhcos10-techpreview-serial
/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-rhcos9-techpreview-serial
/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-serial-rhcos9-techpreview
/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-techpreview-serial
/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-zones-techpreview-serial

@openshift-ci

openshift-ci Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

@vr4manta: trigger 5 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-rhcos10-techpreview-serial
  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-rhcos9-techpreview-serial
  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-serial-rhcos9-techpreview
  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-techpreview-serial
  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-zones-techpreview-serial

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/afde40d0-89cf-11f1-84fa-63d7986a1b2b-0

@vr4manta
vr4manta marked this pull request as ready for review July 28, 2026 11:23
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 28, 2026
@openshift-ci
openshift-ci Bot requested review from damdo and mdbooth July 28, 2026 11:23
@vr4manta

Copy link
Copy Markdown
Contributor Author

/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-rhcos10-techpreview-serial
/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-rhcos9-techpreview-serial
/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-serial-rhcos9-techpreview
/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-techpreview-serial
/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-zones-techpreview-serial

@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@vr4manta: trigger 5 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-rhcos10-techpreview-serial
  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-rhcos9-techpreview-serial
  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-serial-rhcos9-techpreview
  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-techpreview-serial
  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-zones-techpreview-serial

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/78648070-8a82-11f1-88c3-9b1991469a41-0

@vr4manta

Copy link
Copy Markdown
Contributor Author

Previous payload-job tests did not hit the issue. Failures were from other tests. Rerunning in hopes of some green.

@vr4manta

Copy link
Copy Markdown
Contributor Author

/assign @damdo
Ready for review

@jcpowermac

Copy link
Copy Markdown
Contributor

/lgtm

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

@damdo damdo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/approve

@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: damdo

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 Jul 28, 2026
@vr4manta

Copy link
Copy Markdown
Contributor Author

@openshift-ci openshift-ci Bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 28, 2026
@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

New changes are detected. LGTM label has been removed.

@vr4manta

Copy link
Copy Markdown
Contributor Author

/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-rhcos10-techpreview-serial
/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-rhcos9-techpreview-serial
/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-serial-rhcos9-techpreview
/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-techpreview-serial
/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-zones-techpreview-serial

@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@vr4manta: trigger 5 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-rhcos10-techpreview-serial
  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-rhcos9-techpreview-serial
  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-serial-rhcos9-techpreview
  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-techpreview-serial
  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-zones-techpreview-serial

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/1bdeab00-8ab4-11f1-96c6-0731cd0e5156-0

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/e2e/vsphere/failure_domain_vap.go`:
- Line 569: After deleting the MachineSet in the test flow, add a dry-run update
poll that waits for the VAP cache to accept the update before proceeding. Then
refetch the Infrastructure and pass that fresh object to the live update,
replacing the current direct waitForInfraUpdateToBeDenied call’s stale-object
path while preserving the existing post-deletion assertions.
- Around line 255-266: Update waitForInfraUpdateToBeDenied so its polling
callback succeeds only when the dry-run Update returns an admission denial
identified by apierrors.IsInvalid(err) or apierrors.IsForbidden(err), rather
than any error. Use a per-attempt timeout context for each
Infrastructures().Update call so Eventually can regain control when an attempt
blocks, while preserving the existing polling timeout and denial assertion.
🪄 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: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 25772021-e49b-4bb4-8042-878749d54b05

📥 Commits

Reviewing files that changed from the base of the PR and between 4d7a443 and 902fcb7.

📒 Files selected for processing (1)
  • test/e2e/vsphere/failure_domain_vap.go

Comment thread test/e2e/vsphere/failure_domain_vap.go Outdated
Comment thread test/e2e/vsphere/failure_domain_vap.go

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/e2e/vsphere/failure_domain_vap.go`:
- Around line 281-289: Update waitForInfraUpdateToSucceed so each polling
attempt creates a bounded context with a per-request timeout and uses it for
both Infrastructures().Get and Infrastructures().Update. Follow the existing
deny-path pattern, ensuring stalled API calls cannot outlive vapTestWaitTimeout
while preserving the current retry behavior.
🪄 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: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 26089f02-9570-4c4d-9747-cb493920b6df

📥 Commits

Reviewing files that changed from the base of the PR and between 902fcb7 and 1cd51f0.

📒 Files selected for processing (1)
  • test/e2e/vsphere/failure_domain_vap.go

Comment thread test/e2e/vsphere/failure_domain_vap.go
@vr4manta

Copy link
Copy Markdown
Contributor Author

/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-rhcos10-techpreview-serial
/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-rhcos9-techpreview-serial
/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-serial-rhcos9-techpreview
/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-techpreview-serial
/payload-job periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-zones-techpreview-serial

@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

@vr4manta: trigger 5 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-rhcos10-techpreview-serial
  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-rhcos9-techpreview-serial
  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-serial-rhcos9-techpreview
  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-techpreview-serial
  • periodic-ci-openshift-release-main-nightly-5.0-e2e-vsphere-ovn-zones-techpreview-serial

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/034444d0-8ab7-11f1-9a4e-b735348bca4c-0

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. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants