-
Notifications
You must be signed in to change notification settings - Fork 739
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
pkg/{canary,controller}: remove unused skipLivenessChecks #530
Conversation
Codecov Report
@@ Coverage Diff @@
## master #530 +/- ##
==========================================
+ Coverage 50.31% 50.50% +0.19%
==========================================
Files 63 63
Lines 4941 4938 -3
==========================================
+ Hits 2486 2494 +8
+ Misses 2044 2034 -10
+ Partials 411 410 -1
Continue to review full report at Codecov.
|
err = c.createPrimaryDaemonSet(cd) | ||
if err != nil { | ||
return fmt.Errorf("createPrimaryDaemonSet failed: %w", err) | ||
} | ||
|
||
if cd.Status.Phase == "" || cd.Status.Phase == flaggerv1.CanaryPhaseInitializing { | ||
if !skipLivenessChecks && !cd.SkipAnalysis() { |
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.
Removing the SkipAnalysis condition changes the current behaviour. Is this intentional? if so please add a separate commit with it.
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.
I misunderstood this condition - this is not intentional so I am going to revert this change
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.
force pushed the reverted version
f67f846
to
65d4b28
Compare
Yes that would be a great improvement to tests readability 👍 |
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.
LGTM
Thanks @mathetake 🎖
I realized that
skipLivenessChecks bool
(which equals tojob.SkipTests
) has been always set to be false and it's not necessary.So this PR deleted it and fixed tests accordingly
P.S. I think we'd better use gomock of
canary.Controller
andmesh.Router
interface in order to simplify tests in controller package. Currently they are like small e2e tests and deeply connected with internal implementations of these interfaces, which make it harder for developers who want to contribute to Flagger to understand the internal functionality.