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

Fixed code generation of primitive types #354

Merged
merged 2 commits into from
Sep 20, 2023
Merged

Fixed code generation of primitive types #354

merged 2 commits into from
Sep 20, 2023

Conversation

tanmay-db
Copy link
Contributor

@tanmay-db tanmay-db commented Sep 20, 2023

Changes

Use primitive types in response.

Tests

SDK generation at current spec: deco openapi generate-sdk py --openapi-spec 09a7fa63d9ae243e5407941f200960ca14d48b07

  • make test run locally
  • make fmt applied
  • relevant integration tests applied

@tanmay-db tanmay-db changed the title Fix primitive response types Fixed code generation of primitive types Sep 20, 2023
Copy link
Contributor

@mgyucht mgyucht left a comment

Choose a reason for hiding this comment

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

LGTM!

@mgyucht mgyucht added this pull request to the merge queue Sep 20, 2023
Merged via the queue into main with commit 7dd80d1 Sep 20, 2023
8 checks passed
@mgyucht mgyucht deleted the openapi branch September 20, 2023 15:32
github-merge-queue bot pushed a commit that referenced this pull request Sep 20, 2023
## Changes
<!-- Summary of your changes that are easy to understand -->
Updating SDK to changes in OpenAPI. To be merged after:
#354.

## Tests
<!-- 
How is this tested? Please see the checklist below and also describe any
other relevant tests
-->
Integration tests running...
- [ ] `make test` run locally
- [ ] `make fmt` applied
- [ ] relevant integration tests applied
tanmay-db added a commit that referenced this pull request Sep 20, 2023
* Don't try to import runtime_auth when not in runtime ([#327](#327)).
* [DECO-2485] Handle Azure authentication when WorkspaceResourceID is provided ([#328](#328)).
* Add ErrorInfo to API errors ([#347](#347)).
* Fix eager default argument evaluation in `DatabricksError` ([#353](#353)).
* Fixed code generation of primitive types ([#354](#354)).
* Updated SDK to changes in OpenAPI specification ([#355](#355)).

API Changes:

 * Changed `list()` method for [a.account_metastore_assignments](https://databricks-sdk-py.readthedocs.io/en/latest/account/account_metastore_assignments.html) account-level service to return `databricks.sdk.service.catalog.WorkspaceIdList` dataclass.
 * Changed `artifact_matchers` field for `databricks.sdk.service.catalog.ArtifactAllowlistInfo` to `databricks.sdk.service.catalog.ArtifactMatcherList` dataclass.
 * Changed `artifact_matchers` field for `databricks.sdk.service.catalog.SetArtifactAllowlist` to `databricks.sdk.service.catalog.ArtifactMatcherList` dataclass.
 * Added `databricks.sdk.service.catalog.WorkspaceId` dataclass.
 * Changed `cancel_all_runs()` method for [w.jobs](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/jobs.html) workspace-level service with new required argument order.
 * Changed `job_id` field for `databricks.sdk.service.jobs.CancelAllRuns` to no longer be required.
 * Added `all_queued_runs` field for `databricks.sdk.service.jobs.CancelAllRuns`.
 * Added `queue` field for `databricks.sdk.service.jobs.CreateJob`.
 * Added `queue` field for `databricks.sdk.service.jobs.JobSettings`.
 * Added `queue` field for `databricks.sdk.service.jobs.RunNow`.
 * Added `queue_reason` field for `databricks.sdk.service.jobs.RunState`.
 * Added `queue_duration` field for `databricks.sdk.service.jobs.RunTask`.
 * Added `queue` field for `databricks.sdk.service.jobs.SubmitRun`.
 * Added `databricks.sdk.service.jobs.QueueSettings` dataclass.
 * Added [a.o_auth_published_apps](https://databricks-sdk-py.readthedocs.io/en/latest/account/o_auth_published_apps.html) account-level service.
 * Added `databricks.sdk.service.oauth2.GetPublishedAppsOutput` dataclass.
 * Added `databricks.sdk.service.oauth2.ListOAuthPublishedAppsRequest` dataclass.
 * Added `databricks.sdk.service.oauth2.PublishedAppOutput` dataclass.
 * Added `patch()` method for [w.serving_endpoints](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/serving_endpoints.html) workspace-level service.
 * Added `tags` field for `databricks.sdk.service.serving.CreateServingEndpoint`.
 * Added `tags` field for `databricks.sdk.service.serving.ServingEndpoint`.
 * Added `tags` field for `databricks.sdk.service.serving.ServingEndpointDetailed`.
 * Added `databricks.sdk.service.serving.EndpointTag` dataclass.
 * Added `databricks.sdk.service.serving.PatchServingEndpointTags` dataclass.
 * Added [w.credentials_manager](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/credentials_manager.html) workspace-level service.
 * Added `databricks.sdk.service.settings.ExchangeToken` dataclass.
 * Added `databricks.sdk.service.settings.ExchangeTokenRequest` dataclass.
 * Added `databricks.sdk.service.settings.ExchangeTokenResponse` dataclass.
 * Added `databricks.sdk.service.settings.PartitionId` dataclass.
 * Added `databricks.sdk.service.settings.TokenType` dataclass.
 * Changed `execute_statement()` method for [w.statement_execution](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/statement_execution.html) workspace-level service with new required argument order.
 * Added `empty_result_state` field for `databricks.sdk.service.sql.AlertOptions`.
 * Removed `databricks.sdk.service.sql.ChunkInfo` dataclass.
 * Changed `on_wait_timeout` field for `databricks.sdk.service.sql.ExecuteStatementRequest` to `databricks.sdk.service.sql.ExecuteStatementRequestOnWaitTimeout` dataclass.
 * Changed `statement` field for `databricks.sdk.service.sql.ExecuteStatementRequest` to be required.
 * Changed `warehouse_id` field for `databricks.sdk.service.sql.ExecuteStatementRequest` to be required.
 * Changed `chunks` field for `databricks.sdk.service.sql.ResultManifest` to `databricks.sdk.service.sql.BaseChunkInfoList` dataclass.
 * Added `truncated` field for `databricks.sdk.service.sql.ResultManifest`.
 * Removed `databricks.sdk.service.sql.TimeoutAction` dataclass.
 * Added `databricks.sdk.service.sql.AlertOptionsEmptyResultState` dataclass.
 * Added `databricks.sdk.service.sql.BaseChunkInfo` dataclass.
 * Added `databricks.sdk.service.sql.ExecuteStatementRequestOnWaitTimeout` dataclass.

OpenAPI SHA: b52a3b410976501f08f76ca0b355fb2dca876953, Date: 2023-09-15
@tanmay-db tanmay-db mentioned this pull request Sep 20, 2023
github-merge-queue bot pushed a commit that referenced this pull request Sep 20, 2023
* Don't try to import runtime_auth when not in runtime
([#327](#327)).
* Handled Azure authentication when WorkspaceResourceID is provided
([#328](#328)).
* Added ErrorInfo to API errors
([#347](#347)).
* Fixed eager default argument evaluation in `DatabricksError`
([#353](#353)).
* Fixed code generation of primitive types
([#354](#354)).
* Updated SDK to changes in OpenAPI specification
([#355](#355)).

API Changes:

* Changed `list()` method for
[a.account_metastore_assignments](https://databricks-sdk-py.readthedocs.io/en/latest/account/account_metastore_assignments.html)
account-level service to return
`databricks.sdk.service.catalog.WorkspaceIdList` dataclass.
* Changed `artifact_matchers` field for
`databricks.sdk.service.catalog.ArtifactAllowlistInfo` to
`databricks.sdk.service.catalog.ArtifactMatcherList` dataclass.
* Changed `artifact_matchers` field for
`databricks.sdk.service.catalog.SetArtifactAllowlist` to
`databricks.sdk.service.catalog.ArtifactMatcherList` dataclass.
 * Added `databricks.sdk.service.catalog.WorkspaceId` dataclass.
* Changed `cancel_all_runs()` method for
[w.jobs](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/jobs.html)
workspace-level service with new required argument order.
* Changed `job_id` field for `databricks.sdk.service.jobs.CancelAllRuns`
to no longer be required.
* Added `all_queued_runs` field for
`databricks.sdk.service.jobs.CancelAllRuns`.
 * Added `queue` field for `databricks.sdk.service.jobs.CreateJob`.
 * Added `queue` field for `databricks.sdk.service.jobs.JobSettings`.
 * Added `queue` field for `databricks.sdk.service.jobs.RunNow`.
* Added `queue_reason` field for `databricks.sdk.service.jobs.RunState`.
* Added `queue_duration` field for
`databricks.sdk.service.jobs.RunTask`.
 * Added `queue` field for `databricks.sdk.service.jobs.SubmitRun`.
 * Added `databricks.sdk.service.jobs.QueueSettings` dataclass.
* Added
[a.o_auth_published_apps](https://databricks-sdk-py.readthedocs.io/en/latest/account/o_auth_published_apps.html)
account-level service.
* Added `databricks.sdk.service.oauth2.GetPublishedAppsOutput`
dataclass.
* Added `databricks.sdk.service.oauth2.ListOAuthPublishedAppsRequest`
dataclass.
 * Added `databricks.sdk.service.oauth2.PublishedAppOutput` dataclass.
* Added `patch()` method for
[w.serving_endpoints](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/serving_endpoints.html)
workspace-level service.
* Added `tags` field for
`databricks.sdk.service.serving.CreateServingEndpoint`.
* Added `tags` field for
`databricks.sdk.service.serving.ServingEndpoint`.
* Added `tags` field for
`databricks.sdk.service.serving.ServingEndpointDetailed`.
 * Added `databricks.sdk.service.serving.EndpointTag` dataclass.
* Added `databricks.sdk.service.serving.PatchServingEndpointTags`
dataclass.
* Added
[w.credentials_manager](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/credentials_manager.html)
workspace-level service.
 * Added `databricks.sdk.service.settings.ExchangeToken` dataclass.
* Added `databricks.sdk.service.settings.ExchangeTokenRequest`
dataclass.
* Added `databricks.sdk.service.settings.ExchangeTokenResponse`
dataclass.
 * Added `databricks.sdk.service.settings.PartitionId` dataclass.
 * Added `databricks.sdk.service.settings.TokenType` dataclass.
* Changed `execute_statement()` method for
[w.statement_execution](https://databricks-sdk-py.readthedocs.io/en/latest/workspace/statement_execution.html)
workspace-level service with new required argument order.
* Added `empty_result_state` field for
`databricks.sdk.service.sql.AlertOptions`.
 * Removed `databricks.sdk.service.sql.ChunkInfo` dataclass.
* Changed `on_wait_timeout` field for
`databricks.sdk.service.sql.ExecuteStatementRequest` to
`databricks.sdk.service.sql.ExecuteStatementRequestOnWaitTimeout`
dataclass.
* Changed `statement` field for
`databricks.sdk.service.sql.ExecuteStatementRequest` to be required.
* Changed `warehouse_id` field for
`databricks.sdk.service.sql.ExecuteStatementRequest` to be required.
* Changed `chunks` field for `databricks.sdk.service.sql.ResultManifest`
to `databricks.sdk.service.sql.BaseChunkInfoList` dataclass.
* Added `truncated` field for
`databricks.sdk.service.sql.ResultManifest`.
 * Removed `databricks.sdk.service.sql.TimeoutAction` dataclass.
* Added `databricks.sdk.service.sql.AlertOptionsEmptyResultState`
dataclass.
 * Added `databricks.sdk.service.sql.BaseChunkInfo` dataclass.
* Added
`databricks.sdk.service.sql.ExecuteStatementRequestOnWaitTimeout`
dataclass.

OpenAPI SHA: b52a3b410976501f08f76ca0b355fb2dca876953, Date: 2023-09-15
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.

2 participants