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

Support head operations #232

Merged
merged 14 commits into from
Feb 19, 2024
Merged

Support head operations #232

merged 14 commits into from
Feb 19, 2024

Conversation

hectorcast-db
Copy link
Contributor

Changes

Support head operations

Tests

Generated SDK and run Files integration tests.

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.

Overall, looking good. Let's make sure there is at least 1 integration test to cover this case before we merge, if possible.


@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Header {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a doccomment here?

try {
object = target.getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new IOException("Unable to initialize an instance of type " + target.getName());
Copy link
Contributor

Choose a reason for hiding this comment

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

We should throw only DatabricksException here

} else {
LOG.warn("Unsupported header type: " + field.getType());
}
field.setAccessible(false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Move this from here & catch case to finally

@@ -44,7 +44,10 @@ private void writeFileAndReadFileInner(

// Write the file to DBFS.
workspace.files().upload(fileName, inputStream);

// TODO: Enable after SDK generated
Copy link
Contributor

Choose a reason for hiding this comment

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

Reminder to uncomment this

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.

Approved (though we'll test in a follow-up PR).

@hectorcast-db hectorcast-db added this pull request to the merge queue Feb 19, 2024
Merged via the queue into main with commit a583719 Feb 19, 2024
9 checks passed
@hectorcast-db hectorcast-db deleted the support-head-operations branch February 19, 2024 11:02
hectorcast-db added a commit that referenced this pull request Feb 19, 2024
Internal Changes:

* Support head operations ([#232](#232)).

API Changes:

 * Changed `delete()` method for `workspaceClient.connections()` service with new required argument order.
 * Changed `get()` method for `workspaceClient.connections()` service with new required argument order.
 * Changed `update()` method for `workspaceClient.connections()` service with new required argument order.
 * Changed `update()` method for `workspaceClient.lakehouseMonitors()` service with new required argument order.
 * Changed `delete()` method for `workspaceClient.volumes()` service with new required argument order.
 * Changed `read()` method for `workspaceClient.volumes()` service with new required argument order.
 * Changed `update()` method for `workspaceClient.volumes()` service with new required argument order.
 * Added `workspaceClient.onlineTables()` service.
 * Removed `nameArg` field for `com.databricks.sdk.service.catalog.DeleteConnectionRequest`.
 * Added `name` field for `com.databricks.sdk.service.catalog.DeleteConnectionRequest`.
 * Removed `fullNameArg` field for `com.databricks.sdk.service.catalog.DeleteVolumeRequest`.
 * Added `name` field for `com.databricks.sdk.service.catalog.DeleteVolumeRequest`.
 * Removed `nameArg` field for `com.databricks.sdk.service.catalog.GetConnectionRequest`.
 * Added `name` field for `com.databricks.sdk.service.catalog.GetConnectionRequest`.
 * Added `maxResults` field for `com.databricks.sdk.service.catalog.ListVolumesRequest`.
 * Added `pageToken` field for `com.databricks.sdk.service.catalog.ListVolumesRequest`.
 * Added `nextPageToken` field for `com.databricks.sdk.service.catalog.ListVolumesResponseContent`.
 * Removed `fullNameArg` field for `com.databricks.sdk.service.catalog.ReadVolumeRequest`.
 * Added `name` field for `com.databricks.sdk.service.catalog.ReadVolumeRequest`.
 * Removed `nameArg` field for `com.databricks.sdk.service.catalog.UpdateConnection`.
 * Added `name` field for `com.databricks.sdk.service.catalog.UpdateConnection`.
 * Removed `assetsDir` field for `com.databricks.sdk.service.catalog.UpdateMonitor`.
 * Removed `fullNameArg` field for `com.databricks.sdk.service.catalog.UpdateVolumeRequestContent`.
 * Added `name` field for `com.databricks.sdk.service.catalog.UpdateVolumeRequestContent`.
 * Added `com.databricks.sdk.service.catalog.ContinuousUpdateStatus` class.
 * Added `com.databricks.sdk.service.catalog.DeleteOnlineTableRequest` class.
 * Added `com.databricks.sdk.service.catalog.FailedStatus` class.
 * Added `com.databricks.sdk.service.catalog.GetOnlineTableRequest` class.
 * Added `com.databricks.sdk.service.catalog.OnlineTable` class.
 * Added `com.databricks.sdk.service.catalog.OnlineTableSpec` class.
 * Added `com.databricks.sdk.service.catalog.OnlineTableState` class.
 * Added `com.databricks.sdk.service.catalog.OnlineTableStatus` class.
 * Added `com.databricks.sdk.service.catalog.PipelineProgress` class.
 * Added `com.databricks.sdk.service.catalog.ProvisioningStatus` class.
 * Added `com.databricks.sdk.service.catalog.TriggeredUpdateStatus` class.
 * Added `com.databricks.sdk.service.catalog.ViewData` class.
 * Added `getDirectoryMetadata()` method for `workspaceClient.files()` service.
 * Added `getMetadata()` method for `workspaceClient.files()` service.
 * Added `contentLength` field for `com.databricks.sdk.service.files.DownloadResponse`.
 * Added `contentType` field for `com.databricks.sdk.service.files.DownloadResponse`.
 * Added `lastModified` field for `com.databricks.sdk.service.files.DownloadResponse`.
 * Added `com.databricks.sdk.service.files.FileSize` class.
 * Added `com.databricks.sdk.service.files.GetDirectoryMetadataRequest` class.
 * Added `com.databricks.sdk.service.files.GetMetadataRequest` class.
 * Added `com.databricks.sdk.service.files.GetMetadataResponse` class.
 * Added `com.databricks.sdk.service.files.LastModifiedHttpDate` class.
 * Removed `triggerHistory` field for `com.databricks.sdk.service.jobs.Job`.
 * Removed `com.databricks.sdk.service.jobs.TriggerEvaluation` class.
 * Removed `com.databricks.sdk.service.jobs.TriggerHistory` class.
 * Added `table` field for `com.databricks.sdk.service.jobs.TriggerSettings`.
 * Added `com.databricks.sdk.service.jobs.Condition` class.
 * Added `com.databricks.sdk.service.jobs.TableTriggerConfiguration` class.
 * Removed `config` field for `com.databricks.sdk.service.serving.ExternalModel`.
 * Added `ai21labsConfig` field for `com.databricks.sdk.service.serving.ExternalModel`.
 * Added `anthropicConfig` field for `com.databricks.sdk.service.serving.ExternalModel`.
 * Added `awsBedrockConfig` field for `com.databricks.sdk.service.serving.ExternalModel`.
 * Added `cohereConfig` field for `com.databricks.sdk.service.serving.ExternalModel`.
 * Added `databricksModelServingConfig` field for `com.databricks.sdk.service.serving.ExternalModel`.
 * Added `openaiConfig` field for `com.databricks.sdk.service.serving.ExternalModel`.
 * Added `palmConfig` field for `com.databricks.sdk.service.serving.ExternalModel`.
 * Removed `com.databricks.sdk.service.serving.ExternalModelConfig` class.
 * Added `maxProvisionedThroughput` field for `com.databricks.sdk.service.serving.ServedEntityInput`.
 * Added `minProvisionedThroughput` field for `com.databricks.sdk.service.serving.ServedEntityInput`.
 * Added `maxProvisionedThroughput` field for `com.databricks.sdk.service.serving.ServedEntityOutput`.
 * Added `minProvisionedThroughput` field for `com.databricks.sdk.service.serving.ServedEntityOutput`.
 * Changed `delete()` method for `workspaceClient.cleanRooms()` service with new required argument order.
 * Changed `get()` method for `workspaceClient.cleanRooms()` service with new required argument order.
 * Changed `update()` method for `workspaceClient.cleanRooms()` service with new required argument order.
 * Removed `nameArg` field for `com.databricks.sdk.service.sharing.DeleteCleanRoomRequest`.
 * Added `name` field for `com.databricks.sdk.service.sharing.DeleteCleanRoomRequest`.
 * Removed `nameArg` field for `com.databricks.sdk.service.sharing.GetCleanRoomRequest`.
 * Added `name` field for `com.databricks.sdk.service.sharing.GetCleanRoomRequest`.
 * Removed `nameArg` field for `com.databricks.sdk.service.sharing.UpdateCleanRoom`.
 * Added `name` field for `com.databricks.sdk.service.sharing.UpdateCleanRoom`.
 * Added `enumOptions` field for `com.databricks.sdk.service.sql.Parameter`.
 * Added `multiValuesOptions` field for `com.databricks.sdk.service.sql.Parameter`.
 * Added `queryId` field for `com.databricks.sdk.service.sql.Parameter`.
 * Added `com.databricks.sdk.service.sql.MultiValuesOptions` class.

OpenAPI SHA: cdd76a98a4fca7008572b3a94427566dd286c63b, Date: 2024-02-19
@hectorcast-db hectorcast-db mentioned this pull request Feb 19, 2024
github-merge-queue bot pushed a commit that referenced this pull request Feb 19, 2024
Internal Changes:

* Support head operations
([#232](#232)).

API Changes:

* Changed `delete()` method for `workspaceClient.connections()` service
with new required argument order.
* Changed `get()` method for `workspaceClient.connections()` service
with new required argument order.
* Changed `update()` method for `workspaceClient.connections()` service
with new required argument order.
* Changed `update()` method for `workspaceClient.lakehouseMonitors()`
service with new required argument order.
* Changed `delete()` method for `workspaceClient.volumes()` service with
new required argument order.
* Changed `read()` method for `workspaceClient.volumes()` service with
new required argument order.
* Changed `update()` method for `workspaceClient.volumes()` service with
new required argument order.
 * Added `workspaceClient.onlineTables()` service.
* Removed `nameArg` field for
`com.databricks.sdk.service.catalog.DeleteConnectionRequest`.
* Added `name` field for
`com.databricks.sdk.service.catalog.DeleteConnectionRequest`.
* Removed `fullNameArg` field for
`com.databricks.sdk.service.catalog.DeleteVolumeRequest`.
* Added `name` field for
`com.databricks.sdk.service.catalog.DeleteVolumeRequest`.
* Removed `nameArg` field for
`com.databricks.sdk.service.catalog.GetConnectionRequest`.
* Added `name` field for
`com.databricks.sdk.service.catalog.GetConnectionRequest`.
* Added `maxResults` field for
`com.databricks.sdk.service.catalog.ListVolumesRequest`.
* Added `pageToken` field for
`com.databricks.sdk.service.catalog.ListVolumesRequest`.
* Added `nextPageToken` field for
`com.databricks.sdk.service.catalog.ListVolumesResponseContent`.
* Removed `fullNameArg` field for
`com.databricks.sdk.service.catalog.ReadVolumeRequest`.
* Added `name` field for
`com.databricks.sdk.service.catalog.ReadVolumeRequest`.
* Removed `nameArg` field for
`com.databricks.sdk.service.catalog.UpdateConnection`.
* Added `name` field for
`com.databricks.sdk.service.catalog.UpdateConnection`.
* Removed `assetsDir` field for
`com.databricks.sdk.service.catalog.UpdateMonitor`.
* Removed `fullNameArg` field for
`com.databricks.sdk.service.catalog.UpdateVolumeRequestContent`.
* Added `name` field for
`com.databricks.sdk.service.catalog.UpdateVolumeRequestContent`.
* Added `com.databricks.sdk.service.catalog.ContinuousUpdateStatus`
class.
* Added `com.databricks.sdk.service.catalog.DeleteOnlineTableRequest`
class.
 * Added `com.databricks.sdk.service.catalog.FailedStatus` class.
* Added `com.databricks.sdk.service.catalog.GetOnlineTableRequest`
class.
 * Added `com.databricks.sdk.service.catalog.OnlineTable` class.
 * Added `com.databricks.sdk.service.catalog.OnlineTableSpec` class.
 * Added `com.databricks.sdk.service.catalog.OnlineTableState` class.
 * Added `com.databricks.sdk.service.catalog.OnlineTableStatus` class.
 * Added `com.databricks.sdk.service.catalog.PipelineProgress` class.
 * Added `com.databricks.sdk.service.catalog.ProvisioningStatus` class.
* Added `com.databricks.sdk.service.catalog.TriggeredUpdateStatus`
class.
 * Added `com.databricks.sdk.service.catalog.ViewData` class.
* Added `getDirectoryMetadata()` method for `workspaceClient.files()`
service.
 * Added `getMetadata()` method for `workspaceClient.files()` service.
* Added `contentLength` field for
`com.databricks.sdk.service.files.DownloadResponse`.
* Added `contentType` field for
`com.databricks.sdk.service.files.DownloadResponse`.
* Added `lastModified` field for
`com.databricks.sdk.service.files.DownloadResponse`.
 * Added `com.databricks.sdk.service.files.FileSize` class.
* Added `com.databricks.sdk.service.files.GetDirectoryMetadataRequest`
class.
 * Added `com.databricks.sdk.service.files.GetMetadataRequest` class.
 * Added `com.databricks.sdk.service.files.GetMetadataResponse` class.
 * Added `com.databricks.sdk.service.files.LastModifiedHttpDate` class.
* Removed `triggerHistory` field for
`com.databricks.sdk.service.jobs.Job`.
 * Removed `com.databricks.sdk.service.jobs.TriggerEvaluation` class.
 * Removed `com.databricks.sdk.service.jobs.TriggerHistory` class.
* Added `table` field for
`com.databricks.sdk.service.jobs.TriggerSettings`.
 * Added `com.databricks.sdk.service.jobs.Condition` class.
* Added `com.databricks.sdk.service.jobs.TableTriggerConfiguration`
class.
* Removed `config` field for
`com.databricks.sdk.service.serving.ExternalModel`.
* Added `ai21labsConfig` field for
`com.databricks.sdk.service.serving.ExternalModel`.
* Added `anthropicConfig` field for
`com.databricks.sdk.service.serving.ExternalModel`.
* Added `awsBedrockConfig` field for
`com.databricks.sdk.service.serving.ExternalModel`.
* Added `cohereConfig` field for
`com.databricks.sdk.service.serving.ExternalModel`.
* Added `databricksModelServingConfig` field for
`com.databricks.sdk.service.serving.ExternalModel`.
* Added `openaiConfig` field for
`com.databricks.sdk.service.serving.ExternalModel`.
* Added `palmConfig` field for
`com.databricks.sdk.service.serving.ExternalModel`.
* Removed `com.databricks.sdk.service.serving.ExternalModelConfig`
class.
* Added `maxProvisionedThroughput` field for
`com.databricks.sdk.service.serving.ServedEntityInput`.
* Added `minProvisionedThroughput` field for
`com.databricks.sdk.service.serving.ServedEntityInput`.
* Added `maxProvisionedThroughput` field for
`com.databricks.sdk.service.serving.ServedEntityOutput`.
* Added `minProvisionedThroughput` field for
`com.databricks.sdk.service.serving.ServedEntityOutput`.
* Changed `delete()` method for `workspaceClient.cleanRooms()` service
with new required argument order.
* Changed `get()` method for `workspaceClient.cleanRooms()` service with
new required argument order.
* Changed `update()` method for `workspaceClient.cleanRooms()` service
with new required argument order.
* Removed `nameArg` field for
`com.databricks.sdk.service.sharing.DeleteCleanRoomRequest`.
* Added `name` field for
`com.databricks.sdk.service.sharing.DeleteCleanRoomRequest`.
* Removed `nameArg` field for
`com.databricks.sdk.service.sharing.GetCleanRoomRequest`.
* Added `name` field for
`com.databricks.sdk.service.sharing.GetCleanRoomRequest`.
* Removed `nameArg` field for
`com.databricks.sdk.service.sharing.UpdateCleanRoom`.
* Added `name` field for
`com.databricks.sdk.service.sharing.UpdateCleanRoom`.
* Added `enumOptions` field for
`com.databricks.sdk.service.sql.Parameter`.
* Added `multiValuesOptions` field for
`com.databricks.sdk.service.sql.Parameter`.
 * Added `queryId` field for `com.databricks.sdk.service.sql.Parameter`.
 * Added `com.databricks.sdk.service.sql.MultiValuesOptions` class.

OpenAPI SHA: cdd76a98a4fca7008572b3a94427566dd286c63b, Date: 2024-02-19
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.

3 participants