fix: set host-uuid correctly on non LKE clusters#167
Conversation
srust
left a comment
There was a problem hiding this comment.
This begs the question - if it works with or without a linode provider ID, what is the linode provider ID useful for.
It appears the answer is sentry only. Is that your understanding as well?
The lookup using providerID is much faster than the lookup by name - see instances.go I left the code as is, to take the efficiency hit only in non-LKE clusters |
|
|
||
| client := NewMockClient(ctrl) | ||
|
|
||
| t.Run("fails on malformed providerID", func(t *testing.T) { |
There was a problem hiding this comment.
why remove? can't fix?
There was a problem hiding this comment.
there's no "malformed provider ID" anymore, its either a linode-id or a label that we can look up - since we mock the linodeGo response, I didn't feel like it was a useful test to see if a string existed in a list (that we mock)
There was a problem hiding this comment.
This is not what the test does, it doesn't test anything in the linodego response - it checks that we error out in case there's an incorrect spec value on the Node object. The new codebase just ignores this issue entirely and I don't find that to be correct behaviour.
Fixes a bug where the host-uuid was not set correctly for non-LKE clusters.
General:
Pull Request Guidelines: