ITADN

Two EventReason constants in pkg/events/events.go emit duplicate wire strings

#7564OpenPrasannaMishra001 创建于 2026-05-27
kind/cleanup
**What happened**: `pkg/events/events.go` declares four FederatedResourceQuota event reason constants whose wire string collides with the binding controller reasons: ```go // pkg/events/events.go EventReasonSyncWorkFailed = "SyncWorkFailed" EventReasonSyncWorkSucceed = "SyncWorkSucceed" EventReasonAggregateStatusFailed = "AggregateStatusFailed" EventReasonAggregateStatusSucceed = "AggregateStatusSucceed" ... EventReasonSyncFederatedResourceQuotaFailed = "SyncWorkFailed" EventReasonSyncFederatedResourceQuotaSucceed = "SyncWorkSucceed" EventReasonCollectFederatedResourceQuotaStatusFailed = "AggregateStatusFailed" EventReasonCollectFederatedResourceQuotaStatusSucceed = "AggregateStatusSucceed" ``` The binding constants are emitted by the binding and cluster-resource-binding controllers (and work status helpers). The FRQ constants are emitted by the FRQ sync and status controllers. They describe unrelated operations but share reason strings, so consumers filtering events by `reason` cannot distinguish them. **What you expected to happen**: Each constant should emit a distinct reason. The FRQ constants should reflect their actual scope, e.g. `SyncFederatedResourceQuotaFailed`, `CollectFederatedResourceQuotaStatusFailed`. **Anything else we need to know?**: Flagged in #7527 as a follow up cleanup that should land separately from the events.k8s.io/v1 migration, since the reason string is the externally visible surface and will need a release note. **Environment**: - Karmada version: master (5ad46fc)
2 条评论