-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[qob][batch] do not list all jobs on failure (plus: types!) (#13500)
CHANGELOG: In Query-on-Batch, the client-side Python code will not try to list every job when a QoB batch fails. This could take hours for long-running pipelines or pipelines with many partitions. I also added API types to the list jobs end point because I have to go hunting for this every time anyway. Seems better to have this information at our digital fingertips.
- Loading branch information
Showing
9 changed files
with
137 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
from typing import TypedDict, Literal, Optional, List, Any, Dict | ||
from typing_extensions import NotRequired | ||
|
||
|
||
class CostBreakdownEntry(TypedDict): | ||
resource: str | ||
cost: float | ||
|
||
|
||
class GetJobResponseV1Alpha(TypedDict): | ||
batch_id: int | ||
job_id: int | ||
name: Optional[str] | ||
user: str | ||
billing_project: str | ||
state: Literal['Pending', 'Ready', 'Creating', 'Running', 'Failed', 'Cancelled', 'Error', 'Success'] | ||
exit_code: Optional[int] | ||
duration: Optional[int] | ||
cost: Optional[float] | ||
msec_mcpu: int | ||
cost_breakdown: List[CostBreakdownEntry] | ||
status: Optional[Dict[str, Any]] | ||
spec: Optional[Dict[str, Any]] | ||
attributes: NotRequired[Dict[str, str]] | ||
|
||
|
||
class JobListEntryV1Alpha(TypedDict): | ||
batch_id: int | ||
job_id: int | ||
name: Optional[str] | ||
user: str | ||
billing_project: str | ||
state: Literal['Pending', 'Ready', 'Creating', 'Running', 'Failed', 'Cancelled', 'Error', 'Success'] | ||
exit_code: Optional[int] | ||
duration: Optional[int] | ||
cost: Optional[float] | ||
msec_mcpu: int | ||
cost_breakdown: List[CostBreakdownEntry] | ||
|
||
|
||
class GetJobsResponseV1Alpha(TypedDict): | ||
jobs: List[JobListEntryV1Alpha] | ||
last_job_id: NotRequired[int] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.