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

Improve runtime session service stability #5380

Merged
merged 45 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
3d9d2e3
throw an error when starting a notebook session without a notebook uri
seeM Nov 9, 2024
3a354a3
throw an error when starting a runtime for a notebook while another r…
seeM Nov 9, 2024
d58c28c
throw an error when starting a runtime for a notebook while another r…
seeM Nov 9, 2024
19368eb
update restoreRuntimeSession: add validation; coalesce concurrent req…
seeM Nov 9, 2024
bb7df67
fix leaked disposable
seeM Nov 14, 2024
974aa05
log uncaught exception
seeM Nov 14, 2024
a7197bd
update test session manager for tests
seeM Nov 14, 2024
5f1a33f
checkpoint tests
seeM Nov 14, 2024
5883cd8
checkpoint 2 tests
seeM Nov 14, 2024
7069706
refactor to generate tests
seeM Nov 14, 2024
ad4a962
add selectRuntime to start tests
seeM Nov 14, 2024
4187cf5
log uncaught promise rejection
seeM Nov 14, 2024
fe6a5f9
all current tests passing
seeM Nov 15, 2024
34a37c3
add auto start and more select tests;
seeM Nov 15, 2024
fe5a76e
change error message when selecting a non-existing runtime
seeM Nov 15, 2024
6487dea
throw when starting a notebook in an untrusted workspace
seeM Nov 15, 2024
987af00
coalesce concurrent auto start requests; validate before auto start
seeM Nov 15, 2024
d6eb11c
finalize auto start tests
seeM Nov 15, 2024
fa91bf6
fix typo
seeM Nov 15, 2024
79cad9e
add restart tests
seeM Nov 15, 2024
ed52e44
fix restarting notebooks
seeM Nov 15, 2024
6044bda
test encountering createSession/restoreSession error; catch uncaught …
seeM Nov 15, 2024
1b54978
refine test session shutdown & restart behavior; fix related tests; s…
seeM Nov 15, 2024
b1eb0c4
skip failing test for now
seeM Nov 15, 2024
0a89f1e
fix leaked disposable
seeM Nov 15, 2024
d15995b
wip fixing restart queueing issue
seeM Nov 19, 2024
8ae2a4a
make console session for language/runtime checks explicit
seeM Nov 22, 2024
0558d3d
return the correct session for selectRuntime test helper
seeM Nov 22, 2024
84c37aa
make activeSessions check explicit
seeM Nov 22, 2024
b67b6f9
test starting after an error was encountered previously
seeM Nov 22, 2024
4e7efaf
test actual objects since there could be multiple sessions with the s…
seeM Nov 22, 2024
9acb4b0
remove unneeded roundtrip
seeM Nov 22, 2024
801d0d7
we can actually use `getConsoleSessionForRuntime` after the fix
seeM Nov 22, 2024
275b611
fix: return the latest matching console in `getConsoleSessionForRuntime`
seeM Nov 22, 2024
c9077df
fix: notebook sessions not being set/cleared from starting starting s…
seeM Nov 22, 2024
7b84fda
re-add restore fires onWillStartSession test
seeM Nov 22, 2024
f9bee54
fix import across environment types
seeM Nov 22, 2024
688322d
fix leaked disposable
seeM Nov 22, 2024
2d5092a
stop notebook runtime error messages from showing up in the console
seeM Nov 23, 2024
586b7e1
sort by createdTimestamp instead of insert order
seeM Nov 25, 2024
0259c3d
fix multiple sessions having the same `createdTimestamp`
seeM Nov 26, 2024
0e3cf4f
fix restart while ready not clearing the starting maps
seeM Nov 26, 2024
065e6e7
add `onDidEndSession` disposable to the session's disposables
seeM Nov 28, 2024
811cc2f
fix uncaught error
seeM Nov 28, 2024
25cea7f
dont use assert.strict since it doesnt seem to work in the browser en…
seeM Nov 28, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,19 @@ function executeCode(
}
}
}).catch(error => {
// Stop listening for replies.
handler.dispose();

// Reject the outer execution promise since we've encountered an error.
reject(error);

// Rethrow the error to stop any replies that are chained to this promise.
throw error;
});

// Avoid unhandled rejections being logged to the console.
// The actual error-handling is in the catch block above.
currentMessagePromise.catch(() => { });
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cleaning up some log noise.

});

// Execute the cell.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ import { ViewContainer, IViewContainersRegistry, ViewContainerLocation, Extensio
import { registerAction2 } from 'vs/platform/actions/common/actions';
import { PositronOpenUrlInViewerAction } from 'vs/workbench/contrib/positronPreview/browser/positronPreviewActions';
import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope, } from 'vs/platform/configuration/common/configurationRegistry';
import { POSITRON_PREVIEW_PLOTS_IN_VIEWER } from 'vs/workbench/services/languageRuntime/common/languageRuntimeUiClient';

// The Positron preview view icon.
const positronPreviewViewIcon = registerIcon('positron-preview-view-icon', Codicon.positronPreviewView, nls.localize('positronPreviewViewIcon', 'View icon of the Positron preview view.'));

export const POSITRON_PREVIEW_PLOTS_IN_VIEWER = 'positron.viewer.interactivePlotsInViewer';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needed to move this from browser to common to fix failing tests as well as a linting error that must've snuck through a while ago.


// Register the Positron preview container.
const VIEW_CONTAINER: ViewContainer = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry).registerViewContainer({
id: POSITRON_PREVIEW_VIEW_ID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { URI } from 'vs/base/common/uri';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { ILogService } from 'vs/platform/log/common/log';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { POSITRON_PREVIEW_PLOTS_IN_VIEWER } from 'vs/workbench/contrib/positronPreview/browser/positronPreview.contribution';

export const POSITRON_PREVIEW_PLOTS_IN_VIEWER = 'positron.viewer.interactivePlotsInViewer';

/**
* The types of messages that can be sent to the backend.
Expand Down
355 changes: 266 additions & 89 deletions src/vs/workbench/services/runtimeSession/common/runtimeSession.ts

Large diffs are not rendered by default.

Loading