-
Notifications
You must be signed in to change notification settings - Fork 606
Add wait for ingress deletion in NEG test #3540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: panslava The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
- Handle nil DeletionTimestamp gracefully by using current time when objects are deleted immediately without a deletion timestamp - Add explicit wait for ingress deletion in NEG test configuration to ensure all ingresses are fully removed before test completion - Remove incorrect warning logs that were preventing proper deletion tracking when DeletionTimestamp was nil These changes improve the reliability of NEG tests by properly tracking deletion phases even when Kubernetes performs immediate deletions, and ensuring proper cleanup sequencing.
ef8fa4b
to
366cd45
Compare
/cc @swetharepakula |
@@ -337,7 +337,7 @@ func (s *serviceCreationLatencyMeasurement) handleIngressObject(oldObj, newObj i | |||
return | |||
} | |||
newIngress, ok = newObj.(*networkingv1.Ingress) | |||
if newIngress != nil && !ok { | |||
if newObj != nil && !ok { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just fixes mistaken code I noticed, we should compare newObj, not newIngress (look how we do the same above this for services)
What type of PR is this?
/kind bug
/kind flake
What this PR does / why we need it
DeletionTimestamp
may be nil by recording deletion phases using a local timestamp fallback, so deletion latency is tracked consistently.Changes
clusterloader2/testing/neg/config.yaml:125
ingress-measurements.yaml
withaction: waitForDeletion
.DeletionTimestamp
is nil:clusterloader2/pkg/measurement/common/service_creation_latency.go:365
deleting
fromDeletionTimestamp
when present; otherwise usetime.Now()
. Always setdeleted
totime.Now()
.clusterloader2/pkg/measurement/common/service_creation_latency.go:383
Which issue(s) this PR fixes
Fixes #
time.Now()
. Negative latencies are already clamped to zero inphase_latency.go
, so this remains safe, but be aware of potential minor clock skew when interpreting results.Release note