-
Notifications
You must be signed in to change notification settings - Fork 21
Description
[REQUIRED] Describe the bug
The id of a launched Execution is typed as str. In practice, the ID is returned as an int.
latch/src/latch_cli/services/launch/launch_v2.py
Lines 130 to 132 in 3a44401
| @dataclass | |
| class Execution: | |
| id: str |
[REQUIRED] To Reproduce
Steps to reproduce the behavior:
- Launch an execution.
- Look at the type of the returned execution's
id.
>>> execution: launch_v2.Execution = launch_v2.launch(...)
>>> execution
Execution(id=872009, python_outputs={}, status='UNDEFINED', outputs_url=None, flytedb_id=None)
>>> type(execution.id)
<class 'int'>[REQUIRED] Expected behavior
Either the type of the Execution.id attribute should be changed to int, or the behavior of launch_workflow() should be updated to coerce the int returned by GQL to str before creating the Execution instance.
latch/src/latch_cli/services/launch/launch_v2.py
Lines 130 to 132 in 3a44401
| @dataclass | |
| class Execution: | |
| id: str |
latch/src/latch_cli/services/launch/launch_v2.py
Lines 480 to 484 in 3a44401
| execution_id = response_data.get("metadata", {}).get("execution_id") | |
| if execution_id is None: | |
| raise RuntimeError("Workflow launch failed - no execution id returned") | |
| return Execution(id=execution_id, python_outputs=python_outputs) |
[REQUIRED] Platform Information
General information about host platform + SDK
- OS: MacOS 14.7.1
- Browser: N/A
- Latch Version: 2.66.3
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.