Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve interrupt handling #996

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

alexplischke
Copy link
Contributor

Description

Improve the handling of interrupts during Job scheduling and waiting.

(Soft) Interrupts are now quicker dealt with. PollJob will now exit as soon as the global context is cancelled, rather than waiting for the poll interval to decide the next action.

Some interactions will remain interrupt free, and that is by design. Such as in the middle of Job scheduling. If saucectl has already contacted the platform to schedule a Job, but is waiting for a response, it will wait until it receives a server response to then properly stop a Job immediately following an interrupt. If a global context were used in this case, saucectl would immediately lose the connection, but the platform would still launch the Job, resulting in an orphaned Job that continues to run till completion.

@alexplischke alexplischke added the enhancement New feature or request label Dec 13, 2024
@alexplischke alexplischke marked this pull request as ready for review January 14, 2025 15:40
@alexplischke alexplischke requested a review from a team as a code owner January 14, 2025 15:40
Copy link
Contributor

@mhan83 mhan83 left a comment

Choose a reason for hiding this comment

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

💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants