Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions proto/viam/common/v1/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ message ResourceName {
string type = 2;
string subtype = 3;
string name = 4;
optional string machine_part_id = 5;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why optional?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything else in the resource name should always be filled out, so using optional here to be a bit more clear about the optionality. It doesn't seem like we are super consistent about this though, so could see making it a non-optional field as well

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, that was gonna be my next question - it doesn't seem like we are consistent with using the optional keyword vs relying on implicit optionality in protos (e.g. this field will just be a blank string)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't have have a strong opinion on this, so won't block - I'm okay making this explicitly optional

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to start using optional a bit more, I think it makes it easier to tell what the response shape is like by just reading the proto

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we not also want the machine ID? Or just the part ID?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just part id for now, that's what was scoped and most likely to be useful - user can get cloud metadata if they need more of that stuff

}

message BoardStatus {
Expand Down