Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

fix(connectivity): return early on fatal errors #108

Closed

Conversation

johnsonshi
Copy link
Contributor

@johnsonshi johnsonshi commented Oct 21, 2021

Certain errors in connectivity pod-to-pod checks prevent
further meaningful checks in pod connectivity from being
run. The following failures are irrecoverable roadblocks
preventing the checks from being run, so osm-health should
terminate upon encountering any of these.
(1) failure to initialize the k8s client,
(2) failure to obtain the kubeconfig, or
(3) failure to obtain osm info (possibly due to incorrect
mesh namespace specified)

Resolves #107.

Signed-off-by: Johnson Shi [email protected]

Certain errors in connectivity pod-to-pod checks prevent
further meaningful checks in pod connectivity from being
run. The following failures are irrecoverable roadblocks
preventing the checks from being run, so osm-health should
terminate upon encountering any of these.
(1) failure to initialize the k8s client,
(2) failure to obtain the kubeconfig, or
(3) failure to obtain osm info (possibly due to incorrect
mesh namespace specified)

Signed-off-by: Johnson Shi <[email protected]>
@johnsonshi johnsonshi force-pushed the early-return-on-fatal-errors branch from 06850cb to 5dfae38 Compare January 3, 2022 18:39
@codecov-commenter
Copy link

codecov-commenter commented Jan 3, 2022

Codecov Report

Merging #108 (3cc5865) into main (a995242) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #108   +/-   ##
=======================================
  Coverage   42.13%   42.13%           
=======================================
  Files          31       31           
  Lines        1272     1272           
=======================================
  Hits          536      536           
  Misses        736      736           
Flag Coverage Δ
unittests 42.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a995242...3cc5865. Read the comment docs.

@@ -15,7 +15,7 @@ func TestEnvoyConfigParser(t *testing.T) {
assert := tassert.New(t)
actual := getReleases()

assert.Equal([]string{"v0.10", "v0.11", "v0.6", "v0.7", "v0.8", "v0.9"}, actual)
assert.Equal([]string{"v0.10", "v0.11", "v0.7", "v0.8", "v0.9"}, actual)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needed to pass unit tests as v0.6 is not supported anymore.

@johnsonshi johnsonshi closed this Mar 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

panic when running osm-health on a non-standard OSM namespace
2 participants