Skip to content

Conversation

@rudrakhp
Copy link
Member

What type of PR is this?

perf: do not set last transition time for status in watcher layer

What this PR does / why we need it:
Prevents watcher from getting updates due to changes in LastTransitionTime in resource status conditions. Instead set LastTransitionTime for all status conditions before apply.

Which issue(s) this PR fixes:

Fixes #7158

Release Notes: No

@rudrakhp rudrakhp requested a review from a team as a code owner October 18, 2025 12:15
@rudrakhp rudrakhp force-pushed the ignore_transition_time_watcher branch 4 times, most recently from 0831236 to ac80e07 Compare October 18, 2025 18:01
@codecov
Copy link

codecov bot commented Oct 18, 2025

Codecov Report

❌ Patch coverage is 65.42056% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.94%. Comparing base (be78949) to head (b1a00bc).

Files with missing lines Patch % Lines
internal/provider/kubernetes/status_updater.go 60.86% 35 Missing and 1 partial ⚠️
internal/gatewayapi/status/gateway.go 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7268      +/-   ##
==========================================
- Coverage   70.94%   70.94%   -0.01%     
==========================================
  Files         229      229              
  Lines       41044    41127      +83     
==========================================
+ Hits        29120    29177      +57     
- Misses      10206    10234      +28     
+ Partials     1718     1716       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rudrakhp rudrakhp force-pushed the ignore_transition_time_watcher branch from ac80e07 to b1a00bc Compare October 19, 2025 10:31

// setLastTransitionTimeInStatusConditions sets LastTransitionTime to the given time for all conditions in the status
// and returns a copy of the object with updated LastTransitionTime
func setLastTransitionTimeInStatusConditions(obj interface{}, timestamp time.Time) (client.Object, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we avoid DeepCopy ?

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.

perf: Set Status LastTransitionTime in the status updater (subscriber) rather than in producer gw api translator (publisher) side

2 participants