Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new helper and client API to retrieve Azure Batch task status information for a job (optionally scoped to a single task), making it accessible via CloudClient.
Changes:
- Added
get_task_status()helper incfa/cloudops/batch_helpers.py. - Added
CloudClient.get_task_status()wrapper incfa/cloudops/_cloudclient.py.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
cfa/cloudops/batch_helpers.py |
Introduces get_task_status() and imports json to serialize task status output. |
cfa/cloudops/_cloudclient.py |
Exposes get_task_status() via CloudClient with a docstring and typed signature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| "id": task.id, | ||
| "state": task.state.value, | ||
| "exit_code": task.execution_info.exit_code, | ||
| } |
There was a problem hiding this comment.
Using task.state.value is inconsistent with the rest of this module, which generally treats SDK state fields as string-like values (e.g., get_job_state returns str(job.state) and task comparisons use task.state == batch_models.TaskState.completed). Prefer normalizing via str(task.state) (or otherwise handling both string and Enum cases) so this function doesn't rely on a .value attribute.
Use getattr to handle missing execution_info for active tasks Safely fallback to string parsing when task.state is not an Enum Add tests for string-based pre-execution task states
fix: safely parse task state and execution info in get_task_status
No description provided.