-
Notifications
You must be signed in to change notification settings - Fork 1
[DOM-56006] Regenerated the clients #142
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
[DOM-56006] Regenerated the clients #142
Conversation
✅ Result of Pytest Coverage---------- coverage: platform linux, python 3.10.14-final-0 ----------
~ 67 passed in 13.33s ~ |
ddl-eric-jin
left a comment
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.
Given that most of the changes are from auto-generated code, it looks good to me! I had a few comments/questions about the changes. It also would be good to run system tests with this client if you haven't already.
| AWSIAMBASICNOOVERRIDE = "AWSIAMBasicNoOverride" | ||
| AWSIAMROLE = "AWSIAMRole" | ||
| AWSIAMROLEWITHUSERNAME = "AWSIAMRoleWithUsername" | ||
| AZUREBASIC = "AzureBasic" |
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.
Nice alphabetization!
|
|
||
| @classmethod | ||
| def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: | ||
| from ..models.datasource_config import DatasourceConfig |
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 know this is auto-generated but just curious, why would they add the import inside the 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.
This is under the class method. And the data type is only used for converting from dictionary. I think the rational here is for lazy imports.
| client: Client, | ||
| ) -> Dict[str, Any]: | ||
| url = "{}/".format(client.base_url) | ||
| def _get_kwargs() -> Dict[str, Any]: |
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.
Will not returning things like the headers, cookies, etc. like before cause any issues?
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.
Nice catch! I regenerated the client again and seems this is brought back.
| added_by: "DatasourceDtoAddedBy" | ||
| auth_type: DatasourceDtoAuthType | ||
| config: DatasourceConfig | ||
| config: "DatasourceConfig" |
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.
Why is there a mix of Strings and variables for the type definitions?
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.
Very good point. I haven't found out why it's doing so. But seeing it's widely used in open api python generator and generated code. https://github.com/openapi-generators/openapi-python-client/blob/main/openapi_python_client/parser/openapi.py#L192
Will continue checking the rational behind this.
9abdfe0 to
b3fe693
Compare
Description
Regenerated the clients with the new version of openapi-python-client. Here is its release history:
https://github.com/openapi-generators/openapi-python-client/releases
To have the compatible pydantic, the openapi-python-client has to be equal to or greater than 0.15.1 where the pydantic was upgraded to V2.
https://github.com/openapi-generators/openapi-python-client/releases/tag/v0.15.1
Noticeable breaking changes that affects our generated clients include
https://github.com/openapi-generators/openapi-python-client/releases/tag/v0.15.0
Useful discussion about the new type of clients:
openapi-generators/openapi-python-client#775 (comment)
Related Issue
https://dominodatalab.atlassian.net/browse/DOM-56006
Type of Change
Checklist
CONTRIBUTING.mdguide.make codestyle.