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

feat: enable the CRP controller to process DiffReported condition #1017

Merged
merged 10 commits into from
Jan 23, 2025

Conversation

michaelawyu
Copy link
Contributor

Description of your changes

This PR enables the CRP controller to process DiffReported condition.

I have:

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

How has this code been tested

  • Unit tests

Special notes for your reviewer

Copy link
Contributor

@ryanzhang-oss ryanzhang-oss left a comment

Choose a reason for hiding this comment

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

just some high level comments

@michaelawyu
Copy link
Contributor Author

Refactored the code as discussed offline.

Copy link
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.

please look for the condition.TotalCondition usage to make sure it still works.

@michaelawyu
Copy link
Contributor Author

Note: as prev. discussed, the minor change needed on the CRP watcher will be sent as a separate PR.

TotalCondition
)

var (
// Different set of condition types that Fleet will populate.
CondTypesForCSAAndSSAApplyStrategies = []ResourceCondition{
Copy link
Contributor

Choose a reason for hiding this comment

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

i was thinking ReportDiff is a CondTypesForNoApplyOperationStrategies.

yeah, using the full name may be better.

@@ -109,7 +109,7 @@ func TestFindPlacementsSelectedDeletedResV1Alpha1(t *testing.T) {
Status: fleetv1alpha1.ClusterResourcePlacementStatus{
SelectedResources: []fleetv1alpha1.ResourceIdentifier{
{
Group: "abd",
Group: "xyz",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change is solely made to pass the codespeller check; apparently the program thinks abd as a misspelling.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same for the change below.

@zhiying-lin zhiying-lin merged commit 62f2fa2 into Azure:main Jan 23, 2025
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.

3 participants