Open
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Introduces automated and manual cancellation for long-running Dagster runs.
- Adds
terminate_long_running_runslogic and akill_long_running_runssensor to auto-cancel overdue runs - Provides a
scripts/kill_zombie_runs.pyhelper and akill-zombiesMakefile target for manual invocation - Registers the new sensor in
anomstack.mainto enable on startup
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/kill_zombie_runs.py | adds manual cancellation script invoking timeout logic |
| anomstack/sensors/timeout.py | implements terminate_long_running_runs and sensor logic |
| anomstack/main.py | registers the kill_long_running_runs sensor |
| Makefile | defines kill-zombies command for the helper script |
Comments suppressed due to low confidence (2)
Makefile:88
- [nitpick] The Makefile target
kill-zombies, scriptkill_zombie_runs.py, and sensorkill_long_running_runsuse inconsistent naming conventions; consider unifying to a single style for clarity.
kill-zombies:
anomstack/sensors/timeout.py:50
- No tests were added for the
terminate_long_running_runsfunction or thekill_long_running_runssensor; consider adding unit tests to validate timeout and cancellation behavior.
@sensor(name="kill_long_running_runs", minimum_interval_seconds=CHECK_INTERVAL_SECONDS)
| @@ -0,0 +1,6 @@ | |||
| """Utility script to cancel long running Dagster runs.""" | |||
There was a problem hiding this comment.
[nitpick] Consider adding a shebang (e.g., #!/usr/bin/env python3) at the top of this script to make it directly executable.
📊 Test Coverage ReportCoverage: 63% (yellow) ✅ Coverage maintained or improved!
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
kill_long_running_runssensorkill_zombie_runs.pykill-zombiescommand in the Makefileanomstack.mainTesting
ruff check .(fails: Found 70 errors)make testshttps://chatgpt.com/codex/tasks/task_e_686998dd6f288328a9c67758380e26bf