Skip to content

Commit 0ad28c5

Browse files
committed
Add WorkflowRun dataclass
1 parent 30e3ee4 commit 0ad28c5

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/databricks/labs/ucx/progress/install.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
import datetime as dt
12
import logging
3+
from dataclasses import dataclass
24

35
from databricks.labs.lsql.backends import SqlBackend
46
from databricks.labs.lsql.deployment import SchemaDeployer
@@ -7,6 +9,33 @@
79
logger = logging.getLogger(__name__)
810

911

12+
@dataclass(frozen=True, kw_only=True)
13+
class WorkflowRun:
14+
started_at: dt.datetime
15+
"""The timestamp of the workflow run start."""
16+
17+
finished_at: dt.datetime
18+
"""The timestamp of the workflow run end."""
19+
20+
workspace_id: int
21+
"""The workspace id in which the workflow ran."""
22+
23+
workflow_name: str
24+
"""The workflow name that ran."""
25+
26+
workflow_id: int
27+
""""The workflow id of the workflow that ran."""
28+
29+
workflow_run_id: int
30+
"""The workflow run id."""
31+
32+
run_as: str
33+
"""The identity the workflow was run as`"""
34+
35+
status: str
36+
"""The workflow run final status"""
37+
38+
1039
class HistoryInstallation:
1140
"""Install resources for UCX's artifacts history."""
1241

0 commit comments

Comments
 (0)