Skip to content

feat(operator): Add SignalWatcher#1147

Merged
Techassi merged 4 commits intomainfrom
feat/add-signalwatcher
Feb 3, 2026
Merged

feat(operator): Add SignalWatcher#1147
Techassi merged 4 commits intomainfrom
feat/add-signalwatcher

Conversation

@Techassi
Copy link
Member

@Techassi Techassi commented Jan 30, 2026

Part of stackabletech/issues#803.

Note

Internally, we could use an CancellationToken instead of a watch channel, but this would require us to add tokio_utils as a dependency. CancellationToken on it's own is also not sufficient, as the cancellation needs to be triggered by a signal (like SIGTERM). The SignalWatcher abstracts waiting for the signal and notifying downstream tasks all in one place.

This PR adds a new SignalWatcher which can be used to watch signals and multiply them to gracefully shutdown multiple concurrent tasks/futures.

@Techassi Techassi self-assigned this Jan 30, 2026
@Techassi Techassi moved this to Development: In Progress in Stackable Engineering Jan 30, 2026
@Techassi Techassi marked this pull request as ready for review January 30, 2026 15:35
@Techassi Techassi moved this from Development: In Progress to Development: Waiting for Review in Stackable Engineering Jan 30, 2026
@Techassi Techassi marked this pull request as draft February 2, 2026 08:37
@Techassi Techassi moved this from Development: Waiting for Review to Development: In Progress in Stackable Engineering Feb 2, 2026
@Techassi Techassi marked this pull request as ready for review February 2, 2026 10:05
@Techassi Techassi moved this from Development: In Progress to Development: Waiting for Review in Stackable Engineering Feb 2, 2026
@maltesander maltesander self-requested a review February 3, 2026 08:28
@maltesander maltesander moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Feb 3, 2026
Co-authored-by: Malte Sander <malte.sander.it@gmail.com>
maltesander
maltesander previously approved these changes Feb 3, 2026
Copy link
Member

@maltesander maltesander left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@maltesander maltesander left a comment

Choose a reason for hiding this comment

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

LGTM!

@Techassi Techassi enabled auto-merge February 3, 2026 09:40
@Techassi Techassi added this pull request to the merge queue Feb 3, 2026
@Techassi Techassi moved this from Development: In Review to Development: Done in Stackable Engineering Feb 3, 2026
Merged via the queue into main with commit f2a0840 Feb 3, 2026
5 checks passed
@Techassi Techassi deleted the feat/add-signalwatcher branch February 3, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: Done

Development

Successfully merging this pull request may close these issues.

2 participants