Skip to content

RSDK-6829 - Add machine part id to ResourceName message #467

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

Merged
merged 6 commits into from
Apr 1, 2024

Conversation

cheukt
Copy link
Member

@cheukt cheukt commented Mar 29, 2024

RDK change: viamrobotics/rdk#3757

@cheukt cheukt changed the title RSDK-6829 - Add robot part id to ResourceName message RSDK-6829 - Add machine part id to ResourceName message Mar 29, 2024
@cheukt cheukt requested a review from maximpertsov March 29, 2024 19:12
@@ -15,6 +15,7 @@ message ResourceName {
string type = 2;
string subtype = 3;
string name = 4;
optional string machine_part_id = 5;
Copy link
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
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
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
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
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

@cheukt cheukt requested a review from maximpertsov March 29, 2024 19:55
@@ -15,6 +15,7 @@ message ResourceName {
string type = 2;
string subtype = 3;
string name = 4;
optional string machine_part_id = 5;
Copy link
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
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

@cheukt cheukt requested a review from benjirewis April 1, 2024 18:13
@cheukt cheukt merged commit 1f9a150 into viamrobotics:main Apr 1, 2024
3 of 4 checks passed
jr22 pushed a commit to jr22/api that referenced this pull request Apr 3, 2024
…#467)

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants