-
Notifications
You must be signed in to change notification settings - Fork 3
Interactive: Interrupt interface bootup when the executor is shutdown during bootup #801
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
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
5f13229
Interactive: Interrupt interface bootup when the executor is shutdown…
jan-janssen 9242429
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7ce8719
fix flux interface
jan-janssen bd94aa1
Merge remote-tracking branch 'origin/main' into interrupt_bootup
jan-janssen 0cf4154
Merge commit '92cd615b41bd33fc1480cb093a4b71075ee1a094' into interrup…
jan-janssen 539556f
Merge commit 'faff4cecd04641f13e0402413c98340a5a25f897' into interrup…
jan-janssen 47be5ce
Merge commit 'e05297e5abf9f7efefb534164dec4fac3edf7941' into interrup…
jan-janssen f22591b
sync changes
jan-janssen 77c60a4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] dd92338
fix type hints
jan-janssen d25859d
type fixes
jan-janssen b2ee7ed
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8fc6d04
fixes
jan-janssen 357263c
remove shutdown
jan-janssen 026eb4c
Merge commit '3524942234ea82e8a0f93348a4572186361a8b94' into interrup…
jan-janssen c1fbfc4
fixes
jan-janssen 3786880
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7d07722
type fixes
jan-janssen 3d1de42
Merge commit '37868801d6707492e8ea9d293dc8094567e789e6' into interrup…
jan-janssen 355d941
add tests
jan-janssen 1ab9fca
more tests
jan-janssen 5ddaf7b
fix minimal
jan-janssen c4d44b8
fix interface
jan-janssen 489aae9
clean up interface
jan-janssen 73b55f8
fixes
jan-janssen cde4c07
fix type hints
jan-janssen 53cb830
fix tests
jan-janssen 45b6eb0
fix tests
jan-janssen 8e60279
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 71cca2f
update docstring
jan-janssen 7c4d8b2
Merge remote-tracking branch 'origin/interrupt_bootup' into interrupt…
jan-janssen 79aa4a3
fix
jan-janssen 20d0c6b
Add restart_limit to resource_dict
jan-janssen 5e23ad5
Add error messages
jan-janssen 2a472b5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 87118a2
Use random hash
jan-janssen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Boot-interrupt is currently a no-op — stop_function is accepted but never used.
Without consulting stop_function, shutdown during bootup won’t be interrupted. Short-circuit before spawn, and abort immediately if the signal flips after spawn.
def bootup( self, command_lst: list[str], - stop_function: Optional[Callable] = None, + stop_function: Optional[Callable[[], bool]] = None, ) -> bool: @@ - if self._cwd is not None: + if stop_function and stop_function(): + return False + if self._cwd is not None: os.makedirs(self._cwd, exist_ok=True) self._process = subprocess.Popen( args=self.generate_command(command_lst=command_lst), cwd=self._cwd, stdin=subprocess.DEVNULL, ) - return self.poll() + # Abort immediately if a stop is requested during/after spawn. + if stop_function and stop_function(): + self.shutdown(wait=False) + return False + return self.poll()Also applies to: 100-106, 114-114
🤖 Prompt for AI Agents