Skip to content

Commit

Permalink
Increase the polling time for job run status (#1451)
Browse files Browse the repository at this point in the history
## Changes
We were not providing any timeouts and the SDK was falling back to
10min, which is not enough for many job runs.


## Tests
Manually and existing tests
  • Loading branch information
ilia-db authored Nov 19, 2024
1 parent 3c3fc9c commit d410b62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/databricks-vscode/src/bundle/run/JobRunStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {Event, EventEmitter} from "vscode";
import {AuthProvider} from "../../configuration/auth/AuthProvider";
import {onError} from "../../utils/onErrorDecorator";
import {BundleRunStatus} from "./BundleRunStatus";
import {Time, TimeUnits} from "@databricks/databricks-sdk";

export class JobRunStatus extends BundleRunStatus {
readonly type = "jobs";
Expand Down Expand Up @@ -48,6 +49,7 @@ export class JobRunStatus extends BundleRunStatus {
await (
await client.jobs.getRun({run_id: parseInt(this.runId)})
).wait({
timeout: new Time(48, TimeUnits.hours),
onProgress: async (progress) => {
this.data = progress;
this.onDidChangeEmitter.fire();
Expand Down

0 comments on commit d410b62

Please sign in to comment.