@databricks/sdk-jobs 0.1.0-dev.1 → 0.1.0-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/v2/client.d.ts +25 -24
- package/dist/v2/client.d.ts.map +1 -1
- package/dist/v2/client.js +52 -79
- package/dist/v2/client.js.map +1 -1
- package/dist/v2/index.d.ts +1 -1
- package/dist/v2/index.d.ts.map +1 -1
- package/dist/v2/model.d.ts +56 -56
- package/dist/v2/model.d.ts.map +1 -1
- package/dist/v2/model.js +21 -40
- package/dist/v2/model.js.map +1 -1
- package/dist/v2/utils.d.ts +14 -2
- package/dist/v2/utils.d.ts.map +1 -1
- package/dist/v2/utils.js +19 -1
- package/dist/v2/utils.js.map +1 -1
- package/package.json +6 -5
- package/src/v2/client.ts +164 -202
- package/src/v2/index.ts +21 -21
- package/src/v2/model.ts +283 -324
- package/src/v2/utils.ts +27 -3
package/src/v2/client.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
|
|
2
2
|
|
|
3
3
|
import {VERSION as AUTH_VERSION} from '@databricks/sdk-auth';
|
|
4
|
-
import type {Call} from '@databricks/sdk-core/api';
|
|
5
|
-
import {retryOn} from '@databricks/sdk-core/api';
|
|
6
4
|
import {createDefault} from '@databricks/sdk-core/clientinfo';
|
|
7
5
|
import type {Logger} from '@databricks/sdk-core/logger';
|
|
8
6
|
import {NoOpLogger} from '@databricks/sdk-core/logger';
|
|
9
7
|
import type {CallOptions} from '@databricks/sdk-options/call';
|
|
10
8
|
import type {ClientOptions} from '@databricks/sdk-options/client';
|
|
9
|
+
import type {LroOptions} from '@databricks/sdk-options/lro';
|
|
11
10
|
import type {HttpClient} from '@databricks/sdk-core/http';
|
|
12
11
|
import {newHttpClient} from './transport';
|
|
13
12
|
import {
|
|
@@ -16,50 +15,52 @@ import {
|
|
|
16
15
|
executeHttpCall,
|
|
17
16
|
marshalRequest,
|
|
18
17
|
parseResponse,
|
|
18
|
+
executeWait,
|
|
19
|
+
StillRunningError,
|
|
19
20
|
} from './utils';
|
|
20
21
|
import pkgJson from '../../package.json' with {type: 'json'};
|
|
21
22
|
import type {
|
|
22
23
|
BaseJob,
|
|
23
24
|
BaseRun,
|
|
24
25
|
CancelAllRunsRequest,
|
|
25
|
-
|
|
26
|
+
CancelAllRunsResponse,
|
|
26
27
|
CancelRunRequest,
|
|
27
|
-
|
|
28
|
+
CancelRunResponse,
|
|
28
29
|
CreateJobRequest,
|
|
29
|
-
|
|
30
|
+
CreateJobResponse,
|
|
30
31
|
DeleteJobRequest,
|
|
31
|
-
|
|
32
|
+
DeleteJobResponse,
|
|
32
33
|
DeleteRunRequest,
|
|
33
|
-
|
|
34
|
+
DeleteRunResponse,
|
|
34
35
|
EnforcePolicyComplianceForJob,
|
|
35
|
-
|
|
36
|
+
EnforcePolicyComplianceResponse,
|
|
36
37
|
ExportRunRequest,
|
|
37
|
-
|
|
38
|
+
ExportRunResponse,
|
|
38
39
|
GetJobRequest,
|
|
39
|
-
|
|
40
|
+
GetJobResponse,
|
|
40
41
|
GetPolicyComplianceForJob,
|
|
41
|
-
|
|
42
|
+
GetPolicyComplianceForJobResponse,
|
|
42
43
|
GetRunOutputRequest,
|
|
43
|
-
|
|
44
|
+
GetRunOutputResponse,
|
|
44
45
|
GetRunRequest,
|
|
45
|
-
|
|
46
|
+
GetRunResponse,
|
|
46
47
|
ListJobComplianceForPolicy,
|
|
47
48
|
ListJobComplianceForPolicy_JobCompliance,
|
|
48
|
-
|
|
49
|
+
ListJobComplianceResponse,
|
|
49
50
|
ListJobsRequest,
|
|
50
|
-
|
|
51
|
+
ListJobsResponse,
|
|
51
52
|
ListRunsRequest,
|
|
52
|
-
|
|
53
|
+
ListRunsResponse,
|
|
53
54
|
RepairRunRequest,
|
|
54
|
-
|
|
55
|
+
RepairRunResponse,
|
|
55
56
|
ResetJobRequest,
|
|
56
|
-
|
|
57
|
+
ResetJobResponse,
|
|
57
58
|
RunNowRequest,
|
|
58
|
-
|
|
59
|
+
RunNowResponse,
|
|
59
60
|
SubmitRunRequest,
|
|
60
|
-
|
|
61
|
+
SubmitRunResponse,
|
|
61
62
|
UpdateJobRequest,
|
|
62
|
-
|
|
63
|
+
UpdateJobResponse,
|
|
63
64
|
} from './model';
|
|
64
65
|
import {
|
|
65
66
|
RunLifeCycleState_RunLifeCycleState,
|
|
@@ -74,25 +75,25 @@ import {
|
|
|
74
75
|
marshalRunNowRequestSchema,
|
|
75
76
|
marshalSubmitRunRequestSchema,
|
|
76
77
|
marshalUpdateJobRequestSchema,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
78
|
+
unmarshalCancelAllRunsResponseSchema,
|
|
79
|
+
unmarshalCancelRunResponseSchema,
|
|
80
|
+
unmarshalCreateJobResponseSchema,
|
|
81
|
+
unmarshalDeleteJobResponseSchema,
|
|
82
|
+
unmarshalDeleteRunResponseSchema,
|
|
83
|
+
unmarshalEnforcePolicyComplianceResponseSchema,
|
|
84
|
+
unmarshalExportRunResponseSchema,
|
|
85
|
+
unmarshalGetJobResponseSchema,
|
|
86
|
+
unmarshalGetPolicyComplianceForJobResponseSchema,
|
|
87
|
+
unmarshalGetRunOutputResponseSchema,
|
|
88
|
+
unmarshalGetRunResponseSchema,
|
|
89
|
+
unmarshalListJobComplianceResponseSchema,
|
|
90
|
+
unmarshalListJobsResponseSchema,
|
|
91
|
+
unmarshalListRunsResponseSchema,
|
|
92
|
+
unmarshalRepairRunResponseSchema,
|
|
93
|
+
unmarshalResetJobResponseSchema,
|
|
94
|
+
unmarshalRunNowResponseSchema,
|
|
95
|
+
unmarshalSubmitRunResponseSchema,
|
|
96
|
+
unmarshalUpdateJobResponseSchema,
|
|
96
97
|
} from './model';
|
|
97
98
|
|
|
98
99
|
// Package identity segment for this client to be used in the User-Agent header.
|
|
@@ -101,8 +102,6 @@ const PACKAGE_SEGMENT = {
|
|
|
101
102
|
value: pkgJson.version,
|
|
102
103
|
};
|
|
103
104
|
|
|
104
|
-
class StillRunningError extends Error {}
|
|
105
|
-
|
|
106
105
|
export class JobsClient {
|
|
107
106
|
private readonly host: string;
|
|
108
107
|
// Workspace ID used to route workspace-level calls on unified hosts (SPOG).
|
|
@@ -140,14 +139,14 @@ export class JobsClient {
|
|
|
140
139
|
async enforcePolicyComplianceForJob(
|
|
141
140
|
req: EnforcePolicyComplianceForJob,
|
|
142
141
|
options?: CallOptions
|
|
143
|
-
): Promise<
|
|
142
|
+
): Promise<EnforcePolicyComplianceResponse> {
|
|
144
143
|
const url = `${this.host}/api/2.0/policies/jobs/enforce-compliance`;
|
|
145
144
|
const body = marshalRequest(
|
|
146
145
|
req,
|
|
147
146
|
marshalEnforcePolicyComplianceForJobSchema
|
|
148
147
|
);
|
|
149
|
-
let resp:
|
|
150
|
-
const call
|
|
148
|
+
let resp: EnforcePolicyComplianceResponse | undefined;
|
|
149
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
151
150
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
152
151
|
if (this.workspaceId !== undefined) {
|
|
153
152
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -161,12 +160,12 @@ export class JobsClient {
|
|
|
161
160
|
});
|
|
162
161
|
resp = parseResponse(
|
|
163
162
|
respBody,
|
|
164
|
-
|
|
163
|
+
unmarshalEnforcePolicyComplianceResponseSchema
|
|
165
164
|
);
|
|
166
165
|
};
|
|
167
166
|
await executeCall(call, options);
|
|
168
167
|
if (resp === undefined) {
|
|
169
|
-
throw new Error('
|
|
168
|
+
throw new Error('operation completed without a result.');
|
|
170
169
|
}
|
|
171
170
|
return resp;
|
|
172
171
|
}
|
|
@@ -180,7 +179,7 @@ export class JobsClient {
|
|
|
180
179
|
async getPolicyComplianceForJob(
|
|
181
180
|
req: GetPolicyComplianceForJob,
|
|
182
181
|
options?: CallOptions
|
|
183
|
-
): Promise<
|
|
182
|
+
): Promise<GetPolicyComplianceForJobResponse> {
|
|
184
183
|
const url = `${this.host}/api/2.0/policies/jobs/get-compliance`;
|
|
185
184
|
const params = new URLSearchParams();
|
|
186
185
|
if (req.jobId !== undefined) {
|
|
@@ -188,8 +187,8 @@ export class JobsClient {
|
|
|
188
187
|
}
|
|
189
188
|
const query = params.toString();
|
|
190
189
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
191
|
-
let resp:
|
|
192
|
-
const call
|
|
190
|
+
let resp: GetPolicyComplianceForJobResponse | undefined;
|
|
191
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
193
192
|
const headers = new Headers();
|
|
194
193
|
if (this.workspaceId !== undefined) {
|
|
195
194
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -203,12 +202,12 @@ export class JobsClient {
|
|
|
203
202
|
});
|
|
204
203
|
resp = parseResponse(
|
|
205
204
|
respBody,
|
|
206
|
-
|
|
205
|
+
unmarshalGetPolicyComplianceForJobResponseSchema
|
|
207
206
|
);
|
|
208
207
|
};
|
|
209
208
|
await executeCall(call, options);
|
|
210
209
|
if (resp === undefined) {
|
|
211
|
-
throw new Error('
|
|
210
|
+
throw new Error('operation completed without a result.');
|
|
212
211
|
}
|
|
213
212
|
return resp;
|
|
214
213
|
}
|
|
@@ -222,7 +221,7 @@ export class JobsClient {
|
|
|
222
221
|
async listJobComplianceForPolicy(
|
|
223
222
|
req: ListJobComplianceForPolicy,
|
|
224
223
|
options?: CallOptions
|
|
225
|
-
): Promise<
|
|
224
|
+
): Promise<ListJobComplianceResponse> {
|
|
226
225
|
const url = `${this.host}/api/2.0/policies/jobs/list-compliance`;
|
|
227
226
|
const params = new URLSearchParams();
|
|
228
227
|
if (req.policyId !== undefined) {
|
|
@@ -236,8 +235,8 @@ export class JobsClient {
|
|
|
236
235
|
}
|
|
237
236
|
const query = params.toString();
|
|
238
237
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
239
|
-
let resp:
|
|
240
|
-
const call
|
|
238
|
+
let resp: ListJobComplianceResponse | undefined;
|
|
239
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
241
240
|
const headers = new Headers();
|
|
242
241
|
if (this.workspaceId !== undefined) {
|
|
243
242
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -249,14 +248,11 @@ export class JobsClient {
|
|
|
249
248
|
httpClient: this.httpClient,
|
|
250
249
|
logger: this.logger,
|
|
251
250
|
});
|
|
252
|
-
resp = parseResponse(
|
|
253
|
-
respBody,
|
|
254
|
-
unmarshalListJobComplianceForPolicy_ResponseSchema
|
|
255
|
-
);
|
|
251
|
+
resp = parseResponse(respBody, unmarshalListJobComplianceResponseSchema);
|
|
256
252
|
};
|
|
257
253
|
await executeCall(call, options);
|
|
258
254
|
if (resp === undefined) {
|
|
259
|
-
throw new Error('
|
|
255
|
+
throw new Error('operation completed without a result.');
|
|
260
256
|
}
|
|
261
257
|
return resp;
|
|
262
258
|
}
|
|
@@ -285,11 +281,11 @@ export class JobsClient {
|
|
|
285
281
|
async cancelAllRuns(
|
|
286
282
|
req: CancelAllRunsRequest,
|
|
287
283
|
options?: CallOptions
|
|
288
|
-
): Promise<
|
|
284
|
+
): Promise<CancelAllRunsResponse> {
|
|
289
285
|
const url = `${this.host}/api/2.2/jobs/runs/cancel-all`;
|
|
290
286
|
const body = marshalRequest(req, marshalCancelAllRunsRequestSchema);
|
|
291
|
-
let resp:
|
|
292
|
-
const call
|
|
287
|
+
let resp: CancelAllRunsResponse | undefined;
|
|
288
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
293
289
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
294
290
|
if (this.workspaceId !== undefined) {
|
|
295
291
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -301,14 +297,11 @@ export class JobsClient {
|
|
|
301
297
|
httpClient: this.httpClient,
|
|
302
298
|
logger: this.logger,
|
|
303
299
|
});
|
|
304
|
-
resp = parseResponse(
|
|
305
|
-
respBody,
|
|
306
|
-
unmarshalCancelAllRunsRequest_ResponseSchema
|
|
307
|
-
);
|
|
300
|
+
resp = parseResponse(respBody, unmarshalCancelAllRunsResponseSchema);
|
|
308
301
|
};
|
|
309
302
|
await executeCall(call, options);
|
|
310
303
|
if (resp === undefined) {
|
|
311
|
-
throw new Error('
|
|
304
|
+
throw new Error('operation completed without a result.');
|
|
312
305
|
}
|
|
313
306
|
return resp;
|
|
314
307
|
}
|
|
@@ -317,14 +310,14 @@ export class JobsClient {
|
|
|
317
310
|
* Cancels a job run or a task run. The run is canceled asynchronously, so it may still be running when
|
|
318
311
|
* this request completes.
|
|
319
312
|
*/
|
|
320
|
-
async cancelRun(
|
|
313
|
+
private async cancelRun(
|
|
321
314
|
req: CancelRunRequest,
|
|
322
315
|
options?: CallOptions
|
|
323
|
-
): Promise<
|
|
316
|
+
): Promise<CancelRunResponse> {
|
|
324
317
|
const url = `${this.host}/api/2.2/jobs/runs/cancel`;
|
|
325
318
|
const body = marshalRequest(req, marshalCancelRunRequestSchema);
|
|
326
|
-
let resp:
|
|
327
|
-
const call
|
|
319
|
+
let resp: CancelRunResponse | undefined;
|
|
320
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
328
321
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
329
322
|
if (this.workspaceId !== undefined) {
|
|
330
323
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -336,11 +329,11 @@ export class JobsClient {
|
|
|
336
329
|
httpClient: this.httpClient,
|
|
337
330
|
logger: this.logger,
|
|
338
331
|
});
|
|
339
|
-
resp = parseResponse(respBody,
|
|
332
|
+
resp = parseResponse(respBody, unmarshalCancelRunResponseSchema);
|
|
340
333
|
};
|
|
341
334
|
await executeCall(call, options);
|
|
342
335
|
if (resp === undefined) {
|
|
343
|
-
throw new Error('
|
|
336
|
+
throw new Error('operation completed without a result.');
|
|
344
337
|
}
|
|
345
338
|
return resp;
|
|
346
339
|
}
|
|
@@ -360,11 +353,11 @@ export class JobsClient {
|
|
|
360
353
|
async createJob(
|
|
361
354
|
req: CreateJobRequest,
|
|
362
355
|
options?: CallOptions
|
|
363
|
-
): Promise<
|
|
356
|
+
): Promise<CreateJobResponse> {
|
|
364
357
|
const url = `${this.host}/api/2.2/jobs/create`;
|
|
365
358
|
const body = marshalRequest(req, marshalCreateJobRequestSchema);
|
|
366
|
-
let resp:
|
|
367
|
-
const call
|
|
359
|
+
let resp: CreateJobResponse | undefined;
|
|
360
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
368
361
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
369
362
|
if (this.workspaceId !== undefined) {
|
|
370
363
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -376,11 +369,11 @@ export class JobsClient {
|
|
|
376
369
|
httpClient: this.httpClient,
|
|
377
370
|
logger: this.logger,
|
|
378
371
|
});
|
|
379
|
-
resp = parseResponse(respBody,
|
|
372
|
+
resp = parseResponse(respBody, unmarshalCreateJobResponseSchema);
|
|
380
373
|
};
|
|
381
374
|
await executeCall(call, options);
|
|
382
375
|
if (resp === undefined) {
|
|
383
|
-
throw new Error('
|
|
376
|
+
throw new Error('operation completed without a result.');
|
|
384
377
|
}
|
|
385
378
|
return resp;
|
|
386
379
|
}
|
|
@@ -389,11 +382,11 @@ export class JobsClient {
|
|
|
389
382
|
async deleteJob(
|
|
390
383
|
req: DeleteJobRequest,
|
|
391
384
|
options?: CallOptions
|
|
392
|
-
): Promise<
|
|
385
|
+
): Promise<DeleteJobResponse> {
|
|
393
386
|
const url = `${this.host}/api/2.2/jobs/delete`;
|
|
394
387
|
const body = marshalRequest(req, marshalDeleteJobRequestSchema);
|
|
395
|
-
let resp:
|
|
396
|
-
const call
|
|
388
|
+
let resp: DeleteJobResponse | undefined;
|
|
389
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
397
390
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
398
391
|
if (this.workspaceId !== undefined) {
|
|
399
392
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -405,11 +398,11 @@ export class JobsClient {
|
|
|
405
398
|
httpClient: this.httpClient,
|
|
406
399
|
logger: this.logger,
|
|
407
400
|
});
|
|
408
|
-
resp = parseResponse(respBody,
|
|
401
|
+
resp = parseResponse(respBody, unmarshalDeleteJobResponseSchema);
|
|
409
402
|
};
|
|
410
403
|
await executeCall(call, options);
|
|
411
404
|
if (resp === undefined) {
|
|
412
|
-
throw new Error('
|
|
405
|
+
throw new Error('operation completed without a result.');
|
|
413
406
|
}
|
|
414
407
|
return resp;
|
|
415
408
|
}
|
|
@@ -418,11 +411,11 @@ export class JobsClient {
|
|
|
418
411
|
async deleteRun(
|
|
419
412
|
req: DeleteRunRequest,
|
|
420
413
|
options?: CallOptions
|
|
421
|
-
): Promise<
|
|
414
|
+
): Promise<DeleteRunResponse> {
|
|
422
415
|
const url = `${this.host}/api/2.2/jobs/runs/delete`;
|
|
423
416
|
const body = marshalRequest(req, marshalDeleteRunRequestSchema);
|
|
424
|
-
let resp:
|
|
425
|
-
const call
|
|
417
|
+
let resp: DeleteRunResponse | undefined;
|
|
418
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
426
419
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
427
420
|
if (this.workspaceId !== undefined) {
|
|
428
421
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -434,11 +427,11 @@ export class JobsClient {
|
|
|
434
427
|
httpClient: this.httpClient,
|
|
435
428
|
logger: this.logger,
|
|
436
429
|
});
|
|
437
|
-
resp = parseResponse(respBody,
|
|
430
|
+
resp = parseResponse(respBody, unmarshalDeleteRunResponseSchema);
|
|
438
431
|
};
|
|
439
432
|
await executeCall(call, options);
|
|
440
433
|
if (resp === undefined) {
|
|
441
|
-
throw new Error('
|
|
434
|
+
throw new Error('operation completed without a result.');
|
|
442
435
|
}
|
|
443
436
|
return resp;
|
|
444
437
|
}
|
|
@@ -447,7 +440,7 @@ export class JobsClient {
|
|
|
447
440
|
async exportRun(
|
|
448
441
|
req: ExportRunRequest,
|
|
449
442
|
options?: CallOptions
|
|
450
|
-
): Promise<
|
|
443
|
+
): Promise<ExportRunResponse> {
|
|
451
444
|
const url = `${this.host}/api/2.2/jobs/runs/export`;
|
|
452
445
|
const params = new URLSearchParams();
|
|
453
446
|
if (req.runId !== undefined) {
|
|
@@ -458,8 +451,8 @@ export class JobsClient {
|
|
|
458
451
|
}
|
|
459
452
|
const query = params.toString();
|
|
460
453
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
461
|
-
let resp:
|
|
462
|
-
const call
|
|
454
|
+
let resp: ExportRunResponse | undefined;
|
|
455
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
463
456
|
const headers = new Headers();
|
|
464
457
|
if (this.workspaceId !== undefined) {
|
|
465
458
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -471,11 +464,11 @@ export class JobsClient {
|
|
|
471
464
|
httpClient: this.httpClient,
|
|
472
465
|
logger: this.logger,
|
|
473
466
|
});
|
|
474
|
-
resp = parseResponse(respBody,
|
|
467
|
+
resp = parseResponse(respBody, unmarshalExportRunResponseSchema);
|
|
475
468
|
};
|
|
476
469
|
await executeCall(call, options);
|
|
477
470
|
if (resp === undefined) {
|
|
478
|
-
throw new Error('
|
|
471
|
+
throw new Error('operation completed without a result.');
|
|
479
472
|
}
|
|
480
473
|
return resp;
|
|
481
474
|
}
|
|
@@ -491,7 +484,7 @@ export class JobsClient {
|
|
|
491
484
|
async getJob(
|
|
492
485
|
req: GetJobRequest,
|
|
493
486
|
options?: CallOptions
|
|
494
|
-
): Promise<
|
|
487
|
+
): Promise<GetJobResponse> {
|
|
495
488
|
const url = `${this.host}/api/2.2/jobs/get`;
|
|
496
489
|
const params = new URLSearchParams();
|
|
497
490
|
if (req.jobId !== undefined) {
|
|
@@ -505,8 +498,8 @@ export class JobsClient {
|
|
|
505
498
|
}
|
|
506
499
|
const query = params.toString();
|
|
507
500
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
508
|
-
let resp:
|
|
509
|
-
const call
|
|
501
|
+
let resp: GetJobResponse | undefined;
|
|
502
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
510
503
|
const headers = new Headers();
|
|
511
504
|
if (this.workspaceId !== undefined) {
|
|
512
505
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -518,11 +511,11 @@ export class JobsClient {
|
|
|
518
511
|
httpClient: this.httpClient,
|
|
519
512
|
logger: this.logger,
|
|
520
513
|
});
|
|
521
|
-
resp = parseResponse(respBody,
|
|
514
|
+
resp = parseResponse(respBody, unmarshalGetJobResponseSchema);
|
|
522
515
|
};
|
|
523
516
|
await executeCall(call, options);
|
|
524
517
|
if (resp === undefined) {
|
|
525
|
-
throw new Error('
|
|
518
|
+
throw new Error('operation completed without a result.');
|
|
526
519
|
}
|
|
527
520
|
return resp;
|
|
528
521
|
}
|
|
@@ -538,7 +531,7 @@ export class JobsClient {
|
|
|
538
531
|
async getRun(
|
|
539
532
|
req: GetRunRequest,
|
|
540
533
|
options?: CallOptions
|
|
541
|
-
): Promise<
|
|
534
|
+
): Promise<GetRunResponse> {
|
|
542
535
|
const url = `${this.host}/api/2.2/jobs/runs/get`;
|
|
543
536
|
const params = new URLSearchParams();
|
|
544
537
|
if (req.runId !== undefined) {
|
|
@@ -558,8 +551,8 @@ export class JobsClient {
|
|
|
558
551
|
}
|
|
559
552
|
const query = params.toString();
|
|
560
553
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
561
|
-
let resp:
|
|
562
|
-
const call
|
|
554
|
+
let resp: GetRunResponse | undefined;
|
|
555
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
563
556
|
const headers = new Headers();
|
|
564
557
|
if (this.workspaceId !== undefined) {
|
|
565
558
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -571,11 +564,11 @@ export class JobsClient {
|
|
|
571
564
|
httpClient: this.httpClient,
|
|
572
565
|
logger: this.logger,
|
|
573
566
|
});
|
|
574
|
-
resp = parseResponse(respBody,
|
|
567
|
+
resp = parseResponse(respBody, unmarshalGetRunResponseSchema);
|
|
575
568
|
};
|
|
576
569
|
await executeCall(call, options);
|
|
577
570
|
if (resp === undefined) {
|
|
578
|
-
throw new Error('
|
|
571
|
+
throw new Error('operation completed without a result.');
|
|
579
572
|
}
|
|
580
573
|
return resp;
|
|
581
574
|
}
|
|
@@ -594,7 +587,7 @@ export class JobsClient {
|
|
|
594
587
|
async getRunOutput(
|
|
595
588
|
req: GetRunOutputRequest,
|
|
596
589
|
options?: CallOptions
|
|
597
|
-
): Promise<
|
|
590
|
+
): Promise<GetRunOutputResponse> {
|
|
598
591
|
const url = `${this.host}/api/2.2/jobs/runs/get-output`;
|
|
599
592
|
const params = new URLSearchParams();
|
|
600
593
|
if (req.runId !== undefined) {
|
|
@@ -602,8 +595,8 @@ export class JobsClient {
|
|
|
602
595
|
}
|
|
603
596
|
const query = params.toString();
|
|
604
597
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
605
|
-
let resp:
|
|
606
|
-
const call
|
|
598
|
+
let resp: GetRunOutputResponse | undefined;
|
|
599
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
607
600
|
const headers = new Headers();
|
|
608
601
|
if (this.workspaceId !== undefined) {
|
|
609
602
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -615,14 +608,11 @@ export class JobsClient {
|
|
|
615
608
|
httpClient: this.httpClient,
|
|
616
609
|
logger: this.logger,
|
|
617
610
|
});
|
|
618
|
-
resp = parseResponse(
|
|
619
|
-
respBody,
|
|
620
|
-
unmarshalGetRunOutputRequest_ResponseSchema
|
|
621
|
-
);
|
|
611
|
+
resp = parseResponse(respBody, unmarshalGetRunOutputResponseSchema);
|
|
622
612
|
};
|
|
623
613
|
await executeCall(call, options);
|
|
624
614
|
if (resp === undefined) {
|
|
625
|
-
throw new Error('
|
|
615
|
+
throw new Error('operation completed without a result.');
|
|
626
616
|
}
|
|
627
617
|
return resp;
|
|
628
618
|
}
|
|
@@ -631,7 +621,7 @@ export class JobsClient {
|
|
|
631
621
|
async listJobs(
|
|
632
622
|
req: ListJobsRequest,
|
|
633
623
|
options?: CallOptions
|
|
634
|
-
): Promise<
|
|
624
|
+
): Promise<ListJobsResponse> {
|
|
635
625
|
const url = `${this.host}/api/2.2/jobs/list`;
|
|
636
626
|
const params = new URLSearchParams();
|
|
637
627
|
if (req.offset !== undefined) {
|
|
@@ -651,8 +641,8 @@ export class JobsClient {
|
|
|
651
641
|
}
|
|
652
642
|
const query = params.toString();
|
|
653
643
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
654
|
-
let resp:
|
|
655
|
-
const call
|
|
644
|
+
let resp: ListJobsResponse | undefined;
|
|
645
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
656
646
|
const headers = new Headers();
|
|
657
647
|
if (this.workspaceId !== undefined) {
|
|
658
648
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -664,11 +654,11 @@ export class JobsClient {
|
|
|
664
654
|
httpClient: this.httpClient,
|
|
665
655
|
logger: this.logger,
|
|
666
656
|
});
|
|
667
|
-
resp = parseResponse(respBody,
|
|
657
|
+
resp = parseResponse(respBody, unmarshalListJobsResponseSchema);
|
|
668
658
|
};
|
|
669
659
|
await executeCall(call, options);
|
|
670
660
|
if (resp === undefined) {
|
|
671
|
-
throw new Error('
|
|
661
|
+
throw new Error('operation completed without a result.');
|
|
672
662
|
}
|
|
673
663
|
return resp;
|
|
674
664
|
}
|
|
@@ -694,7 +684,7 @@ export class JobsClient {
|
|
|
694
684
|
async listRuns(
|
|
695
685
|
req: ListRunsRequest,
|
|
696
686
|
options?: CallOptions
|
|
697
|
-
): Promise<
|
|
687
|
+
): Promise<ListRunsResponse> {
|
|
698
688
|
const url = `${this.host}/api/2.2/jobs/runs/list`;
|
|
699
689
|
const params = new URLSearchParams();
|
|
700
690
|
if (req.jobId !== undefined) {
|
|
@@ -732,8 +722,8 @@ export class JobsClient {
|
|
|
732
722
|
}
|
|
733
723
|
const query = params.toString();
|
|
734
724
|
const fullUrl = query !== '' ? `${url}?${query}` : url;
|
|
735
|
-
let resp:
|
|
736
|
-
const call
|
|
725
|
+
let resp: ListRunsResponse | undefined;
|
|
726
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
737
727
|
const headers = new Headers();
|
|
738
728
|
if (this.workspaceId !== undefined) {
|
|
739
729
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -745,11 +735,11 @@ export class JobsClient {
|
|
|
745
735
|
httpClient: this.httpClient,
|
|
746
736
|
logger: this.logger,
|
|
747
737
|
});
|
|
748
|
-
resp = parseResponse(respBody,
|
|
738
|
+
resp = parseResponse(respBody, unmarshalListRunsResponseSchema);
|
|
749
739
|
};
|
|
750
740
|
await executeCall(call, options);
|
|
751
741
|
if (resp === undefined) {
|
|
752
|
-
throw new Error('
|
|
742
|
+
throw new Error('operation completed without a result.');
|
|
753
743
|
}
|
|
754
744
|
return resp;
|
|
755
745
|
}
|
|
@@ -776,14 +766,14 @@ export class JobsClient {
|
|
|
776
766
|
* They use the current job and task settings, and can be viewed in the history for the
|
|
777
767
|
* original job run.
|
|
778
768
|
*/
|
|
779
|
-
async repair(
|
|
769
|
+
private async repair(
|
|
780
770
|
req: RepairRunRequest,
|
|
781
771
|
options?: CallOptions
|
|
782
|
-
): Promise<
|
|
772
|
+
): Promise<RepairRunResponse> {
|
|
783
773
|
const url = `${this.host}/api/2.2/jobs/runs/repair`;
|
|
784
774
|
const body = marshalRequest(req, marshalRepairRunRequestSchema);
|
|
785
|
-
let resp:
|
|
786
|
-
const call
|
|
775
|
+
let resp: RepairRunResponse | undefined;
|
|
776
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
787
777
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
788
778
|
if (this.workspaceId !== undefined) {
|
|
789
779
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -795,11 +785,11 @@ export class JobsClient {
|
|
|
795
785
|
httpClient: this.httpClient,
|
|
796
786
|
logger: this.logger,
|
|
797
787
|
});
|
|
798
|
-
resp = parseResponse(respBody,
|
|
788
|
+
resp = parseResponse(respBody, unmarshalRepairRunResponseSchema);
|
|
799
789
|
};
|
|
800
790
|
await executeCall(call, options);
|
|
801
791
|
if (resp === undefined) {
|
|
802
|
-
throw new Error('
|
|
792
|
+
throw new Error('operation completed without a result.');
|
|
803
793
|
}
|
|
804
794
|
return resp;
|
|
805
795
|
}
|
|
@@ -819,11 +809,11 @@ export class JobsClient {
|
|
|
819
809
|
async resetJob(
|
|
820
810
|
req: ResetJobRequest,
|
|
821
811
|
options?: CallOptions
|
|
822
|
-
): Promise<
|
|
812
|
+
): Promise<ResetJobResponse> {
|
|
823
813
|
const url = `${this.host}/api/2.2/jobs/reset`;
|
|
824
814
|
const body = marshalRequest(req, marshalResetJobRequestSchema);
|
|
825
|
-
let resp:
|
|
826
|
-
const call
|
|
815
|
+
let resp: ResetJobResponse | undefined;
|
|
816
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
827
817
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
828
818
|
if (this.workspaceId !== undefined) {
|
|
829
819
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -835,24 +825,24 @@ export class JobsClient {
|
|
|
835
825
|
httpClient: this.httpClient,
|
|
836
826
|
logger: this.logger,
|
|
837
827
|
});
|
|
838
|
-
resp = parseResponse(respBody,
|
|
828
|
+
resp = parseResponse(respBody, unmarshalResetJobResponseSchema);
|
|
839
829
|
};
|
|
840
830
|
await executeCall(call, options);
|
|
841
831
|
if (resp === undefined) {
|
|
842
|
-
throw new Error('
|
|
832
|
+
throw new Error('operation completed without a result.');
|
|
843
833
|
}
|
|
844
834
|
return resp;
|
|
845
835
|
}
|
|
846
836
|
|
|
847
837
|
/** Run a job and return the `run_id` of the triggered run. */
|
|
848
|
-
async runNow(
|
|
838
|
+
private async runNow(
|
|
849
839
|
req: RunNowRequest,
|
|
850
840
|
options?: CallOptions
|
|
851
|
-
): Promise<
|
|
841
|
+
): Promise<RunNowResponse> {
|
|
852
842
|
const url = `${this.host}/api/2.2/jobs/run-now`;
|
|
853
843
|
const body = marshalRequest(req, marshalRunNowRequestSchema);
|
|
854
|
-
let resp:
|
|
855
|
-
const call
|
|
844
|
+
let resp: RunNowResponse | undefined;
|
|
845
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
856
846
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
857
847
|
if (this.workspaceId !== undefined) {
|
|
858
848
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -864,11 +854,11 @@ export class JobsClient {
|
|
|
864
854
|
httpClient: this.httpClient,
|
|
865
855
|
logger: this.logger,
|
|
866
856
|
});
|
|
867
|
-
resp = parseResponse(respBody,
|
|
857
|
+
resp = parseResponse(respBody, unmarshalRunNowResponseSchema);
|
|
868
858
|
};
|
|
869
859
|
await executeCall(call, options);
|
|
870
860
|
if (resp === undefined) {
|
|
871
|
-
throw new Error('
|
|
861
|
+
throw new Error('operation completed without a result.');
|
|
872
862
|
}
|
|
873
863
|
return resp;
|
|
874
864
|
}
|
|
@@ -897,14 +887,14 @@ export class JobsClient {
|
|
|
897
887
|
* the compute needs for the job. Alternatively, use the `POST /jobs/create` and
|
|
898
888
|
* `POST /jobs/run-now` endpoints to create and run a saved job.
|
|
899
889
|
*/
|
|
900
|
-
async submitRun(
|
|
890
|
+
private async submitRun(
|
|
901
891
|
req: SubmitRunRequest,
|
|
902
892
|
options?: CallOptions
|
|
903
|
-
): Promise<
|
|
893
|
+
): Promise<SubmitRunResponse> {
|
|
904
894
|
const url = `${this.host}/api/2.2/jobs/runs/submit`;
|
|
905
895
|
const body = marshalRequest(req, marshalSubmitRunRequestSchema);
|
|
906
|
-
let resp:
|
|
907
|
-
const call
|
|
896
|
+
let resp: SubmitRunResponse | undefined;
|
|
897
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
908
898
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
909
899
|
if (this.workspaceId !== undefined) {
|
|
910
900
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -916,11 +906,11 @@ export class JobsClient {
|
|
|
916
906
|
httpClient: this.httpClient,
|
|
917
907
|
logger: this.logger,
|
|
918
908
|
});
|
|
919
|
-
resp = parseResponse(respBody,
|
|
909
|
+
resp = parseResponse(respBody, unmarshalSubmitRunResponseSchema);
|
|
920
910
|
};
|
|
921
911
|
await executeCall(call, options);
|
|
922
912
|
if (resp === undefined) {
|
|
923
|
-
throw new Error('
|
|
913
|
+
throw new Error('operation completed without a result.');
|
|
924
914
|
}
|
|
925
915
|
return resp;
|
|
926
916
|
}
|
|
@@ -940,11 +930,11 @@ export class JobsClient {
|
|
|
940
930
|
async updateJob(
|
|
941
931
|
req: UpdateJobRequest,
|
|
942
932
|
options?: CallOptions
|
|
943
|
-
): Promise<
|
|
933
|
+
): Promise<UpdateJobResponse> {
|
|
944
934
|
const url = `${this.host}/api/2.2/jobs/update`;
|
|
945
935
|
const body = marshalRequest(req, marshalUpdateJobRequestSchema);
|
|
946
|
-
let resp:
|
|
947
|
-
const call
|
|
936
|
+
let resp: UpdateJobResponse | undefined;
|
|
937
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
948
938
|
const headers = new Headers({'Content-Type': 'application/json'});
|
|
949
939
|
if (this.workspaceId !== undefined) {
|
|
950
940
|
headers.set('X-Databricks-Org-Id', this.workspaceId);
|
|
@@ -956,11 +946,11 @@ export class JobsClient {
|
|
|
956
946
|
httpClient: this.httpClient,
|
|
957
947
|
logger: this.logger,
|
|
958
948
|
});
|
|
959
|
-
resp = parseResponse(respBody,
|
|
949
|
+
resp = parseResponse(respBody, unmarshalUpdateJobResponseSchema);
|
|
960
950
|
};
|
|
961
951
|
await executeCall(call, options);
|
|
962
952
|
if (resp === undefined) {
|
|
963
|
-
throw new Error('
|
|
953
|
+
throw new Error('operation completed without a result.');
|
|
964
954
|
}
|
|
965
955
|
return resp;
|
|
966
956
|
}
|
|
@@ -977,15 +967,15 @@ export class CancelRunWaiter {
|
|
|
977
967
|
*
|
|
978
968
|
* Throws if a failure state is reached.
|
|
979
969
|
*/
|
|
980
|
-
async wait(options?:
|
|
981
|
-
let result:
|
|
970
|
+
async wait(options?: LroOptions): Promise<GetRunResponse> {
|
|
971
|
+
let result: GetRunResponse | undefined;
|
|
982
972
|
|
|
983
|
-
const call
|
|
973
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
984
974
|
const pollResp = await this.client.getRun(
|
|
985
975
|
{
|
|
986
976
|
runId: this.runId,
|
|
987
977
|
},
|
|
988
|
-
|
|
978
|
+
callSignal !== undefined ? {signal: callSignal} : undefined
|
|
989
979
|
);
|
|
990
980
|
|
|
991
981
|
const status = pollResp.state?.lifeCycleState;
|
|
@@ -1007,16 +997,9 @@ export class CancelRunWaiter {
|
|
|
1007
997
|
}
|
|
1008
998
|
};
|
|
1009
999
|
|
|
1010
|
-
|
|
1011
|
-
...(options?.signal !== undefined && {signal: options.signal}),
|
|
1012
|
-
retrier: () =>
|
|
1013
|
-
retryOn({}, (err: Error) => {
|
|
1014
|
-
return err instanceof StillRunningError;
|
|
1015
|
-
}),
|
|
1016
|
-
};
|
|
1017
|
-
await executeCall(call, retryOptions);
|
|
1000
|
+
await executeWait(call, options);
|
|
1018
1001
|
if (result === undefined) {
|
|
1019
|
-
throw new Error('
|
|
1002
|
+
throw new Error('operation completed without a result.');
|
|
1020
1003
|
}
|
|
1021
1004
|
return result;
|
|
1022
1005
|
}
|
|
@@ -1057,15 +1040,15 @@ export class RepairWaiter {
|
|
|
1057
1040
|
*
|
|
1058
1041
|
* Throws if a failure state is reached.
|
|
1059
1042
|
*/
|
|
1060
|
-
async wait(options?:
|
|
1061
|
-
let result:
|
|
1043
|
+
async wait(options?: LroOptions): Promise<GetRunResponse> {
|
|
1044
|
+
let result: GetRunResponse | undefined;
|
|
1062
1045
|
|
|
1063
|
-
const call
|
|
1046
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1064
1047
|
const pollResp = await this.client.getRun(
|
|
1065
1048
|
{
|
|
1066
1049
|
runId: this.runId,
|
|
1067
1050
|
},
|
|
1068
|
-
|
|
1051
|
+
callSignal !== undefined ? {signal: callSignal} : undefined
|
|
1069
1052
|
);
|
|
1070
1053
|
|
|
1071
1054
|
const status = pollResp.state?.lifeCycleState;
|
|
@@ -1087,16 +1070,9 @@ export class RepairWaiter {
|
|
|
1087
1070
|
}
|
|
1088
1071
|
};
|
|
1089
1072
|
|
|
1090
|
-
|
|
1091
|
-
...(options?.signal !== undefined && {signal: options.signal}),
|
|
1092
|
-
retrier: () =>
|
|
1093
|
-
retryOn({}, (err: Error) => {
|
|
1094
|
-
return err instanceof StillRunningError;
|
|
1095
|
-
}),
|
|
1096
|
-
};
|
|
1097
|
-
await executeCall(call, retryOptions);
|
|
1073
|
+
await executeWait(call, options);
|
|
1098
1074
|
if (result === undefined) {
|
|
1099
|
-
throw new Error('
|
|
1075
|
+
throw new Error('operation completed without a result.');
|
|
1100
1076
|
}
|
|
1101
1077
|
return result;
|
|
1102
1078
|
}
|
|
@@ -1137,15 +1113,15 @@ export class RunNowWaiter {
|
|
|
1137
1113
|
*
|
|
1138
1114
|
* Throws if a failure state is reached.
|
|
1139
1115
|
*/
|
|
1140
|
-
async wait(options?:
|
|
1141
|
-
let result:
|
|
1116
|
+
async wait(options?: LroOptions): Promise<GetRunResponse> {
|
|
1117
|
+
let result: GetRunResponse | undefined;
|
|
1142
1118
|
|
|
1143
|
-
const call
|
|
1119
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1144
1120
|
const pollResp = await this.client.getRun(
|
|
1145
1121
|
{
|
|
1146
1122
|
runId: this.runId,
|
|
1147
1123
|
},
|
|
1148
|
-
|
|
1124
|
+
callSignal !== undefined ? {signal: callSignal} : undefined
|
|
1149
1125
|
);
|
|
1150
1126
|
|
|
1151
1127
|
const status = pollResp.state?.lifeCycleState;
|
|
@@ -1167,16 +1143,9 @@ export class RunNowWaiter {
|
|
|
1167
1143
|
}
|
|
1168
1144
|
};
|
|
1169
1145
|
|
|
1170
|
-
|
|
1171
|
-
...(options?.signal !== undefined && {signal: options.signal}),
|
|
1172
|
-
retrier: () =>
|
|
1173
|
-
retryOn({}, (err: Error) => {
|
|
1174
|
-
return err instanceof StillRunningError;
|
|
1175
|
-
}),
|
|
1176
|
-
};
|
|
1177
|
-
await executeCall(call, retryOptions);
|
|
1146
|
+
await executeWait(call, options);
|
|
1178
1147
|
if (result === undefined) {
|
|
1179
|
-
throw new Error('
|
|
1148
|
+
throw new Error('operation completed without a result.');
|
|
1180
1149
|
}
|
|
1181
1150
|
return result;
|
|
1182
1151
|
}
|
|
@@ -1217,15 +1186,15 @@ export class SubmitRunWaiter {
|
|
|
1217
1186
|
*
|
|
1218
1187
|
* Throws if a failure state is reached.
|
|
1219
1188
|
*/
|
|
1220
|
-
async wait(options?:
|
|
1221
|
-
let result:
|
|
1189
|
+
async wait(options?: LroOptions): Promise<GetRunResponse> {
|
|
1190
|
+
let result: GetRunResponse | undefined;
|
|
1222
1191
|
|
|
1223
|
-
const call
|
|
1192
|
+
const call = async (callSignal?: AbortSignal): Promise<void> => {
|
|
1224
1193
|
const pollResp = await this.client.getRun(
|
|
1225
1194
|
{
|
|
1226
1195
|
runId: this.runId,
|
|
1227
1196
|
},
|
|
1228
|
-
|
|
1197
|
+
callSignal !== undefined ? {signal: callSignal} : undefined
|
|
1229
1198
|
);
|
|
1230
1199
|
|
|
1231
1200
|
const status = pollResp.state?.lifeCycleState;
|
|
@@ -1247,16 +1216,9 @@ export class SubmitRunWaiter {
|
|
|
1247
1216
|
}
|
|
1248
1217
|
};
|
|
1249
1218
|
|
|
1250
|
-
|
|
1251
|
-
...(options?.signal !== undefined && {signal: options.signal}),
|
|
1252
|
-
retrier: () =>
|
|
1253
|
-
retryOn({}, (err: Error) => {
|
|
1254
|
-
return err instanceof StillRunningError;
|
|
1255
|
-
}),
|
|
1256
|
-
};
|
|
1257
|
-
await executeCall(call, retryOptions);
|
|
1219
|
+
await executeWait(call, options);
|
|
1258
1220
|
if (result === undefined) {
|
|
1259
|
-
throw new Error('
|
|
1221
|
+
throw new Error('operation completed without a result.');
|
|
1260
1222
|
}
|
|
1261
1223
|
return result;
|
|
1262
1224
|
}
|