Skip to content

Conversation

@michaelawyu
Copy link
Collaborator

Description of your changes

This PR progresses drift/diff detection APIs to v1 version.

I have:

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

How has this code been tested

N/A; pending some manual testing.

Special notes for your reviewer

N/A

Signed-off-by: michaelawyu <chenyu1@microsoft.com>
@michaelawyu
Copy link
Collaborator Author

Can be reviewed; though I am still finishing up some manual testing.

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 0% with 37 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/utils/common.go 0.00% 37 Missing ⚠️

📢 Thoughts on this report? Let us know!

@michaelawyu michaelawyu marked this pull request as draft October 29, 2025 23:45
Signed-off-by: michaelawyu <chenyu1@microsoft.com>
@michaelawyu michaelawyu marked this pull request as ready for review November 13, 2025 19:06
@michaelawyu
Copy link
Collaborator Author

Note: some of the additional tests will be submitted in separate PRs in an attempt to control the PR size.

lessFuncPlacementStatus = func(a, b placementv1beta1.PerClusterPlacementStatus) bool {
return a.ClusterName < b.ClusterName
}
lessFuncPlacementStatusV1 = func(a, b placementv1.ResourcePlacementStatus) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this? There is no ResourcePlacementStatus in v1beta1

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi Ryan! In the v1 package it is the type of the ClusterResourcePlacementStatus.PlacementStatuses field, i.e.,

// ClusterResourcePlacementStatus defines the observed state of the ClusterResourcePlacement object.
type ClusterResourcePlacementStatus struct {
	...

	// PlacementStatuses contains a list of placement status on the clusters that are selected by PlacementPolicy.
	// Each selected cluster according to the latest resource placement is guaranteed to have a corresponding placementStatuses.
	// In the pickN case, there are N placement statuses where N = NumberOfClusters; Or in the pickFixed case, there are
	// N placement statuses where N = ClusterNames.
	// In these cases, some of them may not have assigned clusters when we cannot fill the required number of clusters.
	// TODO, For pickAll type, considering providing unselected clusters info.
	// +optional
	PlacementStatuses []ResourcePlacementStatus `json:"placementStatuses,omitempty"`

	...
}

It has nothing to do with the ResourcePlacement API.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In v1beta1 package the field and the type has been renamed to PerClusterPlacementStatus, but the JSON serialization is left unchanged.

@michaelawyu
Copy link
Collaborator Author

Merging this now to unblock progress; if there's any concern, please let me know.

@michaelawyu michaelawyu merged commit 2830501 into kubefleet-dev:main Nov 25, 2025
18 of 21 checks passed
@michaelawyu michaelawyu deleted the interface/progress-drift-diff-to-v1 branch November 25, 2025 13:22
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.

2 participants