-
Notifications
You must be signed in to change notification settings - Fork 56
RSDK-7229 add machine_id to cloud metadata #585
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-7229 add machine_id to cloud metadata #585
Conversation
ace4005
to
34bd29a
Compare
src/viam/robot/client.py
Outdated
@dataclass | ||
class CloudMetadata: | ||
"""App-related information about the robot""" | ||
|
||
primary_org_id: str | ||
location_id: str | ||
machine_id: str | ||
machine_part_id: str |
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 would rather use a TypeAlias
here rather than creating a new type, especially since everything simply mirrors the GetCloudMetadataResponse
anyway
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.
would making a TypeAlias
expose the robot_part_id
field on GetCloudMetadataResponse
too? this is a duplicate of machine_part_id
- we left it to prevent a breaking proto 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.
Yes it would. So if you're trying to hide that field, then sure you can create a dataclass. But this is a brewaking change in all the SDKs anyway, so maybe might as well make it a breaking proto 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.
that's fair - I guess there was a feeling that breaking protos is a bit more significant than breaking the client method
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.
discussed IRL - we're gonna explicitly deprecate the proto field but leave it in: viamrobotics/api#487
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 (modulo Naveed's comment)
Breaking change!Not anymore!Add
machine_id
to theget_cloud_metadata
robot client method.Also change the return type and renameWe are just deprecating the duplicate field instead.robot_part_id
tomachine_part_id
for clarity.Depends on: