-
Notifications
You must be signed in to change notification settings - Fork 276
Conversation
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.
This change seems to be doing more than simply removing dead code. Did you mean to include this refactor, and if yes could you update the commit title and description. Also, note that the CI is failing on this change.
Updated comment |
Signed-off-by: Sean Teeling <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #4758 +/- ##
==========================================
- Coverage 68.96% 68.94% -0.03%
==========================================
Files 227 226 -1
Lines 16454 16374 -80
==========================================
- Hits 11348 11289 -59
+ Misses 5054 5033 -21
Partials 52 52
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@steeling Could you explain in a bit more detail why these code paths are unreachable? That's not immediately obvious to me. |
Sure thing! The changed method is in Now Yet After removing that case, the function is brought down to a few lines, and is better placed directly within |
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.
Thanks, that makes sense!
Remove dead code.
This PR additionally removed unreachable code paths in pkg/envoy/sds/response.go. By stripping out these unreachable code paths, it became apparent that we could further collapse several functions into one.