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

[PECO-1020] Adding mock constructor method for WorkspaceClient to support mocked ApiClient #144

Merged
merged 8 commits into from
Aug 31, 2023

Conversation

gopalldb
Copy link
Contributor

Adding additional constructor in WorkspaceClient to support mocking ApiClient

Changes

A new constructor in WorkspaceClient to support mocking ApiClient

Tests

Ran $mvn clean package to verify all test cases and compilation errors

@gopalldb gopalldb requested a review from mgyucht August 30, 2023 08:26
@mgyucht
Copy link
Contributor

mgyucht commented Aug 30, 2023

Thanks for contributing this! Note that WorkspaceClient.java is a generated file. You need to make this change in .codegen/workspace.java.tmpl as well, otherwise this change will be erased the next time we update the SDK.

@gopalldb
Copy link
Contributor Author

Thanks for contributing this! Note that WorkspaceClient.java is a generated file. You need to make this change in .codegen/workspace.java.tmpl as well, otherwise this change will be erased the next time we update the SDK.

Done, Thanks for pointing out.

@mgyucht mgyucht enabled auto-merge August 30, 2023 10:08
auto-merge was automatically disabled August 30, 2023 13:00

Head branch was pushed to by a user without write access

Signed-off-by: Gopal Lal <gopal.lal@databricks.com>
@gopalldb
Copy link
Contributor Author

jenkins merge

@mgyucht mgyucht added this pull request to the merge queue Aug 31, 2023
Merged via the queue into databricks:main with commit 2596879 Aug 31, 2023
9 checks passed
pietern added a commit that referenced this pull request Sep 4, 2023
* Adding mock constructor method for WorkspaceClient to support mocked ApiClient ([#144](#144)).

API Changes:

* Renamed permissions APIs to no longer include the service name, for example:
  * `getJobPermissionLevels` -> `getPermissionLevels`
  * `getJobPermissions` -> `getPermissions`
  * `setJobPermissions` -> `setPermissions`
  * `updateJobPermissions` -> `updatePermissions`
* Changed `create()` method for `workspaceClient.volumes()` service with new required argument order.
* Added `supportsElasticDisk` field for `com.databricks.sdk.service.compute.NodeType`.
* Changed `create()` method for `workspaceClient.dashboards()` service with new required argument order.
* Added `workspaceClient.dashboardWidgets()` service.
* Added `workspaceClient.queryVisualizations()` service.
* Changed `name` field for `com.databricks.sdk.service.sql.CreateDashboardRequest` to be required.
* Added `dashboardFiltersEnabled` field for `com.databricks.sdk.service.sql.CreateDashboardRequest`.
* Added `runAsRole` field for `com.databricks.sdk.service.sql.CreateDashboardRequest`.
* Added `runAsRole` field for `com.databricks.sdk.service.sql.Query`.
* Added `runAsRole` field for `com.databricks.sdk.service.sql.QueryPostContent`.
* Removed `dashboardId` field for `com.databricks.sdk.service.sql.WidgetOptions`.
* Changed `position` field for `com.databricks.sdk.service.sql.WidgetOptions` to `com.databricks.sdk.service.sql.WidgetPosition` class.
* Removed `text` field for `com.databricks.sdk.service.sql.WidgetOptions`.
* Added `description` field for `com.databricks.sdk.service.sql.WidgetOptions`.
* Added `title` field for `com.databricks.sdk.service.sql.WidgetOptions`.
* Added `com.databricks.sdk.service.sql.CreateQueryVisualizationRequest` class.
* Added `com.databricks.sdk.service.sql.CreateWidget` class.
* Added `com.databricks.sdk.service.sql.DeleteDashboardWidgetRequest` class.
* Added `com.databricks.sdk.service.sql.DeleteQueryVisualizationRequest` class.
* Added `com.databricks.sdk.service.sql.RunAsRole` class.
* Added `com.databricks.sdk.service.sql.WidgetPosition` class.

OpenAPI SHA: 09a7fa63d9ae243e5407941f200960ca14d48b07, Date: 2023-09-04
@pietern pietern mentioned this pull request Sep 4, 2023
github-merge-queue bot pushed a commit that referenced this pull request Sep 4, 2023
* Adding mock constructor method for WorkspaceClient to support mocked
ApiClient
([#144](#144)).

API Changes:

* Renamed permissions APIs to no longer include the service name, for
example:
  * `getJobPermissionLevels` -> `getPermissionLevels`
  * `getJobPermissions` -> `getPermissions`
  * `setJobPermissions` -> `setPermissions`
  * `updateJobPermissions` -> `updatePermissions`
* Changed `create()` method for `workspaceClient.volumes()` service with
new required argument order.
* Added `supportsElasticDisk` field for
`com.databricks.sdk.service.compute.NodeType`.
* Changed `create()` method for `workspaceClient.dashboards()` service
with new required argument order.
* Added `workspaceClient.dashboardWidgets()` service.
* Added `workspaceClient.queryVisualizations()` service.
* Changed `name` field for
`com.databricks.sdk.service.sql.CreateDashboardRequest` to be required.
* Added `dashboardFiltersEnabled` field for
`com.databricks.sdk.service.sql.CreateDashboardRequest`.
* Added `runAsRole` field for
`com.databricks.sdk.service.sql.CreateDashboardRequest`.
* Added `runAsRole` field for `com.databricks.sdk.service.sql.Query`.
* Added `runAsRole` field for
`com.databricks.sdk.service.sql.QueryPostContent`.
* Removed `dashboardId` field for
`com.databricks.sdk.service.sql.WidgetOptions`.
* Changed `position` field for
`com.databricks.sdk.service.sql.WidgetOptions` to
`com.databricks.sdk.service.sql.WidgetPosition` class.
* Removed `text` field for
`com.databricks.sdk.service.sql.WidgetOptions`.
* Added `description` field for
`com.databricks.sdk.service.sql.WidgetOptions`.
* Added `title` field for
`com.databricks.sdk.service.sql.WidgetOptions`.
* Added `com.databricks.sdk.service.sql.CreateQueryVisualizationRequest`
class.
* Added `com.databricks.sdk.service.sql.CreateWidget` class.
* Added `com.databricks.sdk.service.sql.DeleteDashboardWidgetRequest`
class.
* Added `com.databricks.sdk.service.sql.DeleteQueryVisualizationRequest`
class.
* Added `com.databricks.sdk.service.sql.RunAsRole` class.
* Added `com.databricks.sdk.service.sql.WidgetPosition` class.

OpenAPI SHA: 09a7fa63d9ae243e5407941f200960ca14d48b07, Date: 2023-09-04
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