Skip to content

Conversation

@LanderOtto
Copy link
Collaborator

@LanderOtto LanderOtto commented Oct 10, 2025

This commit fixes the recovery of workflows which have loops.

Requires PR #822

# 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
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

❌ Patch coverage is 81.39535% with 48 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.10%. Comparing base (fccb5b2) to head (0a6b388).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
streamflow/recovery/utils.py 82.48% 18 Missing and 6 partials ⚠️
streamflow/recovery/policy/recovery.py 75.00% 5 Missing and 3 partials ⚠️
streamflow/deployment/connector/kubernetes.py 80.00% 6 Missing and 1 partial ⚠️
streamflow/workflow/step.py 81.81% 2 Missing and 2 partials ⚠️
streamflow/workflow/port.py 86.36% 2 Missing and 1 partial ⚠️
streamflow/cwl/transformer.py 0.00% 1 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

@GlassOfWhiskey GlassOfWhiskey force-pushed the master branch 7 times, most recently from b21f362 to e7820f1 Compare January 12, 2026 08:25
Comment on lines +94 to +96
# if not (self._predecessors[succ].difference(stack)):
# stack.append(succ)

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.

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.
Suggested changeset 1
streamflow/recovery/utils.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/streamflow/recovery/utils.py b/streamflow/recovery/utils.py
--- a/streamflow/recovery/utils.py
+++ b/streamflow/recovery/utils.py
@@ -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
EOF
@@ -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
Copilot is powered by AI and may make mistakes. Always verify output.
# Conflicts:
#	streamflow/recovery/policy/recovery.py
#	streamflow/workflow/step.py
#	tests/test_recovery.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants