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

Provide predictable startup ordering #5959

Merged
merged 33 commits into from
Jan 13, 2025
Merged
Changes from 2 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d80fc06
new session location: 'machine'
jmcphers Jan 6, 2025
31a55c0
new setting for session persistence
jmcphers Jan 6, 2025
18d265b
use setting to deduce session location
jmcphers Jan 6, 2025
6f58ffe
compute value for idle-shutdown-hours flag
jmcphers Jan 6, 2025
ee7f35d
extension middleware for session validation
jmcphers Jan 6, 2025
4722383
more middleware for session validation
jmcphers Jan 6, 2025
714273f
validate sessions after reading them from storage
jmcphers Jan 6, 2025
d5096b4
save persistent sessions to persistent storage
jmcphers Jan 7, 2025
161099c
more ergonomic setting names
jmcphers Jan 7, 2025
ec9477b
bump kallichore version
jmcphers Jan 7, 2025
ce601da
ensure extension activated before validating session
jmcphers Jan 7, 2025
380f3e6
ensure only running sessions are marked valid
jmcphers Jan 7, 2025
59cc18d
Merge remote-tracking branch 'origin/main' into feature/runtime-start…
jmcphers Jan 8, 2025
5a86933
only activate the first session
jmcphers Jan 8, 2025
5f6dd4b
factor the runtime startup status into the language runtime service
jmcphers Jan 8, 2025
1a44f29
use same logic for setting a foreground session
jmcphers Jan 8, 2025
52253f7
track/save last used time
jmcphers Jan 9, 2025
b383798
order reconnections by last used
jmcphers Jan 9, 2025
316a761
default 0 so we don't need to bump the storage format
jmcphers Jan 9, 2025
f7b2f9d
plumb activation flag everywhere
jmcphers Jan 9, 2025
1d2e975
additional activation plumbing; store last used on affiliations
jmcphers Jan 9, 2025
119f8e5
order startup of affiliated runtimes too
jmcphers Jan 9, 2025
11a6ccc
port activation behavior to console
jmcphers Jan 9, 2025
43216d7
Merge remote-tracking branch 'origin/main' into feature/persistent-se…
jmcphers Jan 9, 2025
f0b63ff
Apply suggestions from code review
jmcphers Jan 9, 2025
607fc9b
fix eslint
jmcphers Jan 9, 2025
0c6edc8
Merge branch 'feature/persistent-sessions' into feature/runtime-start…
jmcphers Jan 9, 2025
40ae82d
add option to shut down after idle
jmcphers Jan 10, 2025
f5a6b99
Merge branch 'feature/persistent-sessions' into feature/runtime-start…
jmcphers Jan 10, 2025
d72f2b1
Merge remote-tracking branch 'origin/main' into feature/runtime-start…
jmcphers Jan 10, 2025
92b818f
Merge remote-tracking branch 'origin/main' into feature/runtime-start…
jmcphers Jan 10, 2025
b7eed2a
make tests expect the correct value for `activate`
jmcphers Jan 11, 2025
e157b0a
remove duplicate from merge
positron-bot[bot] Jan 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions extensions/positron-supervisor/package.json
Original file line number Diff line number Diff line change
@@ -69,6 +69,7 @@
"type": "string",
"enum": [
"immediately",
"when idle",
"4",
"8",
"12",
@@ -78,6 +79,7 @@
],
"enumDescriptions": [
"%configuration.shutdownTimeout.immediately.description%",
"%configuration.shutdownTimeout.whenIdle.description%",
"%configuration.shutdownTimeout.4.description%",
"%configuration.shutdownTimeout.8.description%",
"%configuration.shutdownTimeout.12.description%",
11 changes: 6 additions & 5 deletions extensions/positron-supervisor/package.nls.json
Original file line number Diff line number Diff line change
@@ -9,11 +9,12 @@
"configuration.logLevel.description": "Log level for the kernel supervisor (restart Positron to apply)",
"configuration.shutdownTimeout.description": "When should kernels be shut down after Positron is closed?\n\nTimeouts are in hours and start once the kernel is idle. Restart Positron to apply.",
"configuration.shutdownTimeout.immediately.description": "Shut down kernels immediately when Positron is closed",
"configuration.shutdownTimeout.4.description": "After 4 hours",
"configuration.shutdownTimeout.8.description": "After 8 hours",
"configuration.shutdownTimeout.12.description": "After 12 hours",
"configuration.shutdownTimeout.24.description": "After 1 day",
"configuration.shutdownTimeout.168.description": "After 7 days",
"configuration.shutdownTimeout.whenIdle.description": "Wait for kernels to finish any running computations, then shut them down",
"configuration.shutdownTimeout.4.description": "After idle for 4 hours",
"configuration.shutdownTimeout.8.description": "After idle for 8 hours",
"configuration.shutdownTimeout.12.description": "After idle for 12 hours",
"configuration.shutdownTimeout.24.description": "After idle for 1 day",
"configuration.shutdownTimeout.168.description": "After idle for 7 days",
"configuration.shutdownTimeout.indefinitely.description": "Leave kernels running indefinitely",
"configuration.enable.description": "Run Jupyter kernels under the Positron kernel supervisor.",
"configuration.showTerminal.description": "Show the host terminal for the Positron kernel supervisor",
4 changes: 4 additions & 0 deletions extensions/positron-supervisor/src/KallichoreAdapterApi.ts
Original file line number Diff line number Diff line change
@@ -288,6 +288,10 @@ export class KCApi implements KallichoreAdapterApi {
// In web mode, we do not set an idle timeout at all by default,
// since it is normal for the front end to be disconnected for long
// periods of time.
} else if (shutdownTimeout === 'when idle') {
// Set the idle timeout to 0 hours, which causes the server to exit
// 30 seconds after the last session becomes idle.
shellArgs.push('--idle-shutdown-hours', '0');
} else if (shutdownTimeout !== 'indefinitely') {
// All other values of this setting are numbers that we can pass
// directly to the supervisor.