Skip to content

Conversation

@gkiko10
Copy link
Contributor

@gkiko10 gkiko10 commented Feb 17, 2025

What changes are proposed in this pull request?

Introduces logic in the extension for jobs ListRuns call. The extended logic accounts for the new response format of API 2.2. API 2.1 format returns all tasks and job_cluster for each run in the jobs list. API 2.2 format truncates tasks and job_cluster to 100 elements. The extended ListRuns logic calls GetRun for each job in the list to populate the full list of tasks and job_clusters.

The code consumes iterator from super.listRuns and produces iterator that contains already paginated jobs.

How is this tested?

Unit tests. I can't do manual tests because I haven't figured out how to run the code locally.

@gkiko10 gkiko10 changed the title [Internal] Update Jobs list_runs function to support paginated responses [Internal] Update Jobs listRuns function to support paginated responses Feb 18, 2025
@hectorcast-db hectorcast-db added this pull request to the merge queue Feb 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Feb 21, 2025
@github-actions
Copy link

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: 411
  • Commit SHA: 892367428bbe64c0d98ad3b54c5f36eb3f8c0df1

Checks will be approved automatically on success.

@hectorcast-db hectorcast-db added this pull request to the merge queue Feb 24, 2025
Merged via the queue into databricks:main with commit a6e3afb Feb 24, 2025
16 checks passed
deco-sdk-tagging bot added a commit that referenced this pull request Mar 11, 2025
## Release v0.42.0

### Internal Changes
* Update Jobs ListRuns API to support paginated responses ([#411](#411))
* Update Jobs ListJobs API to support paginated responses ([#410](#410))
* Introduce automated tagging ([#409](#409)).
* Update Jobs GetJob API to support paginated responses  ([#403](#403)).
* Update Jobs GetRun API to support paginated responses  ([#402](#402)).
* Update github cache action version from v2 to v4 ([#415](Update github cache action version from v2 to v4))
  

### API Changes
* Added `workspaceClient.forecasting()` service.
* Added `executeMessageAttachmentQuery()`, `getMessageAttachmentQueryResult()` and `getSpace()` methods for `workspaceClient.genie()` service.
* Added `listProviderShareAssets()` method for `workspaceClient.providers()` service.
* Added `budgetPolicyId` and `effectiveBudgetPolicyId` fields for `com.databricks.sdk.service.apps.App`.
* Added `policy` field for `com.databricks.sdk.service.billing.CreateBudgetPolicyRequest`.
* Added `databricksGcpServiceAccount` field for `com.databricks.sdk.service.catalog.ValidateCredentialRequest`.
* Added `attachmentId` field for `com.databricks.sdk.service.dashboards.GenieAttachment`.
* Added `conversationId` field for `com.databricks.sdk.service.dashboards.GenieConversation`.
* Added `messageId` field for `com.databricks.sdk.service.dashboards.GenieMessage`.
* Added `description`, `id`, `lastUpdatedTimestamp`, `query`, `queryResultMetadata`, `statementId` and `title` fields for `com.databricks.sdk.service.dashboards.GenieQueryAttachment`.
* Added `genAiComputeTask` field for `com.databricks.sdk.service.jobs.RunTask`.
* Added `genAiComputeTask` field for `com.databricks.sdk.service.jobs.SubmitTask`.
* Added `genAiComputeTask` field for `com.databricks.sdk.service.jobs.Task`.
* Added `runName` field for `com.databricks.sdk.service.ml.CreateRun`.
* Added `runName` field for `com.databricks.sdk.service.ml.RunInfo`.
* Added `runName` field for `com.databricks.sdk.service.ml.UpdateRun`.
* Added `lifetime` field for `com.databricks.sdk.service.oauth2.CreateServicePrincipalSecretRequest`.
* Added `expireTime` field for `com.databricks.sdk.service.oauth2.CreateServicePrincipalSecretResponse`.
* Added `expireTime` field for `com.databricks.sdk.service.oauth2.SecretInfo`.
* Added `instanceProfileArn` field for `com.databricks.sdk.service.serving.AmazonBedrockConfig`.
* Added `budgetPolicyId` field for `com.databricks.sdk.service.serving.CreateServingEndpoint`.
* Added `budgetPolicyId` field for `com.databricks.sdk.service.serving.ServingEndpoint`.
* Added `budgetPolicyId` field for `com.databricks.sdk.service.serving.ServingEndpointDetailed`.
* Added `add`, `principal` and `remove` fields for `com.databricks.sdk.service.sharing.PermissionsChange`.
* Added `columnsToRerank` field for `com.databricks.sdk.service.vectorsearch.QueryVectorIndexRequest`.
* Added `ORACLE` and `TERADATA` enum values for `com.databricks.sdk.service.catalog.ConnectionType`.
* Added `COULD_NOT_GET_MODEL_DEPLOYMENTS_EXCEPTION`, `FUNCTION_ARGUMENTS_INVALID_TYPE_EXCEPTION` and `MESSAGE_CANCELLED_WHILE_EXECUTING_EXCEPTION` enum values for `com.databricks.sdk.service.dashboards.MessageErrorType`.
* Added `WAITING` enum value for `com.databricks.sdk.service.jobs.RunLifecycleStateV2State`.
* Added `ACTIVE_ONLY`, `ALL` and `DELETED_ONLY` enum values for `com.databricks.sdk.service.ml.ViewType`.
* Added `OAUTH_CLIENT_CREDENTIALS` enum value for `com.databricks.sdk.service.sharing.AuthenticationType`.
* Added `RAW` enum value for `com.databricks.sdk.service.workspace.ExportFormat`.
* [Breaking] Changed `getByName()` method for `workspaceClient.experiments()` service to return `com.databricks.sdk.service.ml.GetExperimentByNameResponse` class.
* [Breaking] Changed `logInputs()` method for `workspaceClient.experiments()` service with new required argument order.
* [Breaking] Changed `sharePermissions()` method for `workspaceClient.shares()` service to return `com.databricks.sdk.service.sharing.GetSharePermissionsResponse` class.
* [Breaking] Changed `sharePermissions()` and `updatePermissions()` methods for `workspaceClient.shares()` service return type to become non-empty.
* [Breaking] Changed `updatePermissions()` method for `workspaceClient.shares()` service to return `com.databricks.sdk.service.sharing.UpdateSharePermissionsResponse` class.
* Changed `policyId` field for `com.databricks.sdk.service.billing.BudgetPolicy` to no longer be required.
* [Breaking] Changed `policyId` field for `com.databricks.sdk.service.billing.BudgetPolicy` to no longer be required.
* [Breaking] Changed `partitions` field for `com.databricks.sdk.service.cleanrooms.CleanRoomAssetTableLocalDetails` to type `com.databricks.sdk.service.cleanrooms.PartitionList` class.
* [Breaking] Changed `query` field for `com.databricks.sdk.service.dashboards.GenieAttachment` to type `com.databricks.sdk.service.dashboards.GenieQueryAttachment` class.
* [Breaking] Changed `digest`, `name`, `source` and `sourceType` fields for `com.databricks.sdk.service.ml.Dataset` to be required.
* Changed `digest`, `name`, `source` and `sourceType` fields for `com.databricks.sdk.service.ml.Dataset` to be required.
* Changed `dataset` field for `com.databricks.sdk.service.ml.DatasetInput` to be required.
* [Breaking] Changed `dataset` field for `com.databricks.sdk.service.ml.DatasetInput` to be required.
* [Breaking] Changed `key` and `value` fields for `com.databricks.sdk.service.ml.InputTag` to be required.
* Changed `key` and `value` fields for `com.databricks.sdk.service.ml.InputTag` to be required.
* [Breaking] Changed `viewType` field for `com.databricks.sdk.service.ml.ListExperimentsRequest` to type `com.databricks.sdk.service.ml.ViewType` class.
* [Breaking] Changed `runId` field for `com.databricks.sdk.service.ml.LogInputs` to be required.
* [Breaking] Changed `viewType` field for `com.databricks.sdk.service.ml.SearchExperiments` to type `com.databricks.sdk.service.ml.ViewType` class.
* [Breaking] Changed `runViewType` field for `com.databricks.sdk.service.ml.SearchRuns` to type `com.databricks.sdk.service.ml.ViewType` class.
* [Breaking] Removed `customTags` and `policyName` fields for `com.databricks.sdk.service.billing.CreateBudgetPolicyRequest`.
* [Breaking] Removed `cachedQuerySchema`, `description`, `id`, `instructionId`, `instructionTitle`, `lastUpdatedTimestamp`, `query`, `statementId` and `title` fields for `com.databricks.sdk.service.dashboards.QueryAttachment`.
* [Breaking] Removed `maxResults` and `pageToken` fields for `com.databricks.sdk.service.sharing.UpdateSharePermissions`.
* [Breaking] Removed `ACTIVE_ONLY`, `ALL` and `DELETED_ONLY` enum values for `com.databricks.sdk.service.ml.SearchExperimentsViewType`.
* [Breaking] Removed `ACTIVE_ONLY`, `ALL` and `DELETED_ONLY` enum values for `com.databricks.sdk.service.ml.SearchRunsRunViewType`.
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