Skip to content

NO-JIRA: Fix 2 failures in ci jobs#485

Open
sunzhaohua2 wants to merge 2 commits intoopenshift:mainfrom
sunzhaohua2:fix-secret-issue
Open

NO-JIRA: Fix 2 failures in ci jobs#485
sunzhaohua2 wants to merge 2 commits intoopenshift:mainfrom
sunzhaohua2:fix-secret-issue

Conversation

@sunzhaohua2
Copy link
Contributor

@sunzhaohua2 sunzhaohua2 commented Mar 3, 2026

The first error:
2026-03-02T09:31:33Z AWSMachine/machine-auth-capi-58g4d Warning FailedGetBootstrapData failed to retrieve bootstrap data secret for AWSMachine openshift-cluster-api/machine-auth-capi-58g4d: Secret "master...

Changed to use worker-user-data.

The second error:

11:51:47 MachineSet/zhsun-33-6c24v-worker-us-east-2a  SuccessfulAdopt   Adopted Machine "machine-vap-capi-forbidden-nztfj"
11:51:47 MachineSet/zhsun-33-6c24v-worker-us-east-2a  SuccessfulDelete  Deleted machine "machine-vap-capi-forbidden-nztfj"

Deleted machine.openshift.io/cluster-api-machineset label to prevent test Machines from being adopted and deleted by MachineSet controllers.

Summary by CodeRabbit

  • Bug Fixes

    • Corrected label selection logic for machine node identification.
    • Prevented unintended MachineSet adoption through label cleanup during machine cloning.
  • Improvements

    • Enhanced test handling for missing machine references with explicit skip messages.
    • Updated bootstrap data configuration for worker machine creation.

@openshift-ci-robot
Copy link

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: LGTM mode

@sunzhaohua2 sunzhaohua2 changed the title Fix 2 failures in ci jobs NO-JIRA: Fix 2 failures in ci jobs Mar 3, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 41e59f4 and ff17838.

📒 Files selected for processing (1)
  • e2e/machine_migration_helpers.go

📝 Walkthrough

Walkthrough

The pull request modifies the machine migration helper to change CAPI machine selection from identifying non-control-plane machines to explicitly selecting worker-labeled machines. It updates error handling, sets bootstrap data configuration, and implements label cleanup to prevent unintended MachineSet adoption.

Changes

Cohort / File(s) Summary
Machine Migration Logic
e2e/machine_migration_helpers.go
Updated CAPI machine selection to use worker node label existence check instead of control-plane label non-existence check. Changed behavior to skip test when no worker machines exist rather than fail. Added bootstrap data secret configuration and MAPI label cleanup to prevent MachineSet adoption via spec labels.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 A rabbit hops through machine migrations,
Selecting workers with precision,
Bootstrap secrets tucked away,
Labels cleaned, no more adoption sway,
Tests skip gracefully when none appear.

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'NO-JIRA: Fix 2 failures in ci jobs' is generic and vague. While it indicates the PR addresses CI failures, it doesn't specify what was actually fixed or the nature of the changes (bootstrap secret configuration and MachineSet label handling). Consider a more descriptive title that captures the main changes, such as 'Fix AWSMachine bootstrap secret and prevent test Machine adoption by MachineSet' to help reviewers understand the key fixes at a glance.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.5.0)

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

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Mar 3, 2026
@openshift-ci-robot
Copy link

@sunzhaohua2: This pull request explicitly references no jira issue.

Details

In response to this:

The first error:
2026-03-02T09:31:33Z AWSMachine/machine-auth-capi-58g4d Warning FailedGetBootstrapData failed to retrieve bootstrap data secret for AWSMachine openshift-cluster-api/machine-auth-capi-58g4d: Secret "master...

Changed to use worker-user-data.

The second error:

11:51:47 MachineSet/zhsun-33-6c24v-worker-us-east-2a  SuccessfulAdopt   Adopted Machine "machine-vap-capi-forbidden-nztfj"
11:51:47 MachineSet/zhsun-33-6c24v-worker-us-east-2a  SuccessfulDelete  Deleted machine "machine-vap-capi-forbidden-nztfj"

Deleted machine.openshift.io/cluster-api-machineset label to prevent test Machines from being adopted and deleted by MachineSet controllers.

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 requested review from damdo and theobarberbany March 3, 2026 06:10
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 3, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign damdo 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

@sunzhaohua2
Copy link
Contributor Author

/retest

1 similar comment
@sunzhaohua2
Copy link
Contributor Author

/retest

@theobarberbany
Copy link
Contributor

Aha! Nice to see this getting fixed :) Was the additional event data added on failure useful?

e.g:

[openshift-cluster-api] Events (last 10min, 1):
  2026-03-02T09:31:33Z AWSMachine/machine-auth-capi-58g4d Warning  FailedGetBootstrapData failed to retrieve bootstrap data secret for AWSMachine openshift-cluster-api/machine-auth-capi-58g4d: Secret "master...

/retest

@sunzhaohua2
Copy link
Contributor Author

Aha! Nice to see this getting fixed :) Was the additional event data added on failure useful?

Yes! Super useful, it makes debug easier. Thanks you!

@theobarberbany
Copy link
Contributor

/retest

@sunzhaohua2
Copy link
Contributor Author

/test images

@sunzhaohua2
Copy link
Contributor Author

/test ci/prow/e2e-aws-capi-techpreview

@sunzhaohua2
Copy link
Contributor Author

/test e2e-aws-capi-techpreview

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Mar 4, 2026

@sunzhaohua2: 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants