Skip to content

Some linkerd stat test failures were being hidden#4272

Merged
alpeb merged 3 commits intomasterfrom
alpeb/stat-no-exit
Apr 21, 2020
Merged

Some linkerd stat test failures were being hidden#4272
alpeb merged 3 commits intomasterfrom
alpeb/stat-no-exit

Conversation

@alpeb
Copy link
Member

@alpeb alpeb commented Apr 17, 2020

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.

`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.
@alpeb
Copy link
Member Author

alpeb commented Apr 17, 2020

@Pothulapati this also updates the golden files you updated in #4271. You can keep them there; the automatic merge shouldn't return conflicts.

Copy link
Member

@zaharidichev zaharidichev left a comment

Choose a reason for hiding this comment

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

Nice +1 for fixing the unit test failure in HA mode. This currently breaks CI.

@kleimkuhler
Copy link
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         -     -             -             -             -
```
@alpeb alpeb merged commit b00a841 into master Apr 21, 2020
@alpeb alpeb deleted the alpeb/stat-no-exit branch April 21, 2020 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants