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

[Feature] DatabricksConfig: Add clone() support #376

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

satviksr-db
Copy link
Contributor

@satviksr-db satviksr-db commented Nov 2, 2024

Changes

Adds support for cloning DatabricksConfig(), this is needed because we need a way to set configurations per API call such as

  1. timeout
  2. httpClient configuration
  3. debugHeaders

However, we still want to use the cached oauth token etc and we would like the header factory to be a common object across workspace clients and databricks configs

Ideally this should be supported by the SDK itself natively, however since its not supported and it will take significant migration to achieve that, this is a work around to achieve the same.

Tests

Added UT

Copy link

github-actions bot commented Nov 2, 2024

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-java

Inputs:

  • PR number: 376
  • Commit SHA: 13e93a6d355da99b0afc466f7a0295b2a727d54a

Checks will be approved automatically on success.

@eng-dev-ecosystem-bot
Copy link
Collaborator

Test Details: go/deco-tests/11698745890

@hectorcast-db
Copy link
Contributor

Hi @satviksr-db
Thanks for the contribution. Approving and merging.
This will released in the next release.

@hectorcast-db hectorcast-db added this pull request to the merge queue Nov 6, 2024
Merged via the queue into databricks:main with commit f04f6cb Nov 6, 2024
16 checks passed
renaudhartert-db added a commit that referenced this pull request Nov 6, 2024
### New Features and Improvements

 * DatabricksConfig: Add clone() support ([#376](#376)).

### Internal Changes

 * Add test instructions for external contributors ([#370](#370)).
 * Always write message for manual test integration ([#374](#374)).
 * Automatically trigger integration tests on PR ([#369](#369)).
 * Move templates in the code generator ([#373](#373)).

### API Changes:

 * Added `workspaceClient.aibiDashboardEmbeddingAccessPolicy()` service and `workspaceClient.aibiDashboardEmbeddingApprovedDomains()` service.
 * Added `workspaceClient.credentials()` service.
 * Added `appDeployment` field for `com.databricks.sdk.service.apps.CreateAppDeploymentRequest`.
 * Added `app` field for `com.databricks.sdk.service.apps.CreateAppRequest`.
 * Added `app` field for `com.databricks.sdk.service.apps.UpdateAppRequest`.
 * Added `table` field for `com.databricks.sdk.service.catalog.CreateOnlineTableRequest`.
 * Added `azureAad` field for `com.databricks.sdk.service.catalog.GenerateTemporaryTableCredentialResponse`.
 * Added `fullName` field for `com.databricks.sdk.service.catalog.StorageCredentialInfo`.
 * Added `dashboard` field for `com.databricks.sdk.service.dashboards.CreateDashboardRequest`.
 * Added `schedule` field for `com.databricks.sdk.service.dashboards.CreateScheduleRequest`.
 * Added `subscription` field for `com.databricks.sdk.service.dashboards.CreateSubscriptionRequest`.
 * Added `warehouseId` field for `com.databricks.sdk.service.dashboards.Schedule`.
 * Added `dashboard` field for `com.databricks.sdk.service.dashboards.UpdateDashboardRequest`.
 * Added `schedule` field for `com.databricks.sdk.service.dashboards.UpdateScheduleRequest`.
 * Added `only` field for `com.databricks.sdk.service.jobs.RunNow`.
 * Added `pageToken` field for `com.databricks.sdk.service.oauth2.ListServicePrincipalSecretsRequest`.
 * Added `nextPageToken` field for `com.databricks.sdk.service.oauth2.ListServicePrincipalSecretsResponse`.
 * Added `restartWindow` field for `com.databricks.sdk.service.pipelines.CreatePipeline`.
 * Added `restartWindow` field for `com.databricks.sdk.service.pipelines.EditPipeline`.
 * Added `connectionName` field for `com.databricks.sdk.service.pipelines.IngestionGatewayPipelineDefinition`.
 * Added `restartWindow` field for `com.databricks.sdk.service.pipelines.PipelineSpec`.
 * Added `isNoPublicIpEnabled` field for `com.databricks.sdk.service.provisioning.CreateWorkspaceRequest`.
 * Added `privateAccessSettingsId` field for `com.databricks.sdk.service.provisioning.UpdateWorkspaceRequest`.
 * Added `externalCustomerInfo` and `isNoPublicIpEnabled` fields for `com.databricks.sdk.service.provisioning.Workspace`.
 * Added `lastUsedDay` field for `com.databricks.sdk.service.settings.TokenInfo`.
 * Changed `create()` method for `workspaceClient.apps()` service with new required argument order.
 * Changed `executeMessageQuery()` method for `workspaceClient.genie()` service to type `executeMessageQuery()` method for `workspaceClient.genie()` service.
 * Changed `executeMessageQuery()` method for `workspaceClient.genie()` service . New request type is `com.databricks.sdk.service.dashboards.GenieExecuteMessageQueryRequest` class.
 * Changed `create()`, `createSchedule()`, `createSubscription()` and `updateSchedule()` methods for `workspaceClient.lakeview()` service with new required argument order.
 * Removed `workspaceClient.cleanRooms()` service.
 * Removed `deploymentId`, `mode` and `sourceCodePath` fields for `com.databricks.sdk.service.apps.CreateAppDeploymentRequest`.
 * Removed `description`, `name` and `resources` fields for `com.databricks.sdk.service.apps.CreateAppRequest`.
 * Removed `description` and `resources` fields for `com.databricks.sdk.service.apps.UpdateAppRequest`.
 * Removed `name` and `spec` fields for `com.databricks.sdk.service.catalog.CreateOnlineTableRequest`.
 * Removed `displayName`, `parentPath`, `serializedDashboard` and `warehouseId` fields for `com.databricks.sdk.service.dashboards.CreateDashboardRequest`.
 * Removed `cronSchedule`, `displayName` and `pauseStatus` fields for `com.databricks.sdk.service.dashboards.CreateScheduleRequest`.
 * Removed `subscriber` field for `com.databricks.sdk.service.dashboards.CreateSubscriptionRequest`.
 * Removed `displayName`, `etag`, `serializedDashboard` and `warehouseId` fields for `com.databricks.sdk.service.dashboards.UpdateDashboardRequest`.
 * Removed `cronSchedule`, `displayName`, `etag` and `pauseStatus` fields for `com.databricks.sdk.service.dashboards.UpdateScheduleRequest`.
 * Removed `prevPageToken` field for `com.databricks.sdk.service.jobs.Run`.

OpenAPI SHA: d15ea353ad7a0279b741428a8231b84f5eb28c94, Date: 2024-11-06
renaudhartert-db added a commit that referenced this pull request Nov 6, 2024
### New Features and Improvements

 * DatabricksConfig: Add clone() support ([#376](#376)).

### Internal Changes

 * Add test instructions for external contributors ([#370](#370)).
 * Always write message for manual test integration ([#374](#374)).
 * Automatically trigger integration tests on PR ([#369](#369)).
 * Move templates in the code generator ([#373](#373)).
 * Refresh PR template ([#381](#381)).

### API Changes:

 * Added `workspaceClient.aibiDashboardEmbeddingAccessPolicy()` service and `workspaceClient.aibiDashboardEmbeddingApprovedDomains()` service.
 * Added `workspaceClient.credentials()` service.
 * Added `appDeployment` field for `com.databricks.sdk.service.apps.CreateAppDeploymentRequest`.
 * Added `app` field for `com.databricks.sdk.service.apps.CreateAppRequest`.
 * Added `app` field for `com.databricks.sdk.service.apps.UpdateAppRequest`.
 * Added `table` field for `com.databricks.sdk.service.catalog.CreateOnlineTableRequest`.
 * Added `azureAad` field for `com.databricks.sdk.service.catalog.GenerateTemporaryTableCredentialResponse`.
 * Added `fullName` field for `com.databricks.sdk.service.catalog.StorageCredentialInfo`.
 * Added `dashboard` field for `com.databricks.sdk.service.dashboards.CreateDashboardRequest`.
 * Added `schedule` field for `com.databricks.sdk.service.dashboards.CreateScheduleRequest`.
 * Added `subscription` field for `com.databricks.sdk.service.dashboards.CreateSubscriptionRequest`.
 * Added `warehouseId` field for `com.databricks.sdk.service.dashboards.Schedule`.
 * Added `dashboard` field for `com.databricks.sdk.service.dashboards.UpdateDashboardRequest`.
 * Added `schedule` field for `com.databricks.sdk.service.dashboards.UpdateScheduleRequest`.
 * Added `only` field for `com.databricks.sdk.service.jobs.RunNow`.
 * Added `pageToken` field for `com.databricks.sdk.service.oauth2.ListServicePrincipalSecretsRequest`.
 * Added `nextPageToken` field for `com.databricks.sdk.service.oauth2.ListServicePrincipalSecretsResponse`.
 * Added `restartWindow` field for `com.databricks.sdk.service.pipelines.CreatePipeline`.
 * Added `restartWindow` field for `com.databricks.sdk.service.pipelines.EditPipeline`.
 * Added `connectionName` field for `com.databricks.sdk.service.pipelines.IngestionGatewayPipelineDefinition`.
 * Added `restartWindow` field for `com.databricks.sdk.service.pipelines.PipelineSpec`.
 * Added `isNoPublicIpEnabled` field for `com.databricks.sdk.service.provisioning.CreateWorkspaceRequest`.
 * Added `privateAccessSettingsId` field for `com.databricks.sdk.service.provisioning.UpdateWorkspaceRequest`.
 * Added `externalCustomerInfo` and `isNoPublicIpEnabled` fields for `com.databricks.sdk.service.provisioning.Workspace`.
 * Added `lastUsedDay` field for `com.databricks.sdk.service.settings.TokenInfo`.
 * Changed `create()` method for `workspaceClient.apps()` service with new required argument order.
 * Changed `executeMessageQuery()` method for `workspaceClient.genie()` service to type `executeMessageQuery()` method for `workspaceClient.genie()` service.
 * Changed `executeMessageQuery()` method for `workspaceClient.genie()` service . New request type is `com.databricks.sdk.service.dashboards.GenieExecuteMessageQueryRequest` class.
 * Changed `create()`, `createSchedule()`, `createSubscription()` and `updateSchedule()` methods for `workspaceClient.lakeview()` service with new required argument order.
 * Removed `workspaceClient.cleanRooms()` service.
 * Removed `deploymentId`, `mode` and `sourceCodePath` fields for `com.databricks.sdk.service.apps.CreateAppDeploymentRequest`.
 * Removed `description`, `name` and `resources` fields for `com.databricks.sdk.service.apps.CreateAppRequest`.
 * Removed `description` and `resources` fields for `com.databricks.sdk.service.apps.UpdateAppRequest`.
 * Removed `name` and `spec` fields for `com.databricks.sdk.service.catalog.CreateOnlineTableRequest`.
 * Removed `displayName`, `parentPath`, `serializedDashboard` and `warehouseId` fields for `com.databricks.sdk.service.dashboards.CreateDashboardRequest`.
 * Removed `cronSchedule`, `displayName` and `pauseStatus` fields for `com.databricks.sdk.service.dashboards.CreateScheduleRequest`.
 * Removed `subscriber` field for `com.databricks.sdk.service.dashboards.CreateSubscriptionRequest`.
 * Removed `displayName`, `etag`, `serializedDashboard` and `warehouseId` fields for `com.databricks.sdk.service.dashboards.UpdateDashboardRequest`.
 * Removed `cronSchedule`, `displayName`, `etag` and `pauseStatus` fields for `com.databricks.sdk.service.dashboards.UpdateScheduleRequest`.
 * Removed `prevPageToken` field for `com.databricks.sdk.service.jobs.Run`.

OpenAPI SHA: d15ea353ad7a0279b741428a8231b84f5eb28c94, Date: 2024-11-06
renaudhartert-db added a commit that referenced this pull request Nov 7, 2024
### New Features and Improvements

 * DatabricksConfig: Add clone() support ([#376](#376)).

### Bug Fixes

 * Fix vulnerabilities in the present SDK version ([#383](#383)).

### Internal Changes

 * Add test instructions for external contributors ([#370](#370)).
 * Always write message for manual test integration ([#374](#374)).
 * Automatically trigger integration tests on PR ([#369](#369)).
 * Move templates in the code generator ([#373](#373)).
 * Refresh PR template ([#381](#381)).

### API Changes:

 * Added `workspaceClient.aibiDashboardEmbeddingAccessPolicy()` service and `workspaceClient.aibiDashboardEmbeddingApprovedDomains()` service.
 * Added `workspaceClient.credentials()` service.
 * Added `appDeployment` field for `com.databricks.sdk.service.apps.CreateAppDeploymentRequest`.
 * Added `app` field for `com.databricks.sdk.service.apps.CreateAppRequest`.
 * Added `app` field for `com.databricks.sdk.service.apps.UpdateAppRequest`.
 * Added `table` field for `com.databricks.sdk.service.catalog.CreateOnlineTableRequest`.
 * Added `azureAad` field for `com.databricks.sdk.service.catalog.GenerateTemporaryTableCredentialResponse`.
 * Added `omitUsername` field for `com.databricks.sdk.service.catalog.ListTablesRequest`.
 * Added `fullName` field for `com.databricks.sdk.service.catalog.StorageCredentialInfo`.
 * Added `dashboard` field for `com.databricks.sdk.service.dashboards.CreateDashboardRequest`.
 * Added `schedule` field for `com.databricks.sdk.service.dashboards.CreateScheduleRequest`.
 * Added `subscription` field for `com.databricks.sdk.service.dashboards.CreateSubscriptionRequest`.
 * Added `warehouseId` field for `com.databricks.sdk.service.dashboards.Schedule`.
 * Added `dashboard` field for `com.databricks.sdk.service.dashboards.UpdateDashboardRequest`.
 * Added `schedule` field for `com.databricks.sdk.service.dashboards.UpdateScheduleRequest`.
 * Added `only` field for `com.databricks.sdk.service.jobs.RunNow`.
 * Added `pageToken` field for `com.databricks.sdk.service.oauth2.ListServicePrincipalSecretsRequest`.
 * Added `nextPageToken` field for `com.databricks.sdk.service.oauth2.ListServicePrincipalSecretsResponse`.
 * Added `restartWindow` field for `com.databricks.sdk.service.pipelines.CreatePipeline`.
 * Added `restartWindow` field for `com.databricks.sdk.service.pipelines.EditPipeline`.
 * Added `connectionName` field for `com.databricks.sdk.service.pipelines.IngestionGatewayPipelineDefinition`.
 * Added `restartWindow` field for `com.databricks.sdk.service.pipelines.PipelineSpec`.
 * Added `isNoPublicIpEnabled` field for `com.databricks.sdk.service.provisioning.CreateWorkspaceRequest`.
 * Added `privateAccessSettingsId` field for `com.databricks.sdk.service.provisioning.UpdateWorkspaceRequest`.
 * Added `externalCustomerInfo` and `isNoPublicIpEnabled` fields for `com.databricks.sdk.service.provisioning.Workspace`.
 * Added `lastUsedDay` field for `com.databricks.sdk.service.settings.TokenInfo`.
 * Changed `create()` method for `workspaceClient.apps()` service with new required argument order.
 * Changed `executeMessageQuery()` method for `workspaceClient.genie()` service . New request type is `com.databricks.sdk.service.dashboards.GenieExecuteMessageQueryRequest` class.
 * Changed `executeMessageQuery()` method for `workspaceClient.genie()` service to type `executeMessageQuery()` method for `workspaceClient.genie()` service.
 * Changed `create()`, `createSchedule()`, `createSubscription()` and `updateSchedule()` methods for `workspaceClient.lakeview()` service with new required argument order.
 * Removed `workspaceClient.cleanRooms()` service.
 * Removed `deploymentId`, `mode` and `sourceCodePath` fields for `com.databricks.sdk.service.apps.CreateAppDeploymentRequest`.
 * Removed `description`, `name` and `resources` fields for `com.databricks.sdk.service.apps.CreateAppRequest`.
 * Removed `description` and `resources` fields for `com.databricks.sdk.service.apps.UpdateAppRequest`.
 * Removed `name` and `spec` fields for `com.databricks.sdk.service.catalog.CreateOnlineTableRequest`.
 * Removed `displayName`, `parentPath`, `serializedDashboard` and `warehouseId` fields for `com.databricks.sdk.service.dashboards.CreateDashboardRequest`.
 * Removed `cronSchedule`, `displayName` and `pauseStatus` fields for `com.databricks.sdk.service.dashboards.CreateScheduleRequest`.
 * Removed `subscriber` field for `com.databricks.sdk.service.dashboards.CreateSubscriptionRequest`.
 * Removed `displayName`, `etag`, `serializedDashboard` and `warehouseId` fields for `com.databricks.sdk.service.dashboards.UpdateDashboardRequest`.
 * Removed `cronSchedule`, `displayName`, `etag` and `pauseStatus` fields for `com.databricks.sdk.service.dashboards.UpdateScheduleRequest`.
 * Removed `prevPageToken` field for `com.databricks.sdk.service.jobs.Run`.

OpenAPI SHA: d25296d2f4aa7bd6195c816fdf82e0f960f775da, Date: 2024-11-07
github-merge-queue bot pushed a commit that referenced this pull request Nov 7, 2024
### New Features and Improvements

* DatabricksConfig: Add clone() support
([#376](#376)).


### Bug Fixes

* Fix vulnerabilities in the present SDK version
([#383](#383)).


### Internal Changes

* Add test instructions for external contributors
([#370](#370)).
* Always write message for manual test integration
([#374](#374)).
* Automatically trigger integration tests on PR
([#369](#369)).
* Move templates in the code generator
([#373](#373)).
* Refresh PR template
([#381](#381)).


### API Changes:

* Added `workspaceClient.aibiDashboardEmbeddingAccessPolicy()` service
and `workspaceClient.aibiDashboardEmbeddingApprovedDomains()` service.
 * Added `workspaceClient.credentials()` service.
* Added `appDeployment` field for
`com.databricks.sdk.service.apps.CreateAppDeploymentRequest`.
* Added `app` field for
`com.databricks.sdk.service.apps.CreateAppRequest`.
* Added `app` field for
`com.databricks.sdk.service.apps.UpdateAppRequest`.
* Added `table` field for
`com.databricks.sdk.service.catalog.CreateOnlineTableRequest`.
* Added `azureAad` field for
`com.databricks.sdk.service.catalog.GenerateTemporaryTableCredentialResponse`.
* Added `omitUsername` field for
`com.databricks.sdk.service.catalog.ListTablesRequest`.
* Added `fullName` field for
`com.databricks.sdk.service.catalog.StorageCredentialInfo`.
* Added `dashboard` field for
`com.databricks.sdk.service.dashboards.CreateDashboardRequest`.
* Added `schedule` field for
`com.databricks.sdk.service.dashboards.CreateScheduleRequest`.
* Added `subscription` field for
`com.databricks.sdk.service.dashboards.CreateSubscriptionRequest`.
* Added `warehouseId` field for
`com.databricks.sdk.service.dashboards.Schedule`.
* Added `dashboard` field for
`com.databricks.sdk.service.dashboards.UpdateDashboardRequest`.
* Added `schedule` field for
`com.databricks.sdk.service.dashboards.UpdateScheduleRequest`.
 * Added `only` field for `com.databricks.sdk.service.jobs.RunNow`.
* Added `pageToken` field for
`com.databricks.sdk.service.oauth2.ListServicePrincipalSecretsRequest`.
* Added `nextPageToken` field for
`com.databricks.sdk.service.oauth2.ListServicePrincipalSecretsResponse`.
* Added `restartWindow` field for
`com.databricks.sdk.service.pipelines.CreatePipeline`.
* Added `restartWindow` field for
`com.databricks.sdk.service.pipelines.EditPipeline`.
* Added `connectionName` field for
`com.databricks.sdk.service.pipelines.IngestionGatewayPipelineDefinition`.
* Added `restartWindow` field for
`com.databricks.sdk.service.pipelines.PipelineSpec`.
* Added `isNoPublicIpEnabled` field for
`com.databricks.sdk.service.provisioning.CreateWorkspaceRequest`.
* Added `privateAccessSettingsId` field for
`com.databricks.sdk.service.provisioning.UpdateWorkspaceRequest`.
* Added `externalCustomerInfo` and `isNoPublicIpEnabled` fields for
`com.databricks.sdk.service.provisioning.Workspace`.
* Added `lastUsedDay` field for
`com.databricks.sdk.service.settings.TokenInfo`.
* Changed `create()` method for `workspaceClient.apps()` service with
new required argument order.
* Changed `executeMessageQuery()` method for `workspaceClient.genie()`
service . New request type is
`com.databricks.sdk.service.dashboards.GenieExecuteMessageQueryRequest`
class.
* Changed `executeMessageQuery()` method for `workspaceClient.genie()`
service to type `executeMessageQuery()` method for
`workspaceClient.genie()` service.
* Changed `create()`, `createSchedule()`, `createSubscription()` and
`updateSchedule()` methods for `workspaceClient.lakeview()` service with
new required argument order.
 * Removed `workspaceClient.cleanRooms()` service.
* Removed `deploymentId`, `mode` and `sourceCodePath` fields for
`com.databricks.sdk.service.apps.CreateAppDeploymentRequest`.
* Removed `description`, `name` and `resources` fields for
`com.databricks.sdk.service.apps.CreateAppRequest`.
* Removed `description` and `resources` fields for
`com.databricks.sdk.service.apps.UpdateAppRequest`.
* Removed `name` and `spec` fields for
`com.databricks.sdk.service.catalog.CreateOnlineTableRequest`.
* Removed `displayName`, `parentPath`, `serializedDashboard` and
`warehouseId` fields for
`com.databricks.sdk.service.dashboards.CreateDashboardRequest`.
* Removed `cronSchedule`, `displayName` and `pauseStatus` fields for
`com.databricks.sdk.service.dashboards.CreateScheduleRequest`.
* Removed `subscriber` field for
`com.databricks.sdk.service.dashboards.CreateSubscriptionRequest`.
* Removed `displayName`, `etag`, `serializedDashboard` and `warehouseId`
fields for
`com.databricks.sdk.service.dashboards.UpdateDashboardRequest`.
* Removed `cronSchedule`, `displayName`, `etag` and `pauseStatus` fields
for `com.databricks.sdk.service.dashboards.UpdateScheduleRequest`.
* Removed `prevPageToken` field for
`com.databricks.sdk.service.jobs.Run`.

OpenAPI SHA: d25296d2f4aa7bd6195c816fdf82e0f960f775da, Date: 2024-11-07
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.

4 participants