Skip to content

Conversation

@bgunnar5
Copy link
Member

This PR extends #587 so we should probably get that merged first.

This branch adds in the merlin cancel command. This command does the following when given a study to cancel:

  1. Stops the workers for that study
  2. Purges the queues in that study
  3. Marks all active runs associated with that study as "CANCELLED"

So it's essentially a wrapper for the merlin stop-workers and merlin purge commands, with some additional database logic.

In order to accomplish this, I had to add a "status" entry to the RunModel data model. This status is different from the status given checked with the merlin status and merlin detailed-status commands. Those commands check step- and task-level statuses; this new "status" entry is to track the status of a full run.

The merlin monitor will now check this new run-level status. If a run is listed as active (initialized, queued, or running) then the monitor will watch that run. If a run is listed as finished (completed, cancelled, or failed) then the monitor will not watch that run.

Copy link
Collaborator

@doutriaux1 doutriaux1 left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for all the added testing too!

@bgunnar5 bgunnar5 merged commit 51d91f6 into llnl:develop-2.0 Nov 24, 2025
21 checks passed
@bgunnar5 bgunnar5 deleted the feature/cancel-command branch November 24, 2025 19:16
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