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: failed placement change need to trigger work generator copy to binding #879

Merged
merged 4 commits into from
Jul 17, 2024

Conversation

ryanzhang-oss
Copy link
Contributor

@ryanzhang-oss ryanzhang-oss commented Jul 11, 2024

Description of your changes

  • fix the case that the failed placement in the work has changed but it's not propagated to the binding by the work generator.
  • Also remove the periodically check in the CRP controller as the binding will be updated which means the binding watcher also needs to check the failed placement
  • Move some common string to common

I have:

  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

Special notes for your reviewer

Verified that both the new e2e and integration test failed without the fix.

@ryanzhang-oss ryanzhang-oss marked this pull request as draft July 11, 2024 18:24
@ryanzhang-oss ryanzhang-oss marked this pull request as ready for review July 11, 2024 22:12
pkg/controllers/workgenerator/controller.go Outdated Show resolved Hide resolved
pkg/utils/condition/condition.go Outdated Show resolved Hide resolved
test/e2e/enveloped_object_placement_test.go Show resolved Hide resolved
pkg/utils/common.go Show resolved Hide resolved
michaelawyu
michaelawyu previously approved these changes Jul 17, 2024
Copy link
Contributor

@michaelawyu michaelawyu left a comment

Choose a reason for hiding this comment

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

LGTM ;) Added some nits.

for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
got := IsFailedResourcePlacementsEqual(tc.old, tc.new)
if diff := cmp.Diff(tc.want, got); diff != "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Also a nit, but since the diff is just comparing two bool values, it might be better to just use a equality check here

test/e2e/rollout_test.go Show resolved Hide resolved
@ryanzhang-oss ryanzhang-oss merged commit d9fc197 into Azure:main Jul 17, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants