open-cluster-management-io / addon-framework

addon apis
Apache License 2.0
23 stars 40 forks source link

:warning: check return err for customized agent install namespace #257

Closed zhujian7 closed 7 months ago

zhujian7 commented 7 months ago

Summary

This PR changes the RegistrationOption interface: from

AgentInstallNamespace func(addon *addonapiv1alpha1.ManagedClusterAddOn) string

to

AgentInstallNamespace func(addon *addonapiv1alpha1.ManagedClusterAddOn) (string, error)

we need this error info to determine whether the namespace is empty or an error occurred.

Related issue(s)

Fixes #

zhujian7 commented 7 months ago

/hold

zhujian7 commented 7 months ago

/assign @qiujian16 /unhold

openshift-ci[bot] commented 7 months ago

[APPROVALNOTIFIER] This PR is APPROVED

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

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,zhujian7] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
qiujian16 commented 7 months ago

/cherrypick release-0.9

openshift-cherrypick-robot commented 7 months ago

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

Applying: check return err for customized agent install namespace
Using index info to reconstruct a base tree...
M   pkg/addonfactory/addonfactory.go
M   pkg/addonfactory/helm_agentaddon.go
M   pkg/addonfactory/template_agentaddon.go
M   pkg/agent/inteface.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/agent/inteface.go
Auto-merging pkg/addonfactory/template_agentaddon.go
Auto-merging pkg/addonfactory/helm_agentaddon.go
CONFLICT (content): Merge conflict in pkg/addonfactory/helm_agentaddon.go
Auto-merging pkg/addonfactory/addonfactory.go
CONFLICT (content): Merge conflict in pkg/addonfactory/addonfactory.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 check return err for customized agent install namespace
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/257#issuecomment-2050849389): >/cherrypick 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/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.