Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Non-jupyter kernel finder #11538

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

Conversation

IanMatthewHuff
Copy link
Member

@IanMatthewHuff IanMatthewHuff commented May 1, 2020

For #

  • 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 enhancements.
  • 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).
  • The wiki is updated with any design decisions/details.

@IanMatthewHuff
Copy link
Member Author

Creating this as a draft pull request first. I have more cleanup to do and tests to add, but I wanted to throw this out for comment first before digging in there to see if the basic algorithm seems solid. This current code works when I did some basic sniff testing on it.

Ideas that I'm working with:

  • To show our kernel selector list we need to search and crack open kernel specs associated with the current resource. The selector needs the full json for stuff like display name and checking associated interpreters
  • Caching doesn't really help here the same way it does with finding. Finding can look into the cache, then search more. But we need everything associated here. And even if we have paths in the cache we can't assume that the files are still there and that the file contents are still the same
  • For the slow things: finding the files, reading json. We want to do them as little as possible so save our results in maps
  • This is slow, but it's prewarmed at startup time.

@IanMatthewHuff IanMatthewHuff changed the title Dev/ianhu/raw kernel finder3 !DRAFT! Non-jupyter kernel finder May 1, 2020
@codecov-io
Copy link

codecov-io commented May 1, 2020

Codecov Report

Merging #11538 into master will increase coverage by 0.11%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11538      +/-   ##
==========================================
+ Coverage   60.45%   60.57%   +0.11%     
==========================================
  Files         618      619       +1     
  Lines       33774    33889     +115     
  Branches     4763     4780      +17     
==========================================
+ Hits        20419    20527     +108     
+ Misses      12347    12345       -2     
- Partials     1008     1017       +9     
Impacted Files Coverage Δ
src/client/datascience/kernel-launcher/types.ts 23.07% <ø> (ø)
...client/datascience/kernel-launcher/kernelFinder.ts 75.59% <79.78%> (+11.63%) ⬆️
...nt/datascience/jupyter/kernels/kernelSelections.ts 90.52% <100.00%> (ø)
src/datascience-ui/react-common/arePathsSame.ts 75.00% <0.00%> (-12.50%) ⬇️
src/client/common/utils/platform.ts 64.70% <0.00%> (-11.77%) ⬇️
src/client/linters/pydocstyle.ts 86.66% <0.00%> (-2.23%) ⬇️
src/client/telemetry/index.ts 83.65% <0.00%> (-1.57%) ⬇️
src/client/datascience/debugLocationTracker.ts 76.56% <0.00%> (-1.57%) ⬇️
src/client/common/process/proc.ts 14.49% <0.00%> (-0.73%) ⬇️
src/client/application/diagnostics/types.ts 100.00% <0.00%> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0158c3...dcc6efa. Read the comment docs.

Copy link

@DonJayamanne DonJayamanne left a comment

Choose a reason for hiding this comment

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

Only two issues are blocking for me, others are completely optional comments.

  • I'd like to see cancelToken not being passed into a private method (explained)
  • Might want to remove hardcoding of / in glob search (not sure it will work on windows, either way, better to avoid hardcoding).

Copy link

@DonJayamanne DonJayamanne left a comment

Choose a reason for hiding this comment

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

Oops just realized theres an issue with foreach.

@IanMatthewHuff
Copy link
Member Author

Only two issues are blocking for me, others are completely optional comments.

  • I'd like to see cancelToken not being passed into a private method (explained)
  • Might want to remove hardcoding of / in glob search (not sure it will work on windows, either way, better to avoid hardcoding).

Thanks for taking a look Don. Much appreciated.

rchiodo
rchiodo previously approved these changes May 1, 2020
Copy link

@rchiodo rchiodo left a comment

Choose a reason for hiding this comment

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

:shipit:

@IanMatthewHuff IanMatthewHuff added the no-changelog No news entry required label May 2, 2020
@IanMatthewHuff IanMatthewHuff changed the title !DRAFT! Non-jupyter kernel finder Non-jupyter kernel finder May 2, 2020
@IanMatthewHuff IanMatthewHuff marked this pull request as ready for review May 2, 2020 12:51
@IanMatthewHuff IanMatthewHuff requested a review from rchiodo May 2, 2020 13:06
@IanMatthewHuff IanMatthewHuff requested a review from greazer May 2, 2020 13:54
@rchiodo rchiodo dismissed their stale review May 4, 2020 16:26

revoking review

Copy link

@rchiodo rchiodo left a comment

Choose a reason for hiding this comment

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

:shipit:

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 4, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@IanMatthewHuff
Copy link
Member Author

Single Workspace is just timeout.

@IanMatthewHuff IanMatthewHuff merged commit 49434e2 into microsoft:master May 4, 2020
@IanMatthewHuff IanMatthewHuff deleted the dev/ianhu/rawKernelFinder3 branch May 4, 2020 22:36
@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
no-changelog No news entry required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants