Skip to content

fix: fix stagedUpdateRun PolicyObservedClusterCount#1014

Merged
ryanzhang-oss merged 1 commit intoAzure:mainfrom
jwtty:stagerun-fix
Jan 14, 2025
Merged

fix: fix stagedUpdateRun PolicyObservedClusterCount#1014
ryanzhang-oss merged 1 commit intoAzure:mainfrom
jwtty:stagerun-fix

Conversation

@jwtty
Copy link
Contributor

@jwtty jwtty commented Jan 10, 2025

Description of your changes

  1. When scheduling policy is PickAll, we update PolicyObservedClusterCount to the number of scheduled/bound clusterResourceBindings, instead of -1. For PickFix and PickN, we validate if the number of bindings match the expected count.
  2. Add more output in one of the integration test to help debugging UT flakes.

Fixes #

I have:

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

How has this code been tested

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.

as we discussed off line, we just need to add something like this to the updateRun object

// +kubebuilder:validation:XValidation:rule="size(self.metadata.name) < 128",message="metadata.name max length is 127"

@jwtty jwtty changed the title fix: fix stagedUpdateRun PolicyObservedClusterCount and ApprovalRequest name uniqueness fix: fix stagedUpdateRun PolicyObservedClusterCount Jan 14, 2025
@jwtty
Copy link
Contributor Author

jwtty commented Jan 14, 2025

as we discussed off line, we just need to add something like this to the updateRun object

// +kubebuilder:validation:XValidation:rule="size(self.metadata.name) < 128",message="metadata.name max length is 127"

Since we only need to add more API validations, I'll make the change in the API change PR: #1008

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