Skip to content
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-9623: Add Discover Service and GetModelsFromModules to Python #827

Merged
merged 16 commits into from
Feb 3, 2025

Conversation

martha-johnston
Copy link
Contributor

@martha-johnston martha-johnston commented Jan 22, 2025

add discoverResources and getModelsFromModules to python sdk, deprecation warnings are already added in #818

@martha-johnston martha-johnston marked this pull request as ready for review January 23, 2025 19:40
@martha-johnston martha-johnston requested a review from a team as a code owner January 23, 2025 19:40
@martha-johnston martha-johnston changed the title add discovery service RSDK-9623: Add Discover Service and GetModelsFromModules to Python Jan 23, 2025
Makefile Outdated
@@ -16,7 +16,7 @@ buf: clean
rm -rf src/viam/gen
chmod +x plugin/main.py
uv pip install protoletariat
uv pip install protobuf==5.29.1
uv pip install protobuf==5.29.3
Copy link
Contributor Author

Choose a reason for hiding this comment

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

want to call attention to this upgrade and make sure there's no issue with it

Copy link
Member

Choose a reason for hiding this comment

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

I think it's probably fine but I haven't looked into it deeply. Curious though why this upgrade is important?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

with 5.29.1, when I run make buf locally I get the following error

Detected incompatible Protobuf Gencode/Runtime versions when loading common/v1/common.proto: gencode 5.29.3 runtime 5.29.1. Runtime version cannot be older than the linked gencode version. See Protobuf version guarantees at https://protobuf.dev/support/cross-version-runtime-guarantee.

and I don't remember what the exact error was on GitHub but the checks did not pass either, I assume because the correct protos weren't present since I couldn't build them? so I upgraded protobuf and was able to run make buf successfully, and then the GitHub checks passed

Copy link
Member

@stuqdog stuqdog left a comment

Choose a reason for hiding this comment

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

Generally looks good to me! but wanna get a little bit more clarity on the proto version bump

Makefile Outdated
@@ -16,7 +16,7 @@ buf: clean
rm -rf src/viam/gen
chmod +x plugin/main.py
uv pip install protoletariat
uv pip install protobuf==5.29.1
uv pip install protobuf==5.29.3
Copy link
Member

Choose a reason for hiding this comment

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

I think it's probably fine but I haven't looked into it deeply. Curious though why this upgrade is important?

Copy link
Member

@njooma njooma left a comment

Choose a reason for hiding this comment

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

Can you merge with main to make sure everything is up to date, including the protos?

@martha-johnston
Copy link
Contributor Author

yes I will! but I discovered this morning that GetModelsFromModules is not working so I need to fix that first

@martha-johnston
Copy link
Contributor Author

okay issue resolved, I thought it was an sdk issue but it was unimplemented in rdk, works now that the implementation has been merged. and merged main so it should be updated with latest @njooma

@martha-johnston
Copy link
Contributor Author

martha-johnston commented Feb 3, 2025

just updated with main again, would like to get this merged before todays release! @njooma

@njooma
Copy link
Member

njooma commented Feb 3, 2025

I made some updates to this PR with @martha-johnston's permission and wanted to explain what I did and why.

We pin the protobuf and protoc versions to 29.1, so when we generate the protos, they are locked into v29.1. When someone wants to use these protos, their version of protobuf must be equal to or greater than 29.1.

If we were to update the version with which we generate protobufs, then all of our runtimes would also have to be updated. Which is mostly fine because it gets handled by the dependencies. But we should support older versions.

This main issue with these proto updates is that they were generated locally by a version greater than 29.1. Locally generated protos should be limited to testing locally -- We should try to avoid committing any protos that were generated locally.

@martha-johnston martha-johnston merged commit 21ff90f into viamrobotics:main Feb 3, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants