Skip to content

Add a wait on stop run and remove running check on delete - #1211

Open
lalepee wants to merge 7 commits into
mainfrom
LAL/BUG-async_stop_run-PROD-16436
Open

Add a wait on stop run and remove running check on delete#1211
lalepee wants to merge 7 commits into
mainfrom
LAL/BUG-async_stop_run-PROD-16436

Conversation

@lalepee

@lalepee lalepee commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@lalepee
lalepee requested review from jreynard-code and a lite review from Copilot August 5, 2026 13:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts runner deletion and run stopping behavior by removing the “running runs” deletion guard and by turning RunStop into a request/response event so the caller can synchronously observe stop completion (via an event response).

Changes:

  • Removed the HasRunningRuns pre-check when archiving/deleting a runner.
  • Converted RunStop to CsmRequestResponseEvent<String> and set a response in the stop handler.
  • Updated RunnerService.stopLastRunOf to return the stop response (run id) instead of being Unit.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
runner/src/main/kotlin/com/cosmotech/runner/service/RunnerService.kt Removes the running-runs delete guard and changes stop API to return a response value.
run/src/main/kotlin/com/cosmotech/run/service/RunServiceImpl.kt Populates RunStop.response when stopping a run.
common/src/main/kotlin/com/cosmotech/common/events/RunEvents.kt Changes RunStop from a fire-and-forget event to a request/response event.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread run/src/main/kotlin/com/cosmotech/run/service/RunServiceImpl.kt

@jreynard-code jreynard-code left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some question/validation before merging this PR <3

Comment thread common/src/main/kotlin/com/cosmotech/common/events/RunEvents.kt Outdated
Comment thread run/src/main/kotlin/com/cosmotech/run/service/RunServiceImpl.kt Outdated
add log on scheduled task start
@lalepee
lalepee force-pushed the LAL/BUG-async_stop_run-PROD-16436 branch from fc4a155 to f3920e7 Compare August 13, 2026 13:14
@lalepee
lalepee force-pushed the LAL/BUG-async_stop_run-PROD-16436 branch from f3920e7 to 29db5e7 Compare August 13, 2026 13:21
@lalepee
lalepee requested a review from jreynard-code August 13, 2026 13:34
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.

3 participants