Skip to content

chore: Last backport of March#1281

Merged
britaniar merged 4 commits intoAzure:mainfrom
britaniar:lastMarchBackport
Mar 30, 2026
Merged

chore: Last backport of March#1281
britaniar merged 4 commits intoAzure:mainfrom
britaniar:lastMarchBackport

Conversation

@britaniar
Copy link
Copy Markdown
Contributor

Description of your changes

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

michaelawyu and others added 4 commits March 27, 2026 09:48
* update the placement v1 with PR and CPRS

Signed-off-by: Ryan Zhang <yangzhangrice@hotmail.com>

* update the placement v1 with PR and CPRS

Signed-off-by: Ryan Zhang <yangzhangrice@hotmail.com>

* fix the test now that we aded per cluster resource index

Signed-off-by: Ryan Zhang <yangzhangrice@hotmail.com>

* fix: address code review issues in placement v1 API types

- Add CEL immutability validations to CRP Spec (matching v1beta1):
  policy cannot be removed once set, statusReportingScope immutable,
  placementType immutable, and namespace selector requirement when
  StatusReportingScope=NamespaceAccessible
- Fix contradictory +kubebuilder:validation:Required + omitempty on
  ClusterResourcePlacementStatus fields (PlacementStatus, LastUpdatedTime)
- Add missing +kubebuilder:object:root=true to ResourcePlacementList
  and ClusterResourcePlacementStatusList

Signed-off-by: Ryan Zhang <yangzhangrice@hotmail.com>

* fix: pin goimports to v0.42.0 and make envelope work de-duplication resilient

Two CI fixes:

1. Makefile: pin GOIMPORTS_VER from 'latest' to v0.42.0.
   golang.org/x/tools v0.43.0 (latest) now requires Go >= 1.25.0, but
   CI runs Go 1.24.13, causing the unit-and-integration-tests job to
   fail at setup with:
     go: golang.org/x/tools/cmd/goimports@latest: requires go >= 1.25.0

2. pkg/controllers/workgenerator/envelope.go: when multiple work objects
   are found for the same envelope (possible transiently if the same CRP
   name is reused quickly after deletion), self-heal by deleting all but
   the most recently created work and proceeding, instead of returning an
   UnexpectedBehaviorError that causes WorkSynchronized=False on the
   binding. The previous hard-fail path caused e2e test flakiness in the
   'mixed availability statefulset' case where cluster-1's workgenerator
   would encounter leftover work objects from the prior test context.

Signed-off-by: Ryan Zhang <yangzhangrice@hotmail.com>

* feat: address PR Azure#484 review feedback

Remove deprecated ConfigMapEnvelopeType from v1 API, drop duplicate ResourcePlacement* condition types in favor of shorter variants, add CEL validation for placement type immutability on Policy field, and fix envelope duplicate work test to match self-healing behavior.

Signed-off-by: Yetkin Timocin <ytimocin@microsoft.com>

* Addressing feedback and adding some missing properties

Signed-off-by: Yetkin Timocin <ytimocin@microsoft.com>

* Address further feedback

Signed-off-by: Yetkin Timocin <ytimocin@microsoft.com>

---------

Signed-off-by: Ryan Zhang <yangzhangrice@hotmail.com>
Signed-off-by: Yetkin Timocin <ytimocin@microsoft.com>
Co-authored-by: Ryan Zhang <yangzhangrice@hotmail.com>
Co-authored-by: ryanzhang-oss <ryanzhang-oss@users.noreply.github.com>
Signed-off-by: Yetkin Timocin <ytimocin@microsoft.com>
@britaniar britaniar marked this pull request as ready for review March 30, 2026 17:38
Copy link
Copy Markdown
Contributor

@michaelawyu michaelawyu left a comment

Choose a reason for hiding this comment

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

LGTM ;)

@britaniar britaniar merged commit 4a40038 into Azure:main Mar 30, 2026
33 of 37 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