Skip to content

Commit 74b0c5f

Browse files
committed
ci fix and workflow methods
1 parent a21cd59 commit 74b0c5f

File tree

2 files changed

+34
-4
lines changed

2 files changed

+34
-4
lines changed

.github/workflows/test_python.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ jobs:
6060
thrift --gen py -out api/py/ api/thrift/common.thrift
6161
thrift --gen py -out api/py/ api/thrift/observability.thrift
6262
thrift --gen py -out api/py/ api/thrift/api.thrift
63+
thrift --gen py -out api/py/ api/thrift/lineage.thrift
64+
thrift --gen py -out api/py/ api/thrift/orchestration.thrift
6365
cd api/py
6466
pip3 install -r requirements/dev.txt
6567
pip3 install tox
Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
from abc import ABC, abstractmethod
2-
from typing import Dict, List
2+
from typing import Dict, List, Optional
33

4+
from ai.chronon.cli.plan.physical_graph import PhysicalGraph
45
from ai.chronon.cli.plan.physical_index import PhysicalNode
56

67

7-
class OrchestratorIface(ABC):
8-
def __init__(self):
9-
pass
8+
class ControllerIface(ABC):
9+
"""
10+
Class used to make the rest of the planner code agnostic to the underlying orchestrator.
11+
Mainly used to mock out the orchestrator for testing.
12+
"""
1013

1114
@abstractmethod
1215
def fetch_missing_confs(self, node_to_hash: Dict[str, str]) -> List[str]:
@@ -15,3 +18,28 @@ def fetch_missing_confs(self, node_to_hash: Dict[str, str]) -> List[str]:
1518
@abstractmethod
1619
def upload_conf(self, name: str, hash: str, content: str) -> None:
1720
pass
21+
22+
@abstractmethod
23+
def create_workflow(
24+
self, physical_graph: PhysicalGraph, start_date: str, end_date: str
25+
) -> str:
26+
"""
27+
Submit a physical graph to the orchestrator and return workflow id
28+
"""
29+
pass
30+
31+
@abstractmethod
32+
def get_workflow_status(self, workflow_id: str) -> str:
33+
"""
34+
Get the status of a workflow
35+
"""
36+
pass
37+
38+
@abstractmethod
39+
def get_active_workflows(
40+
self, branch: Optional[str] = None, user: Optional[str] = None
41+
) -> List[str]:
42+
"""
43+
List all active workflows
44+
"""
45+
pass

0 commit comments

Comments
 (0)