-
Notifications
You must be signed in to change notification settings - Fork 18
Fixed recovery of loops #826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
590a530 to
95f5229
Compare
# Conflicts: # streamflow/cwl/transformer.py # streamflow/cwl/translator.py # streamflow/recovery/failure_manager.py # streamflow/recovery/utils.py # streamflow/workflow/port.py # tests/test_recovery.py
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #826 +/- ##
==========================================
+ Coverage 73.46% 74.10% +0.63%
==========================================
Files 91 91
Lines 12257 12374 +117
Branches 2160 2180 +20
==========================================
+ Hits 9005 9170 +165
+ Misses 2742 2689 -53
- Partials 510 515 +5 ☔ View full report in Codecov by Sentry. |
b21f362 to
e7820f1
Compare
| # if not (self._predecessors[succ].difference(stack)): | ||
| # stack.append(succ) |
Check notice
Code scanning / CodeQL
Commented-out code Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 days ago
In general, the fix is to either (a) reinstate the code as active logic if it is required, or (b) remove it completely if it’s no longer needed. Since we cannot safely change the program’s behavior without broader context or tests, the least risky fix that preserves existing functionality is to delete the commented‑out if block and keep only the descriptive comment explaining the current behavior.
Concretely, in streamflow/recovery/utils.py, inside DirectGraph.remove_nodes, in the loop over succ in self._successors[current], we will remove the two commented lines:
# if not (self._predecessors[succ].difference(stack))):# stack.append(succ)
leaving the surrounding logic unchanged. No new imports, methods, or definitions are required.
| @@ -92,8 +92,6 @@ | ||
| for succ in self._successors[current]: | ||
| self._predecessors[succ].discard(current) | ||
| # If a successor now has no predecessors, it is unreachable | ||
| # if not (self._predecessors[succ].difference(stack)): | ||
| # stack.append(succ) | ||
| for pred in self._predecessors[current]: | ||
| self._successors[pred].discard(current) | ||
| # If a parent now has no successors, it is a dead-end |
7fa85ea to
8ee714d
Compare
8ee714d to
3e3ffdf
Compare
8c05dac to
4a6edc9
Compare
# Conflicts: # streamflow/recovery/policy/recovery.py # streamflow/workflow/step.py # tests/test_recovery.py
This commit fixes the recovery of workflows which have loops.
Requires PR #822