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

🐛Syncer namespace cleanup refactor #2374

Conversation

jmprusi
Copy link
Member

@jmprusi jmprusi commented Nov 16, 2022

Summary

Refactor how the syncer handles the deletion of downstream namespaces.

  • Removes the upstream namespace controller from syncer.
  • Fixes an incorrect use of indexes.
  • Surface the syncer --downstream-namespace-clean-delay flag and set it to 2s for tests.
  • Fixes an incorrect annotation removal on a test.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 16, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 16, 2022

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@davidfestal
Copy link
Member

/test all

@jmprusi jmprusi force-pushed the jmprusi/syncer-namespace-fix-missing-index branch from 169c9c8 to 0fbb67b Compare November 16, 2022 18:22
@davidfestal davidfestal marked this pull request as ready for review November 16, 2022 21:00
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 16, 2022
@davidfestal davidfestal self-requested a review November 16, 2022 21:02
@jmprusi jmprusi force-pushed the jmprusi/syncer-namespace-fix-missing-index branch from 56ae1aa to 9dfa2cc Compare November 17, 2022 10:06
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 17, 2022
@davidfestal
Copy link
Member

/test e2e-sharded

Copy link
Member Author

@jmprusi jmprusi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jmprusi jmprusi force-pushed the jmprusi/syncer-namespace-fix-missing-index branch from 29ca135 to 0c557cd Compare November 17, 2022 13:00
@jmprusi jmprusi force-pushed the jmprusi/syncer-namespace-fix-missing-index branch 3 times, most recently from 8e292c3 to 7c250c6 Compare November 17, 2022 14:05
@jmprusi jmprusi changed the title WIP Fixes for downstream namespace clean 🐛Syncer namespace controller index fixes Nov 17, 2022
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 17, 2022
@jmprusi jmprusi force-pushed the jmprusi/syncer-namespace-fix-missing-index branch 4 times, most recently from f1bb8d8 to f4d8dcc Compare November 17, 2022 16:20
@@ -466,3 +463,11 @@ func getAllGVRs(synctarget *workloadv1alpha1.SyncTarget) map[schema.GroupVersion

return gvrs
}

func IndexByNamespace(obj interface{}) ([]string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please use the upstream index.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! done!

@ncdc ncdc added the area/transparent-multi-cluster Related to scheduling of workloads into pclusters. label Nov 17, 2022
@jmprusi jmprusi force-pushed the jmprusi/syncer-namespace-fix-missing-index branch 2 times, most recently from 186ecc4 to c368f96 Compare November 17, 2022 19:36
@jmprusi jmprusi force-pushed the jmprusi/syncer-namespace-fix-missing-index branch 2 times, most recently from eb92474 to 5a3d31c Compare November 17, 2022 20:16
@jmprusi jmprusi changed the title 🐛Syncer namespace controller index fixes 🐛Syncer namespace cleanup refactor Nov 17, 2022
@davidfestal
Copy link
Member

/test e2e-sharded
/test e2e-shared

@jmprusi jmprusi force-pushed the jmprusi/syncer-namespace-fix-missing-index branch from 5a3d31c to b415bc4 Compare November 17, 2022 20:43
@davidfestal
Copy link
Member

/test e2e-sharded
/test e2e-shared

1 similar comment
@davidfestal
Copy link
Member

/test e2e-sharded
/test e2e-shared

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

openshift-ci bot commented Nov 17, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidfestal

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 17, 2022
@openshift-merge-robot openshift-merge-robot merged commit 93888e4 into kcp-dev:main Nov 17, 2022
@jmprusi jmprusi deleted the jmprusi/syncer-namespace-fix-missing-index branch November 17, 2022 23:23
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. area/transparent-multi-cluster Related to scheduling of workloads into pclusters. 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