Skip to content

✨ Manifest completion #1033

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

Merged

Conversation

bhperry
Copy link
Contributor

@bhperry bhperry commented Jun 11, 2025

Summary

  • Ignore updates to manifests that have the Complete condition
  • Aggregate the Complete condition from manifests to ManifestWork
    • Any manifest with a Complete condition rule is completable
    • Once all completable manifests within a work are complete, the work is considered complete
  • Ignore updates to ManifestWork that has the Complete condition
  • Delete ManifestWork that has Complete condition and TTLSecondsAfterFinished delete option if the TTL since completion has been satisfied

Related issue(s)

open-cluster-management-io/api#378
open-cluster-management-io/enhancements#139
#842

Summary by CodeRabbit

  • New Features
    • Improved aggregation and management of manifest conditions with enhanced condition rule evaluation and pruning.
    • Added support for marking ManifestWork resources as complete based on manifest conditions.
  • Bug Fixes
    • Prevented unnecessary reconciliation of completed ManifestWork resources.
    • Avoided reapplying manifests already marked as complete.
  • Refactor
    • Modularized condition evaluation and aggregation for clearer lifecycle management.
    • Updated test setup and validation for better condition handling and extensibility.
  • Tests
    • Expanded condition rule tests, including aggregation and condition removal scenarios.
    • Centralized condition validation in test utilities for consistent error reporting.
    • Added integration tests for ManifestWork completion based on condition rules.
    • Enhanced ManagedCluster importer tests to wait for namespace creation.
  • Chores
    • Enabled passing additional runtime arguments to integration tests via Makefile.

@openshift-ci openshift-ci bot requested review from skeeey and zhiweiyin318 June 11, 2025 22:07
Copy link

codecov bot commented Jun 11, 2025

Codecov Report

Attention: Patch coverage is 17.03704% with 112 lines in your changes missing coverage. Please review.

Project coverage is 62.68%. Comparing base (7924226) to head (9b537c2).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pkg/work/spoke/conditions/helpers.go 0.00% 98 Missing ⚠️
pkg/work/helper/helpers.go 0.00% 8 Missing ⚠️
...lers/manifestcontroller/manifestwork_reconciler.go 33.33% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1033      +/-   ##
==========================================
- Coverage   63.08%   62.68%   -0.41%     
==========================================
  Files         208      209       +1     
  Lines       20520    20595      +75     
==========================================
- Hits        12945    12909      -36     
- Misses       6469     6579     +110     
- Partials     1106     1107       +1     
Flag Coverage Δ
unit 62.68% <17.03%> (-0.41%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bhperry
Copy link
Contributor Author

bhperry commented Jun 11, 2025

Anyone understand why ManifestWork deletion isn't working on test-cloudevents-integration?

I see this note about skipped tests on the makefile

  • manifestworkreplicaset_test.go, this test needs to update the work status with the hub work client,
    cloud events work client does not support it. (TODO) may add e2e to for mwrs.

Maybe related to that? Since deleting work relies on seeing updates to the work status conditions. Should I add an exclusion for these tests to cloudevents?

@qiujian16
Copy link
Member

qiujian16 commented Jun 11, 2025

Anyone understand why ManifestWork deletion isn't working on test-cloudevents-integration?

I see this note about skipped tests on the makefile

  • manifestworkreplicaset_test.go, this test needs to update the work status with the hub work client,
    cloud events work client does not support it. (TODO) may add e2e to for mwrs.

Maybe related to that? Since deleting work relies on seeing updates to the work status conditions. Should I add an exclusion for these tests to cloudevents?

@skeeey thought?

I think the main reason is here #1033 (review). The cloudevent client does not have permission to delete the work.

@bhperry bhperry force-pushed the manifest-completion branch 3 times, most recently from 8aa8126 to f243782 Compare June 13, 2025 16:03
Signed-off-by: Ben Perry <[email protected]>
@bhperry bhperry force-pushed the manifest-completion branch from 77f3f7f to 08633df Compare July 9, 2025 18:31
Copy link

coderabbitai bot commented Jul 9, 2025

## Walkthrough

This change introduces new utilities and logic for managing and aggregating manifest conditions in ManifestWork resources, including new functions for finding, pruning, and aggregating conditions. Controller logic and tests are updated to leverage these utilities, improving condition evaluation, aggregation, and completion detection. Test infrastructure and Makefile integration are also enhanced.

## Changes

| Files / Areas                                                                                      | Change Summary |
|--------------------------------------------------------------------------------------------------|----------------|
| pkg/work/helper/helpers.go                                                                       | Added `FindManifestCondition` to locate a manifest condition by resource metadata, ignoring ordinal. |
| pkg/work/spoke/conditions/helpers.go                                                             | New file: Adds utilities for condition rule detection, pruning, and aggregation of manifest conditions. |
| pkg/work/spoke/controllers/manifestcontroller/manifestwork_controller.go                         | Early exit in sync if `WorkComplete` condition is true; prevents further reconciliation. |
| pkg/work/spoke/controllers/manifestcontroller/manifestwork_reconciler.go                         | Updated `applyManifests` and `applyOneManifest` signatures to accept work status; skips applying manifests marked as complete. |
| pkg/work/spoke/controllers/manifestcontroller/manifestwork_reconciler_test.go                    | Refactored test setup and validation, added fields for delete options and existing conditions, improved condition assertions, and added a test for completed work. |
| pkg/work/spoke/controllers/statuscontroller/availablestatus_controller.go                        | Refactored to use new condition rule evaluation and aggregation utilities; prunes outdated conditions and removes old aggregation logic. |
| pkg/work/spoke/controllers/statuscontroller/availablestatus_controller_test.go                   | Enhanced test cases for condition rules, aggregation, and removal; improved validation logic and test coverage. |
| test/integration-test.mk                                                                         | Appended `${ARGS}` to integration test targets to allow passing extra runtime arguments. |
| test/integration/util/recorder.go                                                                | Added `ConditionNotFound` and `CheckExpectedConditions` for centralized, detailed condition presence/matching checks. |
| test/integration/work/conditionrules_test.go                                                     | Replaced local condition check helper with `util.CheckExpectedConditions`; removed obsolete imports and function. |
| test/integration/work/work_test.go                                                               | Added "Work completion" test context to verify completion logic and condition rule aggregation in ManifestWork. |
| go.mod                                                                                          | Updated `open-cluster-management.io/api` module to a newer pseudo-version. |

## Suggested labels

`lgtm`, `approved`

## Suggested reviewers

- qiujian16

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 20b361e and 9b537c2.

📒 Files selected for processing (1)
  • test/integration/registration/managedcluster_importer_test.go (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: skeeey
PR: open-cluster-management-io/ocm#1053
File: vendor/open-cluster-management.io/sdk-go/pkg/cloudevents/clients/work/agent/client/manifestwork.go:237-237
Timestamp: 2025-07-01T02:27:10.927Z
Learning: In OCM ManifestWork agent client, when a work is being deleted (DeletionTimestamp set and finalizers removed), the agent publishes a status update event (types.UpdateRequestAction) with ResourceDeleted condition set to True to inform the hub that deletion is complete, rather than publishing a delete request event.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: integration
  • GitHub Check: unit
  • GitHub Check: verify
  • GitHub Check: cloudevents-integration
  • GitHub Check: e2e-hosted
  • GitHub Check: e2e-singleton
  • GitHub Check: e2e
🔇 Additional comments (2)
test/integration/registration/managedcluster_importer_test.go (2)

21-21: Import addition looks correct.

The import is necessary for the new code that uses schema.GroupVersionResource to define the namespace resource type.


105-111: Good synchronization enhancement for test robustness.

The wait logic ensures that the namespace is created before proceeding with the test, which is a good practice for integration tests. The implementation correctly uses the dynamic client to poll for the namespace existence.

The namespaceGVR definition is correct for the core/v1 namespaces API, and the Eventually block properly waits for the namespace to be available.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
pkg/work/spoke/controllers/manifestcontroller/manifestwork_reconciler.go (1)

186-194: LGTM!

Good implementation of the completion check that prevents reapplying completed manifests. Correctly uses meta.IsStatusConditionTrue as suggested in the previous review.

🧹 Nitpick comments (1)
pkg/work/spoke/conditions/helpers.go (1)

91-126: Fix trailing space in message string.

The logic is correct, but there's a trailing space in the message that should be removed.

 		return metav1.Condition{
 			Type:               workapiv1.WorkAvailable,
 			Status:             metav1.ConditionUnknown,
 			Reason:             "ResourcesStatusUnknown",
 			ObservedGeneration: generation,
-			Message:            "cannot get any available resource ",
+			Message:            "cannot get any available resource",
 		}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7924226 and 08633df.

⛔ Files ignored due to path filters (2)
  • go.sum is excluded by !**/*.sum
  • vendor/open-cluster-management.io/api/work/v1/types.go is excluded by !vendor/**
📒 Files selected for processing (11)
  • pkg/work/helper/helpers.go (1 hunks)
  • pkg/work/spoke/conditions/helpers.go (1 hunks)
  • pkg/work/spoke/controllers/manifestcontroller/manifestwork_controller.go (1 hunks)
  • pkg/work/spoke/controllers/manifestcontroller/manifestwork_reconciler.go (5 hunks)
  • pkg/work/spoke/controllers/manifestcontroller/manifestwork_reconciler_test.go (9 hunks)
  • pkg/work/spoke/controllers/statuscontroller/availablestatus_controller.go (2 hunks)
  • pkg/work/spoke/controllers/statuscontroller/availablestatus_controller_test.go (6 hunks)
  • test/integration-test.mk (2 hunks)
  • test/integration/util/recorder.go (2 hunks)
  • test/integration/work/conditionrules_test.go (9 hunks)
  • test/integration/work/work_test.go (3 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: skeeey
PR: open-cluster-management-io/ocm#1053
File: vendor/open-cluster-management.io/sdk-go/pkg/cloudevents/clients/work/agent/client/manifestwork.go:237-237
Timestamp: 2025-07-01T02:27:10.927Z
Learning: In OCM ManifestWork agent client, when a work is being deleted (DeletionTimestamp set and finalizers removed), the agent publishes a status update event (types.UpdateRequestAction) with ResourceDeleted condition set to True to inform the hub that deletion is complete, rather than publishing a delete request event.
pkg/work/spoke/controllers/manifestcontroller/manifestwork_controller.go (2)
Learnt from: skeeey
PR: open-cluster-management-io/ocm#1053
File: vendor/open-cluster-management.io/sdk-go/pkg/cloudevents/clients/work/agent/client/manifestwork.go:237-237
Timestamp: 2025-07-01T02:27:10.927Z
Learning: In OCM ManifestWork agent client, when a work is being deleted (DeletionTimestamp set and finalizers removed), the agent publishes a status update event (types.UpdateRequestAction) with ResourceDeleted condition set to True to inform the hub that deletion is complete, rather than publishing a delete request event.
Learnt from: skeeey
PR: open-cluster-management-io/ocm#1053
File: pkg/server/services/addon/addon_test.go:208-225
Timestamp: 2025-06-27T09:46:24.579Z
Learning: In the Open Cluster Management addon service, deletion actions are not expected to occur. The OnDelete handler method is implemented as a no-op, and test coverage for deletion is not needed since this operation is not part of the service's expected functionality.
test/integration/work/conditionrules_test.go (1)
Learnt from: skeeey
PR: open-cluster-management-io/ocm#1053
File: vendor/open-cluster-management.io/sdk-go/pkg/cloudevents/clients/work/agent/client/manifestwork.go:237-237
Timestamp: 2025-07-01T02:27:10.927Z
Learning: In OCM ManifestWork agent client, when a work is being deleted (DeletionTimestamp set and finalizers removed), the agent publishes a status update event (types.UpdateRequestAction) with ResourceDeleted condition set to True to inform the hub that deletion is complete, rather than publishing a delete request event.
pkg/work/spoke/controllers/statuscontroller/availablestatus_controller.go (1)
Learnt from: skeeey
PR: open-cluster-management-io/ocm#1053
File: vendor/open-cluster-management.io/sdk-go/pkg/cloudevents/clients/work/agent/client/manifestwork.go:237-237
Timestamp: 2025-07-01T02:27:10.927Z
Learning: In OCM ManifestWork agent client, when a work is being deleted (DeletionTimestamp set and finalizers removed), the agent publishes a status update event (types.UpdateRequestAction) with ResourceDeleted condition set to True to inform the hub that deletion is complete, rather than publishing a delete request event.
test/integration/work/work_test.go (1)
Learnt from: skeeey
PR: open-cluster-management-io/ocm#1053
File: vendor/open-cluster-management.io/sdk-go/pkg/cloudevents/clients/work/agent/client/manifestwork.go:237-237
Timestamp: 2025-07-01T02:27:10.927Z
Learning: In OCM ManifestWork agent client, when a work is being deleted (DeletionTimestamp set and finalizers removed), the agent publishes a status update event (types.UpdateRequestAction) with ResourceDeleted condition set to True to inform the hub that deletion is complete, rather than publishing a delete request event.
pkg/work/spoke/controllers/manifestcontroller/manifestwork_reconciler.go (1)
Learnt from: skeeey
PR: open-cluster-management-io/ocm#1053
File: vendor/open-cluster-management.io/sdk-go/pkg/cloudevents/clients/work/agent/client/manifestwork.go:237-237
Timestamp: 2025-07-01T02:27:10.927Z
Learning: In OCM ManifestWork agent client, when a work is being deleted (DeletionTimestamp set and finalizers removed), the agent publishes a status update event (types.UpdateRequestAction) with ResourceDeleted condition set to True to inform the hub that deletion is complete, rather than publishing a delete request event.
pkg/work/spoke/controllers/manifestcontroller/manifestwork_reconciler_test.go (1)
Learnt from: skeeey
PR: open-cluster-management-io/ocm#1053
File: vendor/open-cluster-management.io/sdk-go/pkg/cloudevents/clients/work/agent/client/manifestwork.go:237-237
Timestamp: 2025-07-01T02:27:10.927Z
Learning: In OCM ManifestWork agent client, when a work is being deleted (DeletionTimestamp set and finalizers removed), the agent publishes a status update event (types.UpdateRequestAction) with ResourceDeleted condition set to True to inform the hub that deletion is complete, rather than publishing a delete request event.
🧬 Code Graph Analysis (3)
test/integration/work/conditionrules_test.go (1)
test/integration/util/recorder.go (2)
  • CheckExpectedConditions (93-112)
  • ConditionNotFound (17-17)
pkg/work/spoke/controllers/statuscontroller/availablestatus_controller.go (1)
pkg/work/spoke/conditions/helpers.go (2)
  • AggregateManifestConditions (36-84)
  • PruneConditionsGeneratedByConditionRules (27-31)
pkg/work/spoke/controllers/manifestcontroller/manifestwork_reconciler.go (1)
pkg/work/helper/helpers.go (1)
  • FindManifestCondition (401-411)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: cloudevents-integration
  • GitHub Check: unit
  • GitHub Check: integration
  • GitHub Check: verify
  • GitHub Check: build
  • GitHub Check: e2e-singleton
  • GitHub Check: e2e
  • GitHub Check: e2e-hosted
🔇 Additional comments (28)
pkg/work/helper/helpers.go (1)

400-411: LGTM! Clean and efficient helper function.

The FindManifestCondition function is well-implemented with proper use of the existing resetOrdinal helper for consistent comparison. The function correctly normalizes ordinal fields before matching and returns a pointer for efficiency.

pkg/work/spoke/controllers/manifestcontroller/manifestwork_controller.go (1)

136-139: LGTM! Proper early exit for completed ManifestWork.

This early exit condition correctly prevents unnecessary processing of ManifestWork resources that are already complete, aligning with the PR objectives to ignore updates to completed resources.

test/integration-test.mk (1)

34-67: LGTM! Consistent test infrastructure enhancement.

The addition of ${ARGS} to all test execution commands provides flexible runtime argument passing, supporting enhanced integration test scenarios. The change is consistently applied across all test targets.

test/integration/work/conditionrules_test.go (2)

140-145: LGTM! Improved condition checking with centralized utility.

The refactoring to use util.CheckExpectedConditions centralizes condition validation logic and provides consistent error handling. This improves code maintainability and test reliability.


342-346: LGTM! Proper use of ConditionNotFound sentinel.

The use of util.ConditionNotFound correctly asserts that the "NotWellKnown" condition should not be present, demonstrating proper testing of condition absence scenarios.

test/integration/util/recorder.go (2)

15-18: LGTM! Clear sentinel value for condition absence testing.

The ConditionNotFound constant with value "-" provides a clear and intuitive way to assert that a condition should not exist in test scenarios.


93-112: LGTM! Comprehensive condition checking utility.

The CheckExpectedConditions function provides excellent centralized condition validation with:

  • Support for both presence and absence checking via the ConditionNotFound sentinel
  • Detailed error aggregation for comprehensive feedback
  • Proper reuse of existing MatchCondition function
  • Clear and descriptive error messages for debugging

This utility significantly improves test code maintainability and consistency across the codebase.

pkg/work/spoke/conditions/helpers.go (4)

13-21: LGTM!

Clear and well-documented helper for identifying conditions generated by rules.


23-31: LGTM!

Effective implementation for pruning stale conditions. The logic correctly identifies conditions from deleted rules by checking the observed generation.


33-84: LGTM!

Well-structured aggregation logic that properly collects and combines manifest conditions. Good practice to always include the Available condition and ensure consistent ordering.


128-155: LGTM!

Good implementation for aggregating conditions from rules. The status determination logic follows the correct precedence, and the message handling appropriately distinguishes between single and multiple conditions.

test/integration/work/work_test.go (2)

47-47: LGTM!

Good test infrastructure improvement using the functional options pattern for test-specific ManifestWork customization.

Also applies to: 82-82, 87-89


881-952: LGTM!

Comprehensive test for the work completion feature. Properly validates that manifest condition rules correctly aggregate to the WorkComplete condition.

pkg/work/spoke/controllers/statuscontroller/availablestatus_controller.go (2)

134-143: LGTM!

Good refactoring that improves modularity by leveraging the new condition helpers. The flow is cleaner with centralized aggregation and proper pruning of stale conditions.


199-219: LGTM!

Well-implemented method that properly evaluates condition rules and updates conditions in place. Good documentation explaining why pruning is necessary due to multiple controllers managing conditions.

pkg/work/spoke/controllers/manifestcontroller/manifestwork_reconciler.go (1)

136-136: LGTM!

Correct addition of workStatus parameter to enable manifest completion checking.

Also applies to: 145-145, 148-148, 160-160

pkg/work/spoke/controllers/statuscontroller/availablestatus_controller_test.go (3)

502-508: LGTM!

Good enhancement to the test structure that enables comprehensive validation of both manifest-level and work-level conditions.


571-679: LGTM!

Comprehensive test coverage for condition aggregation and pruning scenarios. Good attention to detail in setting the generation for proper pruning validation.

Also applies to: 685-687


733-756: LGTM!

Well-structured validation logic using the CheckExpectedConditions utility. The helper function update provides good flexibility for test setup.

Also applies to: 761-772

pkg/work/spoke/controllers/manifestcontroller/manifestwork_reconciler_test.go (9)

111-113: Good refactoring to centralize condition validation logic.

The use of util.CheckExpectedConditions improves consistency across the test suite and reduces code duplication.


120-120: Good extension to support delete option testing.

The addition of deleteOption field enables testing of the new TTL-based deletion functionality mentioned in the PR objectives.


129-129: Proper addition of existing work conditions support.

The existingWorkConditions field and its initialization enable testing scenarios where ManifestWork resources already have conditions set, which is crucial for testing the completion logic.

Also applies to: 152-152


206-209: Well-implemented builder method following established patterns.

The withExistingWorkCondition method maintains consistency with the existing builder pattern and provides a clean API for test setup.


233-252: Excellent enhancement to handle different work action types.

The switch statement properly handles both patch and delete actions, improving type safety and providing clear error messages for unexpected scenarios. The logic that prevents condition validation on delete actions is sound.


256-261: Improved work condition validation with better error handling.

The use of util.CheckExpectedConditions maintains consistency, and the enhanced error handling that reports all errors before failing is a good improvement.


264-272: Good refactoring to reduce code duplication.

The newManifestWork helper method centralizes ManifestWork creation logic, making test setup more consistent and maintainable across all test cases.


365-368: Well-designed test case for the new completion functionality.

This test case properly validates that ManifestWork resources with the Complete condition set to True are ignored during reconciliation, which aligns with the PR objectives.


373-373: Consistent adoption of the new helper method.

All test cases now use newManifestWork() which improves consistency and maintainability across the test suite.

Also applies to: 403-403, 542-542, 583-583

bhperry added 2 commits July 9, 2025 13:39
Signed-off-by: Ben Perry <[email protected]>
@qiujian16
Copy link
Member

/approve
/lgtm
/hold

I think it is ready to merge, hold in case anyone want to take another look.

Copy link
Contributor

openshift-ci bot commented Jul 10, 2025

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@mikeshng
Copy link
Member

CC @elgnay @zhujian7 @zhiweiyin318

@qiujian16
Copy link
Member

/unhold

@openshift-merge-bot openshift-merge-bot bot merged commit c5e776c into open-cluster-management-io:main Jul 14, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants