Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Codecov Report✅ All modified and coverable lines are covered by tests. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
@Atishyy27 E2E tests are failing .. can you fix it ? |
|
@yashisrani looked into it. the failure is namespaceHasLabel, the only function this PR changes, has one caller: the --enroll-namespace branch of the same commit passed 2 of the 3 ipv6 runs and every regular e2e run, and the three failing subtests all timed out at exactly 60s waiting on traffic, which reads like the waypoint pod not being ready rather than a label check. happy to be wrong here. could you retrigger the job? if it fails again on the same test i'll dig further. |
namespaceHasLabel checked Labels[label] against a non-empty value, so a namespace carrying the label with an empty value (istio.io/use-waypoint set to the empty string, a valid Kubernetes label) was reported as not having the label. In kmeshctl waypoint apply --enroll-namespace this makes the !overwrite && hasWaypoint guard fall through and silently overwrite an existing enrollment without the intended warning. Check for the key's presence instead of a non-empty value. Adds a regression test. Signed-off-by: Atishay Jain <sethatishayjain@gmail.com>
0acfc59 to
1ba36dd
Compare
What type of PR is this?
/kind bug
What this PR does / why we need it:
namespaceHasLabel (ctl/waypoint/waypoint.go) checked Labels[label] against a non-empty value, so a namespace carrying the label with an empty value (istio.io/use-waypoint set to the empty string, a valid kubernetes label) was reported as not having the label. in
kmeshctl waypoint apply --enroll-namespacethis makes the!overwrite && hasWaypointguard fall through and silently overwrite an existing enrollment without the intended warning. this checks for the key's presence instead of a non-empty value. added a regression test.Which issue(s) this PR fixes:
Fixes #1906
Special notes for your reviewer:
the test uses a minimal fake CLIClient (only Kube() is wired, which is the only method namespaceHasLabel calls) with a fake clientset seeding a namespace labeled use-waypoint="".
Does this PR introduce a user-facing change?: