-
Couldn't load subscription status.
- Fork 117
Fix watcher conditional logic #269
Fix watcher conditional logic #269
Conversation
|
Anybody else getting build fail? It's failing in core, which this PR makes no changes to. |
|
jenkins please test this |
|
rerun unit tests please |
|
@erikerlandson I think it's a flake. The rerun should fix it. |
|
Do these edits look OK to everyone else? |
|
Taking a look now. Sorry about the delay. |
|
I think |
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 let's merge when the build passes
| extends Watcher[Service] { | ||
| override def eventReceived(action: Action, service: Service): Unit = { | ||
| if ((action == Action.ADDED) || (action == Action.MODIFIED) | ||
| if ((action == Action.ADDED || action == Action.MODIFIED) |
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.
the parentheses change slightly modifies the evaluation order of these expressions, and the new ordering seems correct.
Java precedence for boolean expressions is ! then && then || so previously this was evaluating the && first and then the ||
…nc-kube [NOSQUASH] Resync with Kubernetes
I ran into some exceptions being thrown from the endpoint watcher in the submission client. It turned out that
nullvalues were being returned forendpoints.getSubsets, instead of just empty collection. I added some guarding checks fornull, which fixed the problem.I also modified the parentheses around action types, because that appeared incorrect. I believe it should be checking for
(action == added || action == modified)as a unit in the first clause.