Some linkerd stat test failures were being hidden#4272
Merged
Conversation
`linkerd stat` was doing an early `os.Exit(0)` when no traffic was found, which avoided `go test` to report any test failure that ended in that code path. This was hiding a mismatch in the golden files for HA after the introduction of the rolling update strategy (#4267), and the failure of `linkerd stat trafficsplit` not returning results unless `--unmeshed` is used. For the latter, I added the flag to the tests in order to temporarly pass them, but the underlying issue remains to be fixed in a separate PR.
Member
Author
|
@Pothulapati this also updates the golden files you updated in #4271. You can keep them there; the automatic merge shouldn't return conflicts. |
olix0r
reviewed
Apr 17, 2020
zaharidichev
approved these changes
Apr 21, 2020
Member
zaharidichev
left a comment
There was a problem hiding this comment.
Nice +1 for fixing the unit test failure in HA mode. This currently breaks CI.
Contributor
|
@zaharidichev Just a heads up this depends on #4273 which needs one more review |
kleimkuhler
added a commit
that referenced
this pull request
Apr 21, 2020
The addition of the `--unmeshed` flag changed the rendering behavior of the `stat` command so that resources with 0 meshed pods are not displayed by default. Rendering is based off the row's `MeshedPodCount` field which is currently not set by `func trafficSplitResourceQuery`. This change sets that field now so that in rendering, the trafficsplit resource is rendered in the output. The reason for this not showing up in testing is addressed by #4272 where the `stat` command behavior for no traffic is changed. The following now works without `--unmeshed` flag being passed: ``` ❯ bin/linkerd stat -A ts NAMESPACE NAME APEX LEAF WEIGHT SUCCESS RPS LATENCY_P50 LATENCY_P95 LATENCY_P99 default backend-traffic-split backend-svc backend-svc 500m - - - - - default backend-traffic-split backend-svc failing-svc 0 - - - - - ```
adleong
approved these changes
Apr 21, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
linkerd statwas doing an earlyos.Exit(0)when no traffic wasfound, which avoided
go testto report any test failure that ended inthat code path.
This was hiding a mismatch in the golden files for HA after the
introduction of the rolling update strategy (#4267), and the failure of
linkerd stat trafficsplitnot returning results unless--unmeshedisused. For the latter, I added the flag to the tests in order to temporarly pass
them, but the underlying issue remains to be fixed in a separate
PR.