-
Notifications
You must be signed in to change notification settings - Fork 110
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
RSDK-7903 Include unhealthy remotes in resource list with status #4273
base: main
Are you sure you want to change the base?
RSDK-7903 Include unhealthy remotes in resource list with status #4273
Conversation
aeeba0d
to
36dbd45
Compare
73cae61
to
4153c0c
Compare
fb91e32
to
c30937d
Compare
c30937d
to
e2243e1
Compare
bbc5e4c
to
e2243e1
Compare
e2243e1
to
fd0784b
Compare
05ec75f
to
a0fc8d8
Compare
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.
An alternative approach to the changes in this file is to define a new state (e.g. NodeStateDisconnected
) - see the "Open questions" section in the PR description for more details and see the revert of this commit for a general idea of how this would look.
robot/client/client.go
Outdated
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 high-level change here is that a robot client now caches the results of MachineStatus
rather than just ResourceNames
. As a result, multiple tests that result on injecting a mock function for ResourceNames
now need to mock MachineStatus
.
This reverts commit 34bc7f4.
|
||
// NodeStateDisconnected denotes a resource is disconnected. | ||
NodeStateDisconnected |
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.
An alternative to defining a new state would be to mark disconnected resource nodes as "unhealthy" with an appropriate error message. See "Open questions" in the description of this PR for more details and revert this commit to see how this alternative approach would look.
Summary
Keep remote resources in the
ResourceNames
andMachineStatus
APIs when their remote gets disconnected. In the latter API, mark such resources with a state indicate that they are disconnected.Details
Robot clients now fetch and cache resource statuses via the
GetMachineStatus
API instead of resource names viaResourceNames
API.Open questions
NodeStateDisconnected
), or is it sufficient to reuse the unhealthy state with a corresponding error (e.g.NodeStateUnhealthy[reason:disconnected]
)?MachineStatus
on the local or remote machine, respectively. Having a specialized state that can only appear for remote resources feels like the less confusing option in this case.Depends on