Skip to content

fix(yurt-manager): resolve endpointslice patch collision by using Uni… - #2719

Open
Rickydama3 wants to merge 1 commit into
openyurtio:masterfrom
Rickydama3:fix-timestamp-only
Open

fix(yurt-manager): resolve endpointslice patch collision by using Uni…#2719
Rickydama3 wants to merge 1 commit into
openyurtio:masterfrom
Rickydama3:fix-timestamp-only

Conversation

@Rickydama3

Copy link
Copy Markdown

…xNano timestamp

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage

What this PR does / why we need it:

This PR resolves a race condition in the servicetopology controller that caused topology annotation changes to appear inert at the edge.

Previously, UpdateTriggerAnnotations utilized time.Now().Unix() to generate the openyurt.io/update-trigger patch. Because this only resolves to the second, rapid updates to multiple Services within the same 1-second window resulted in identical patch payloads. The Kubernetes API server dropped these identical patches due to idempotency, meaning no watch events were propagated to yurthub.

By upgrading the timestamp generation to time.Now().UnixNano(), every patch is guaranteed to mutate the object state, ensuring reliable event propagation to the edge nodes.

Which issue(s) this PR fixes:

Fixes #2612

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

other Note

@Rickydama3
Rickydama3 requested a review from a team as a code owner August 2, 2026 13:25
@sonarqubecloud

sonarqubecloud Bot commented Aug 2, 2026

Copy link
Copy Markdown

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.

Service topology annotation changes are inert without yurt-manager forcing a watch event

1 participant