Conversation
Lilachn91
commented
Apr 17, 2026
- Added explicit reporting of ESS troubleshooting attempt count.
- Cleaned troubleshooting-method reporting
- Replaced hardcoded “geometry optimization” wording in failure logs with dynamic job type.
There was a problem hiding this comment.
Pull request overview
This PR improves troubleshooting (ESS) failure reporting by making attempt counts explicit, cleaning up the reported troubleshooting methods, and ensuring failure logs reference the actual job type instead of a hardcoded phrase.
Changes:
- Log the ESS troubleshooting attempt number when entering
Scheduler.troubleshoot_ess(). - When troubleshooting is exhausted, report the number of attempts and omit internal
trsh_attemptmarkers from the method list intrsh_ess_job(). - Add a unit test to verify attempt counting + cleaned method reporting.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
arc/scheduler.py |
Adds warning-level logging for ESS troubleshooting attempt number and refines the initial failure warning message. |
arc/job/trsh.py |
Updates “couldn’t troubleshoot” reporting to count attempts and filter trsh_attempt markers; uses dynamic job_type in messages. |
arc/job/trsh_test.py |
Adds coverage validating attempt counting and that trsh_attempt is not reported as a troubleshooting method. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # Build the message with the count and filtered methods | ||
| if trsh_attempt_count > 0 and filtered_methods: | ||
| message = f'Tried troubleshooting {trsh_attempt_count} times, with the following methods: {filtered_methods}' | ||
| elif trsh_attempt_count > 0: | ||
| message = f'Tried troubleshooting {trsh_attempt_count} times' |
There was a problem hiding this comment.
The attempt-count message always uses "times" (e.g., "Tried troubleshooting 1 times"), which reads incorrectly for a single attempt. Consider pluralizing based on the count ("1 time" vs "N times") so the error/output logs are clearer and more polished.
| # Build the message with the count and filtered methods | |
| if trsh_attempt_count > 0 and filtered_methods: | |
| message = f'Tried troubleshooting {trsh_attempt_count} times, with the following methods: {filtered_methods}' | |
| elif trsh_attempt_count > 0: | |
| message = f'Tried troubleshooting {trsh_attempt_count} times' | |
| attempt_label = 'time' if trsh_attempt_count == 1 else 'times' | |
| # Build the message with the count and filtered methods | |
| if trsh_attempt_count > 0 and filtered_methods: | |
| message = f'Tried troubleshooting {trsh_attempt_count} {attempt_label}, with the following methods: {filtered_methods}' | |
| elif trsh_attempt_count > 0: | |
| message = f'Tried troubleshooting {trsh_attempt_count} {attempt_label}' |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #871 +/- ##
=======================================
Coverage 60.39% 60.40%
=======================================
Files 102 102
Lines 31102 31109 +7
Branches 8104 8105 +1
=======================================
+ Hits 18784 18790 +6
- Misses 9974 9975 +1
Partials 2344 2344
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|