Skip to content
This repository was archived by the owner on Feb 20, 2025. It is now read-only.

Commit 3d29644

Browse files
authored
Feat parody with exp (hatchet-dev#305)
* feat: gen * feat: add retry count to event payload * bump version
1 parent 6b1a0d1 commit 3d29644

14 files changed

+75
-61
lines changed

hatchet_sdk/clients/dispatcher/dispatcher.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ async def _try_send_step_action_event(
110110
eventTimestamp=eventTimestamp,
111111
eventType=event_type,
112112
eventPayload=payload,
113+
retryCount=action.retry_count,
113114
)
114115

115116
## TODO: What does this return?

hatchet_sdk/clients/rest/models/event_workflow_run_summary.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,16 @@ class EventWorkflowRunSummary(BaseModel):
4343
failed: Optional[StrictInt] = Field(
4444
default=None, description="The number of failed runs."
4545
)
46+
cancelled: Optional[StrictInt] = Field(
47+
default=None, description="The number of cancelled runs."
48+
)
4649
__properties: ClassVar[List[str]] = [
4750
"pending",
4851
"running",
4952
"queued",
5053
"succeeded",
5154
"failed",
55+
"cancelled",
5256
]
5357

5458
model_config = ConfigDict(
@@ -106,6 +110,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
106110
"queued": obj.get("queued"),
107111
"succeeded": obj.get("succeeded"),
108112
"failed": obj.get("failed"),
113+
"cancelled": obj.get("cancelled"),
109114
}
110115
)
111116
return _obj

hatchet_sdk/clients/rest/models/job_run_status.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class JobRunStatus(str, Enum):
3333
SUCCEEDED = "SUCCEEDED"
3434
FAILED = "FAILED"
3535
CANCELLED = "CANCELLED"
36+
BACKOFF = "BACKOFF"
3637

3738
@classmethod
3839
def from_json(cls, json_str: str) -> Self:

hatchet_sdk/clients/rest/models/step_run_status.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class StepRunStatus(str, Enum):
3636
FAILED = "FAILED"
3737
CANCELLED = "CANCELLED"
3838
CANCELLING = "CANCELLING"
39+
BACKOFF = "BACKOFF"
3940

4041
@classmethod
4142
def from_json(cls, json_str: str) -> Self:

hatchet_sdk/clients/rest/models/workflow_run_status.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class WorkflowRunStatus(str, Enum):
3434
FAILED = "FAILED"
3535
CANCELLED = "CANCELLED"
3636
QUEUED = "QUEUED"
37+
BACKOFF = "BACKOFF"
3738

3839
@classmethod
3940
def from_json(cls, json_str: str) -> Self:

hatchet_sdk/clients/rest/models/workflow_runs_metrics_counts.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ class WorkflowRunsMetricsCounts(BaseModel):
3333
succeeded: Optional[StrictInt] = Field(default=None, alias="SUCCEEDED")
3434
failed: Optional[StrictInt] = Field(default=None, alias="FAILED")
3535
queued: Optional[StrictInt] = Field(default=None, alias="QUEUED")
36+
cancelled: Optional[StrictInt] = Field(default=None, alias="CANCELLED")
3637
__properties: ClassVar[List[str]] = [
3738
"PENDING",
3839
"RUNNING",
3940
"SUCCEEDED",
4041
"FAILED",
4142
"QUEUED",
43+
"CANCELLED",
4244
]
4345

4446
model_config = ConfigDict(
@@ -96,6 +98,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
9698
"SUCCEEDED": obj.get("SUCCEEDED"),
9799
"FAILED": obj.get("FAILED"),
98100
"QUEUED": obj.get("QUEUED"),
101+
"CANCELLED": obj.get("CANCELLED"),
99102
}
100103
)
101104
return _obj

hatchet_sdk/contracts/dispatcher_pb2.py

Lines changed: 49 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hatchet_sdk/contracts/dispatcher_pb2.pyi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ class GroupKeyActionEvent(_message.Message):
239239
def __init__(self, workerId: _Optional[str] = ..., workflowRunId: _Optional[str] = ..., getGroupKeyRunId: _Optional[str] = ..., actionId: _Optional[str] = ..., eventTimestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., eventType: _Optional[_Union[GroupKeyActionEventType, str]] = ..., eventPayload: _Optional[str] = ...) -> None: ...
240240

241241
class StepActionEvent(_message.Message):
242-
__slots__ = ("workerId", "jobId", "jobRunId", "stepId", "stepRunId", "actionId", "eventTimestamp", "eventType", "eventPayload")
242+
__slots__ = ("workerId", "jobId", "jobRunId", "stepId", "stepRunId", "actionId", "eventTimestamp", "eventType", "eventPayload", "retryCount")
243243
WORKERID_FIELD_NUMBER: _ClassVar[int]
244244
JOBID_FIELD_NUMBER: _ClassVar[int]
245245
JOBRUNID_FIELD_NUMBER: _ClassVar[int]
@@ -249,6 +249,7 @@ class StepActionEvent(_message.Message):
249249
EVENTTIMESTAMP_FIELD_NUMBER: _ClassVar[int]
250250
EVENTTYPE_FIELD_NUMBER: _ClassVar[int]
251251
EVENTPAYLOAD_FIELD_NUMBER: _ClassVar[int]
252+
RETRYCOUNT_FIELD_NUMBER: _ClassVar[int]
252253
workerId: str
253254
jobId: str
254255
jobRunId: str
@@ -258,7 +259,8 @@ class StepActionEvent(_message.Message):
258259
eventTimestamp: _timestamp_pb2.Timestamp
259260
eventType: StepActionEventType
260261
eventPayload: str
261-
def __init__(self, workerId: _Optional[str] = ..., jobId: _Optional[str] = ..., jobRunId: _Optional[str] = ..., stepId: _Optional[str] = ..., stepRunId: _Optional[str] = ..., actionId: _Optional[str] = ..., eventTimestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., eventType: _Optional[_Union[StepActionEventType, str]] = ..., eventPayload: _Optional[str] = ...) -> None: ...
262+
retryCount: int
263+
def __init__(self, workerId: _Optional[str] = ..., jobId: _Optional[str] = ..., jobRunId: _Optional[str] = ..., stepId: _Optional[str] = ..., stepRunId: _Optional[str] = ..., actionId: _Optional[str] = ..., eventTimestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., eventType: _Optional[_Union[StepActionEventType, str]] = ..., eventPayload: _Optional[str] = ..., retryCount: _Optional[int] = ...) -> None: ...
262264

263265
class ActionEventResponse(_message.Message):
264266
__slots__ = ("tenantId", "workerId")

hatchet_sdk/contracts/dispatcher_pb2_grpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from . import dispatcher_pb2 as dispatcher__pb2
77

8-
GRPC_GENERATED_VERSION = '1.68.1'
8+
GRPC_GENERATED_VERSION = '1.69.0'
99
GRPC_VERSION = grpc.__version__
1010
_version_not_supported = False
1111

hatchet_sdk/contracts/events_pb2.py

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)