open-cluster-management-io / addon-framework

addon apis
Apache License 2.0
23 stars 40 forks source link

:bug: Fix condition error of ManifestApplied. #273

Closed xuezhaojun closed 5 months ago

xuezhaojun commented 5 months ago

Summary

This PR is related to the https://github.com/open-cluster-management-io/addon-framework/pull/268

It turns out Manifests will always return objects, it's BuildDeployWorks to decide whether the objects is match to the current mode.

And this time I tested with a self-build image on the test env.

xuezhaojun commented 5 months ago

/assign @qiujian16 /assign @zhujian7

qiujian16 commented 5 months ago

could you add an integration test on this?

xuezhaojun commented 5 months ago

could you add an integration test on this?

@qiujian16 It turns out there are there are u-t cases that are related to this, I've the condition check step here.

qiujian16 commented 5 months ago

could you also add some check in this https://github.com/open-cluster-management-io/addon-framework/blob/main/test/integration/kube/agent_hosting_deploy_test.go?

xuezhaojun commented 5 months ago

could you also add some check in this https://github.com/open-cluster-management-io/addon-framework/blob/main/test/integration/kube/agent_hosting_deploy_test.go?

Sure, check steps added.

qiujian16 commented 5 months ago

@morvencao do you know when ce test failed?

xuezhaojun commented 5 months ago

@qiujian16 e2e flake passed, please take another look.

qiujian16 commented 5 months ago

/approve /lgtm

openshift-ci[bot] commented 5 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiujian16, xuezhaojun

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/open-cluster-management-io/addon-framework/blob/main/OWNERS)~~ [qiujian16] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
qiujian16 commented 5 months ago

/cherry-pick release-0.9

openshift-cherrypick-robot commented 5 months ago

@qiujian16: once the present PR merges, I will cherry-pick it on top of release-0.9 in a new PR and assign it to you.

In response to [this](https://github.com/open-cluster-management-io/addon-framework/pull/273#issuecomment-2145206362): >/cherry-pick release-0.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.
openshift-cherrypick-robot commented 5 months ago

@qiujian16: #273 failed to apply on top of branch "release-0.9":

Applying: Fix condition error of ManifestApplied.
Using index info to reconstruct a base tree...
M   pkg/addonmanager/controllers/agentdeploy/controller.go
M   pkg/addonmanager/controllers/agentdeploy/hosted_sync_test.go
A   test/integration/cloudevents/agent_hosting_deploy_test.go
Falling back to patching base and 3-way merge...
Auto-merging test/integration/agent_hosting_deploy_test.go
Auto-merging pkg/addonmanager/controllers/agentdeploy/hosted_sync_test.go
Auto-merging pkg/addonmanager/controllers/agentdeploy/controller.go
CONFLICT (content): Merge conflict in pkg/addonmanager/controllers/agentdeploy/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 Fix condition error of ManifestApplied.
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/open-cluster-management-io/addon-framework/pull/273#issuecomment-2145206362): >/cherry-pick release-0.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.