-
Notifications
You must be signed in to change notification settings - Fork 83
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
Refactoring and updates for 2024-10 API spec #401
Refactoring and updates for 2024-10 API spec #401
Conversation
settings={ | ||
"response_type": ({str: (bool, dict, float, int, list, str, none_type)},), | ||
"auth": ["ApiKeyAuth"], | ||
"endpoint_path": "/bulk/imports/{id}", | ||
"operation_id": "cancel_import", | ||
"operation_id": "cancel_bulk_import", |
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 thought we were not using the word "bulk" in the clients anymore wrt to this endpoint? https://pinecone-io.slack.com/archives/C05MYEX7T2L/p1728935415605249?thread_ts=1728935400.761069&cid=C05MYEX7T2L
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.
(Looks like it's not used in apis
either: e.g. https://github.com/pinecone-io/apis/blob/main/static/2024-10/db_data_2024-10.oas.yaml#L76)
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.
This is generated code, so not really publicly exposed. I think this is fine, there's a similar story in other SDKs since the spec contains "bulk" in a few places.
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 think we need to remove "bulk" from the import language. See here #401 (comment) and here https://pinecone-io.slack.com/archives/C06D0HAKG9F/p1728921416752599?thread_ts=1728663784.981229&cid=C06D0HAKG9F
@@ -13,7 +13,7 @@ if [ "$is_early_access" = "true" ]; then | |||
template_dir="codegen/python-oas-templates/templates5.2.0" | |||
else | |||
destination="pinecone/core/openapi" | |||
modules=("control" "data") | |||
modules=("db_control" "db_data") |
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.
Is inference going to be a part of the plugin?
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.
For now, inference stuff comes in via plugin which is why you don't see anything about it here.
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.
Left a question about inference. Otherwise it looks good, LGTM!
f391f0f
to
2a6a81f
Compare
2a6a81f
to
5578543
Compare
Problem
Needed to consume the 2024-10 API spec.
Solution
The spec updates involved many changes to operation ids. This should not touch the user experience, but does mean this diff is somewhat larger than usual due to the large number of tests for existing functionality that needed to be adjusted for the new names:
Other changes
Cleanup prerelease code no longer needed
pinecone/core_ea/
which was the home of some code generated off of the 2024-10 spec when bulk import functionality was in a pre-release state. We no longer need this. That's why this PR has 21k lines removed.Changes to generation process
ApiClient
,Endpoint
,ModelNormal
, etc which were previously generated into a new folder,pinecone/openapi_support
. Even though these used to be generated, they contain no dynamic content. So taking them out of the generation process should make it significantly easier to work on core improvements to the UX and performance of the generated code, since the source of truth will no longer be a mustache file (FML)./codegen/build-oas.sh 2024-10 false
to delete instead of de-dupe copies of shared classes likeApiClient
, and edit model+api files that continue to be generated to find the classes they need in the newopenapi_support
folder.mypy fixes
openapi_support
classes to satisfy the mypy type checker (pinecone/core
has been ignored in the past, and our goal should be to eventually have 100% of code typechecked).ApiClient
. The tests were to help give me more confidence I wasn't breaking something along the way while making adjustments for mypy.Type of Change