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

Merge remote kernel finders. #11879

Merged
merged 6 commits into from
Nov 4, 2022
Merged

Merge remote kernel finders. #11879

merged 6 commits into from
Nov 4, 2022

Conversation

rebornix
Copy link
Member

@rebornix rebornix commented Nov 3, 2022

Merge Universal Remote Kerner Finder logic with legacy remote kernel finder.

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • Title summarizes what is changing.
  • Has a news entry file (remember to thank yourself!).
  • Appropriate comments and documentation strings in the code.
  • Has sufficient logging.
  • Has telemetry for feature-requests.
  • Unit tests & system/integration tests are added/updated.
  • Test plan is updated as appropriate.
  • package-lock.json has been regenerated by running npm install (if dependencies have changed).

@@ -56,6 +56,9 @@ export class JupyterServerUriStorage implements IJupyterServerUriStorage, IServe
public get onDidChange(): Event<void> {
return this._onDidChangeUri.event;
}
public get onDidChangeConnectionType(): Event<void> {
Copy link
Member Author

Choose a reason for hiding this comment

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

It's duplicate but intentional. We want to get rid of IServerConnectionType and one approach is merging it into ServerUriStorage#onDidChangeConnectionType. I didn't do a clean up here as it will make this PR touch dozen more files.


suite(`Remote Kernel Finder`, () => {
let disposables: Disposable[] = [];
let preferredRemoteKernelIdProvider: PreferredRemoteKernelIdProvider;
let remoteKernelFinder: RemoteKernelFinder;
let remoteKernelFinder: UniversalRemoteKernelFinder;
Copy link
Member Author

Choose a reason for hiding this comment

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

At the very end, we will drop the prefix Universal.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, don't think that was a great name in the first place 😆 . Just needed something to distinguish it.

@inject(IsWebExtension) private readonly isWebExtension: boolean
) {
this._strategy = this.getStrategy();
this.disposables.push(this._strategy);
Copy link
Member Author

Choose a reason for hiding this comment

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

Weird that there is no configurationService.onDidChange event.

@codecov-commenter
Copy link

codecov-commenter commented Nov 3, 2022

Codecov Report

Merging #11879 (b00aac5) into main (7d63d42) will increase coverage by 0%.
The diff coverage is 73%.

❗ Current head b00aac5 differs from pull request most recent head 5fa6004. Consider uploading reports for the commit 5fa6004 to get more accurate results

@@           Coverage Diff           @@
##            main   #11879    +/-   ##
=======================================
  Coverage     63%      63%            
=======================================
  Files        490      490            
  Lines      34454    34607   +153     
  Branches    5590     5630    +40     
=======================================
+ Hits       21752    21917   +165     
+ Misses     10635    10608    -27     
- Partials    2067     2082    +15     
Impacted Files Coverage Δ
src/kernels/jupyter/launcher/serverUriStorage.ts 61% <0%> (-1%) ⬇️
src/kernels/jupyter/types.ts 100% <ø> (ø)
...er/finder/universalRemoteKernelFinderController.ts 61% <73%> (+37%) ⬆️
...nels/jupyter/finder/universalRemoteKernelFinder.ts 86% <100%> (+74%) ⬆️
src/kernels/jupyter/serviceRegistry.node.ts 100% <100%> (+2%) ⬆️
...c/notebooks/export/exportInterpreterFinder.node.ts 66% <0%> (-17%) ⬇️
src/notebooks/controllers/helpers.ts 85% <0%> (-15%) ⬇️
...andalone/intellisense/intellisenseProvider.node.ts 76% <0%> (-5%) ⬇️
...rc/platform/common/application/applicationShell.ts 24% <0%> (-4%) ⬇️
...c/notebooks/telemetry/interpreterPackageTracker.ts 73% <0%> (-4%) ⬇️
... and 29 more

@rebornix rebornix marked this pull request as ready for review November 3, 2022 21:03
remoteKernelFinder = new RemoteKernelFinder(
remoteKernelFinder = new UniversalRemoteKernelFinder(
'currentremote',
'Local Kernels',
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't look correct here, plus the string should be localized if it's a display name.

Copy link
Member Author

Choose a reason for hiding this comment

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

@IanMatthewHuff it's a test so I didn't try to make it localized.

Copy link
Member

Choose a reason for hiding this comment

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

@rebornix was reading too fast. You are totally right :)

Copy link
Member

@IanMatthewHuff IanMatthewHuff left a comment

Choose a reason for hiding this comment

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

Just one string that might need to be changes / localized, but looks great.

@rebornix rebornix enabled auto-merge (squash) November 3, 2022 23:18
@rebornix rebornix merged commit 0ecfa2c into main Nov 4, 2022
@rebornix rebornix deleted the rebornix/lexical-rodent branch November 4, 2022 01:02
@DonJayamanne DonJayamanne mentioned this pull request Nov 4, 2022
54 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants