Add test_submit_first integration test and JobInfo dataclass#52
Add test_submit_first integration test and JobInfo dataclass#52Copilot wants to merge 6 commits into
test_submit_first integration test and JobInfo dataclass#52Conversation
test_submit_first integration test
|
@copilot refactor the Note, otherwise, we can't tell from the output on which cluster is was run when Update the PR to also mention this change. |
Done in commit Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
test_submit_first integration testtest_submit_first integration test and JobInfo dataclass
There was a problem hiding this comment.
Pull request overview
This PR improves the cluv submit API to return structured metadata about a submission (including the winning cluster for cluster="first") and adds integration coverage for the multi-cluster “first to start wins” submit path.
Changes:
- Introduces a frozen
JobInfodataclass and updatessubmit()/submit_first()to returnJobInfo | Noneinstead ofint | None. - Adds a new integration test
test_submit_firstand updatestest_submitassertions to work withJobInfo. - Records a UTC submission timestamp at submit completion time.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
cluv/cli/submit.py |
Adds JobInfo and updates submit functions to return structured job metadata. |
tests/test_integration.py |
Updates submit integration test to assert JobInfo and adds an end-to-end test for cluster="first". |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #52 +/- ##
===========================================
- Coverage 60.01% 41.34% -18.68%
===========================================
Files 14 14
Lines 1138 1149 +11
===========================================
- Hits 683 475 -208
- Misses 455 674 +219 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@copilot Fix pre-commit issues |
Fixed in commit Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Agent-Logs-Url: https://github.com/mila-iqia/cluv/sessions/e36acd22-d1be-4235-bd35-f95a8eba6b1b Co-authored-by: lebrice <13387299+lebrice@users.noreply.github.com>
Agent-Logs-Url: https://github.com/mila-iqia/cluv/sessions/5fa8d6f4-44f6-47b8-aa6d-6b40fcf255b9 Co-authored-by: lebrice <13387299+lebrice@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Fabrice Normandin <fabrice.normandin@gmail.com>
Agent-Logs-Url: https://github.com/mila-iqia/cluv/sessions/1f65cc86-e12e-40dd-9e49-f04521f21bfa Co-authored-by: lebrice <13387299+lebrice@users.noreply.github.com>
1804308 to
7c656fb
Compare
Co-authored-by: Fabrice Normandin <fabrice.normandin@gmail.com>
The
submit firstcommand (multi-cluster "first to start wins" submission) had no integration test coverage, unlike the single-clustersubmitpath. Additionally,submit()previously returned a bareint | None, making it impossible to tell which cluster won when usingcluster="first".Changes
cluv/cli/submit.py: Adds a frozenJobInfodataclass withcluster: str,job_id: int, andsubmit_time: datetimefields. Refactorssubmit()andsubmit_first()to returnJobInfo | Noneinstead ofint | None. Thesubmit_timeis captured usingdatetime.now(timezone.utc)right aftersbatchcompletes.tests/test_integration.py: Addstest_submit_firstwhich callssubmit(cluster="first", ...)against all availableSUBMIT_SUPPORTED_CLUSTERSJobInfoinstancefinallyblocktest_submitto assert onJobInfoand verifyjob_info.clusterTimeout is 300 s (vs. 180 s for
test_submit) to account for syncing across multiple clusters before submission.