Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix bugs in the resource controller #2126

Merged

Conversation

davidfestal
Copy link
Member

@davidfestal davidfestal commented Oct 4, 2022

Signed-off-by: David Festal dfestal@redhat.com

Summary

This PR fixes several bugs in the resource controller:

  • We should not add the RequestState label to Sync for a SyncTarget when the namespace already has the deletion annotation for this SyncTarget. It doesn't make sense to start syncing a resource to a SyncTarget while the intent already expressed on the namespace is to delete all resources from this SyncTarget
  • Additional small fixes in the resource computePlacement function.

See the individual commits for more information

Related issue(s)

Bugs spotted while debugging the Syncer Virtual Transformations e2e test

@openshift-ci openshift-ci bot requested review from stevekuznetsov and sttts October 4, 2022 14:05
@davidfestal davidfestal requested a review from jmprusi October 4, 2022 14:22
@sttts
Copy link
Member

sttts commented Oct 4, 2022

Needs better commit message.

Are these two changes or one?

@sttts
Copy link
Member

sttts commented Oct 4, 2022

or three? :)

@davidfestal davidfestal force-pushed the fix-resource-controller branch from 64572d6 to fdf9025 Compare October 4, 2022 15:50
Signed-off-by: David Festal <dfestal@redhat.com>
@davidfestal davidfestal force-pushed the fix-resource-controller branch from fdf9025 to 0279660 Compare October 4, 2022 16:06
Signed-off-by: David Festal <dfestal@redhat.com>
@davidfestal davidfestal force-pushed the fix-resource-controller branch from 08a9dde to 70bd648 Compare October 5, 2022 08:16
@sttts
Copy link
Member

sttts commented Oct 5, 2022

Some nits about better go docs. Don't document the obvious. Document more high level what the loops do instead of every line.

/lgtm
/approve

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Oct 5, 2022
@davidfestal davidfestal force-pushed the fix-resource-controller branch from 70bd648 to 8075087 Compare October 5, 2022 08:53
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 5, 2022
@davidfestal davidfestal force-pushed the fix-resource-controller branch from 8075087 to 6c92e5f Compare October 5, 2022 09:02
Signed-off-by: David Festal <dfestal@redhat.com>
@davidfestal davidfestal force-pushed the fix-resource-controller branch from 6c92e5f to 98f149d Compare October 5, 2022 09:04
@sttts
Copy link
Member

sttts commented Oct 5, 2022

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 5, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 5, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sttts

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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 1774bc6 into kcp-dev:main Oct 5, 2022
@kasturinarra
Copy link
Contributor

@davidfestal is there any thing for QE to validate here ? Any user facing change or functionality impact that we need to look at ? thanks !!

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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants