-
Notifications
You must be signed in to change notification settings - Fork 23
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
Conversation
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.
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 { |
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.
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()); |
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.
We should throw only DatabricksException here
} else { | ||
LOG.warn("Unsupported header type: " + field.getType()); | ||
} | ||
field.setAccessible(false); |
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.
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 |
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.
Reminder to uncomment this
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.
Approved (though we'll test in a follow-up PR).
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
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
Changes
Support head operations
Tests
Generated SDK and run Files integration tests.