Skip to content

Commit 394a6cf

Browse files
committed
Refactor endpoint URLs in runtime and routes to use singular 'state' instead of plural 'states'
- Updated the endpoint construction in the Runtime class to reflect the change from '/states/{state_id}/executed' to '/state/{state_id}/executed' and similarly for the errored endpoint. - Modified the route definitions in the state-manager to align with the new singular endpoint structure for executed, errored, and prune state routes.
1 parent 1c740b5 commit 394a6cf

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

python-sdk/exospherehost/runtime.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,13 @@ def _get_executed_endpoint(self, state_id: str):
141141
"""
142142
Construct the endpoint URL for notifying executed states.
143143
"""
144-
return f"{self._state_manager_uri}/{str(self._state_manager_version)}/namespace/{self._namespace}/states/{state_id}/executed"
144+
return f"{self._state_manager_uri}/{str(self._state_manager_version)}/namespace/{self._namespace}/state/{state_id}/executed"
145145

146146
def _get_errored_endpoint(self, state_id: str):
147147
"""
148148
Construct the endpoint URL for notifying errored states.
149149
"""
150-
return f"{self._state_manager_uri}/{str(self._state_manager_version)}/namespace/{self._namespace}/states/{state_id}/errored"
150+
return f"{self._state_manager_uri}/{str(self._state_manager_version)}/namespace/{self._namespace}/state/{state_id}/errored"
151151

152152
def _get_register_endpoint(self):
153153
"""

state-manager/app/routes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ async def trigger_graph_route(namespace_name: str, graph_name: str, body: Trigge
9292
return await trigger_graph(namespace_name, graph_name, body, x_exosphere_request_id)
9393

9494
@router.post(
95-
"/states/{state_id}/executed",
95+
"/state/{state_id}/executed",
9696
response_model=ExecutedResponseModel,
9797
status_code=status.HTTP_200_OK,
9898
response_description="State executed successfully",
@@ -112,7 +112,7 @@ async def executed_state_route(namespace_name: str, state_id: str, body: Execute
112112

113113

114114
@router.post(
115-
"/states/{state_id}/errored",
115+
"/state/{state_id}/errored",
116116
response_model=ErroredResponseModel,
117117
status_code=status.HTTP_200_OK,
118118
response_description="State errored successfully",
@@ -132,7 +132,7 @@ async def errored_state_route(namespace_name: str, state_id: str, body: ErroredR
132132

133133

134134
@router.post(
135-
"/states/{state_id}/prune",
135+
"/state/{state_id}/prune",
136136
response_model=SignalResponseModel,
137137
status_code=status.HTTP_200_OK,
138138
response_description="State pruned successfully",
@@ -151,7 +151,7 @@ async def prune_state_route(namespace_name: str, state_id: str, body: PruneReque
151151

152152

153153
@router.post(
154-
"/states/{state_id}/re-enqueue-after",
154+
"/state/{state_id}/re-enqueue-after",
155155
response_model=SignalResponseModel,
156156
status_code=status.HTTP_200_OK,
157157
response_description="State re-enqueued successfully",

0 commit comments

Comments
 (0)