openshift / assisted-service

Apache License 2.0
109 stars 209 forks source link

MGMT-18560: Fix AutomatedCleaningMode behavior #6662

Closed CrystalChun closed 1 month ago

CrystalChun commented 1 month ago

AutomatedCleaningMode should not be used when the converged flow is disabled since it requires IPA which is only enabled when the converged flow is enabled.

Caused by regression in PR https://github.com/openshift/assisted-service/pull/5319 which relies on users to set the automatedCleaningMode spec, but did not take into account the converged flow being disabled.

List all the issues related to this PR

What environments does this code impact?

How was this code tested?

Checklist

Reviewers Checklist

/cc @carbonin @eranco74

openshift-ci-robot commented 1 month ago

@CrystalChun: This pull request references MGMT-18560 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.17.0" version, but no target version was set.

In response to [this](https://github.com/openshift/assisted-service/pull/6662): >AutomatedCleaningMode should not be used when the >converged flow is disabled since it requires IPA >which is only enabled when the converged flow is enabled. > >Caused by regression in PR >https://github.com/openshift/assisted-service/pull/5319 which relies on users to set the automatedCleaningMode spec, but did not take into account the converged flow being disabled. > > > >## List all the issues related to this PR > >- [ ] New Feature >- [ ] Enhancement >- [x] Bug fix >- [ ] Tests >- [ ] Documentation >- [ ] CI/CD > >## What environments does this code impact? > >- [ ] Automation (CI, tools, etc) >- [ ] Cloud >- [x] Operator Managed Deployments >- [ ] None > >## How was this code tested? > > > >- [ ] assisted-test-infra environment >- [ ] dev-scripts environment >- [ ] Reviewer's test appreciated >- [x] Waiting for CI to do a full test run >- [ ] Manual (Elaborate on how it was tested) >- [ ] No tests needed > >## Checklist > >- [x] Title and description added to both, commit and PR. >- [x] Relevant issues have been associated (see [CONTRIBUTING] guide) >- [x] This change does not require a documentation update (docstring, `docs`, README, etc) >- [x] Does this change include unit-tests (note that code changes require unit-tests) > >## Reviewers Checklist > >- Are the title and description (in both PR and commit) meaningful and clear? >- Is there a bug required (and linked) for this change? >- Should this PR be backported? > >[Kubernetes community documentation]: https://github.com/kubernetes/community/blob/master/contributors/guide/pull-requests.md#commit-message-guidelines >[CONTRIBUTING]: https://github.com/openshift/assisted-service/blob/master/CONTRIBUTING.md > >/cc @carbonin @eranco74 Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fassisted-service). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 68.56%. Comparing base (1f7cce3) to head (8a91724). Report is 1 commits behind head on master.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/openshift/assisted-service/pull/6662/graphs/tree.svg?width=650&height=150&src=pr&token=YOR4NSSOXQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift)](https://app.codecov.io/gh/openshift/assisted-service/pull/6662?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift) ```diff @@ Coverage Diff @@ ## master #6662 +/- ## ========================================== - Coverage 68.56% 68.56% -0.01% ========================================== Files 246 246 Lines 36770 36773 +3 ========================================== + Hits 25213 25214 +1 - Misses 9316 9317 +1 - Partials 2241 2242 +1 ``` | [Files](https://app.codecov.io/gh/openshift/assisted-service/pull/6662?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift) | Coverage Δ | | |---|---|---| | [...nal/controller/controllers/bmh\_agent\_controller.go](https://app.codecov.io/gh/openshift/assisted-service/pull/6662?src=pr&el=tree&filepath=internal%2Fcontroller%2Fcontrollers%2Fbmh_agent_controller.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift#diff-aW50ZXJuYWwvY29udHJvbGxlci9jb250cm9sbGVycy9ibWhfYWdlbnRfY29udHJvbGxlci5nbw==) | `76.69% <100.00%> (+0.07%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/openshift/assisted-service/pull/6662/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openshift)
openshift-ci[bot] commented 1 month ago

@CrystalChun: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
openshift-ci[bot] commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: carbonin, CrystalChun

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

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/openshift/assisted-service/blob/master/OWNERS)~~ [CrystalChun,carbonin] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
CrystalChun commented 1 month ago

/cherrypick release-ocm-2.10 release-ocm-2.9

openshift-cherrypick-robot commented 1 month ago

@CrystalChun: new pull request created: #6668

In response to [this](https://github.com/openshift/assisted-service/pull/6662#issuecomment-2284728400): >/cherrypick release-ocm-2.10 release-ocm-2.9 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
CrystalChun commented 1 month ago

/cherrypick release-ocm-2.9

openshift-cherrypick-robot commented 1 month ago

@CrystalChun: #6662 failed to apply on top of branch "release-ocm-2.9":

Applying: MGMT-18560: Fix AutomatedCleaningMode behavior
Using index info to reconstruct a base tree...
M   internal/controller/controllers/bmh_agent_controller.go
M   internal/controller/controllers/bmh_agent_controller_test.go
Falling back to patching base and 3-way merge...
Auto-merging internal/controller/controllers/bmh_agent_controller_test.go
CONFLICT (content): Merge conflict in internal/controller/controllers/bmh_agent_controller_test.go
Auto-merging internal/controller/controllers/bmh_agent_controller.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 MGMT-18560: Fix AutomatedCleaningMode behavior
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
In response to [this](https://github.com/openshift/assisted-service/pull/6662#issuecomment-2284794418): >/cherrypick release-ocm-2.9 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
CrystalChun commented 1 month ago

/cherrypick release-ocm-2.11

openshift-cherrypick-robot commented 1 month ago

@CrystalChun: new pull request created: #6669

In response to [this](https://github.com/openshift/assisted-service/pull/6662#issuecomment-2284835112): >/cherrypick release-ocm-2.11 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.