Skip to content

Conversation

@andrewm4894
Copy link
Owner

Summary

  • stop zombie Dagster runs with new kill_long_running_runs sensor
  • provide helper script kill_zombie_runs.py
  • expose a kill-zombies command in the Makefile
  • register the sensor in anomstack.main

Testing

  • ruff check . (fails: Found 70 errors)
  • make tests

https://chatgpt.com/codex/tasks/task_e_686998dd6f288328a9c67758380e26bf

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Introduces automated and manual cancellation for long-running Dagster runs.

  • Adds terminate_long_running_runs logic and a kill_long_running_runs sensor to auto-cancel overdue runs
  • Provides a scripts/kill_zombie_runs.py helper and a kill-zombies Makefile target for manual invocation
  • Registers the new sensor in anomstack.main to 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, script kill_zombie_runs.py, and sensor kill_long_running_runs use 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_runs function or the kill_long_running_runs sensor; 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."""
Copy link

Copilot AI Jul 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider adding a shebang (e.g., #!/usr/bin/env python3) at the top of this script to make it directly executable.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Jul 5, 2025

📊 Test Coverage Report

Coverage: 63% (yellow)

✅ Coverage maintained or improved!

💡 See detailed coverage report in the tests README

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants