Skip to content

fix: address the issue work applier has after disabling parallelism + add more log entries#1100

Merged
ryanzhang-oss merged 5 commits intoAzure:mainfrom
michaelawyu:fix/applier-parallelism
Mar 27, 2025
Merged

fix: address the issue work applier has after disabling parallelism + add more log entries#1100
ryanzhang-oss merged 5 commits intoAzure:mainfrom
michaelawyu:fix/applier-parallelism

Conversation

@michaelawyu
Copy link
Copy Markdown
Contributor

@michaelawyu michaelawyu commented Mar 26, 2025

Description of your changes

This PR fixes the bug where the work applier would stop processing manifests if one of them fails the pre-processing stage.

Fixes #

I have:

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

How has this code been tested

  • Integration tests
  • E2E tests

Special notes for your reviewer

Comment thread pkg/controllers/workapplier/process.go
@michaelawyu
Copy link
Copy Markdown
Contributor Author

Side note: additional test cases will be added in a separate PR, to control PR size.

@michaelawyu michaelawyu force-pushed the fix/applier-parallelism branch from 761be5f to f3736c5 Compare March 27, 2025 04:13
@michaelawyu michaelawyu changed the title fix: address the issue work applier has after disabling parallelism + minor adjustments to make things more defensive in the work applier fix: address the issue work applier has after disabling parallelism Mar 27, 2025
nsUnstructured *unstructured.Unstructured
nsJSON []byte

configMap = &corev1.ConfigMap{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

where is this used?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi Ryan! This is used for the newly added decoding error test; for negative cases configMaps are a bit easier to handle than deployments.

Comment thread test/e2e/placement_negative_cases_test.go Outdated
Comment thread test/e2e/placement_negative_cases_test.go Outdated
Comment thread pkg/controllers/workapplier/controller_integration_test.go
@michaelawyu michaelawyu changed the title fix: address the issue work applier has after disabling parallelism fix: address the issue work applier has after disabling parallelism + add more log entries Mar 27, 2025
Copy link
Copy Markdown
Contributor

@zhiying-lin zhiying-lin left a comment

Choose a reason for hiding this comment

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

i thought this PR is fixing applying duplicate resources. Can we create a CRP to select duplicate ns to make sure it's working as expected?

Comment thread pkg/controllers/workapplier/process.go
Comment thread pkg/controllers/workapplier/status.go Outdated
Comment thread pkg/controllers/workapplier/controller_integration_test.go Outdated
@michaelawyu
Copy link
Copy Markdown
Contributor Author

i thought this PR is fixing applying duplicate resources. Can we create a CRP to select duplicate ns to make sure it's working as expected?

Hi Zhiying! Yeah, there might be a misunderstanding here; the bug wasn't about duplicated resources specifically, it's that any pre-processing failure would trigger the work applier to stop processing remaining manifests after parallelism is removed.

@ryanzhang-oss ryanzhang-oss merged commit 9d202c7 into Azure:main Mar 27, 2025
16 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.

3 participants