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

Keybindings and telemetry #7183

Merged
merged 6 commits into from
Aug 18, 2021
Merged

Keybindings and telemetry #7183

merged 6 commits into from
Aug 18, 2021

Conversation

DavidKutu
Copy link

For #7133, #7124

  • 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).

David added 2 commits August 17, 2021 19:25
-add keybindings
-add progress notification when run by line starts
-disconnect when the kernel is disposed
@DavidKutu DavidKutu requested a review from a team as a code owner August 18, 2021 03:14
@codecov-commenter
Copy link

codecov-commenter commented Aug 18, 2021

Codecov Report

Merging #7183 (a500f67) into main (cccf84e) will decrease coverage by 0%.
The diff coverage is 27%.

@@          Coverage Diff           @@
##            main   #7183    +/-   ##
======================================
- Coverage     64%     64%    -1%     
======================================
  Files        362     362            
  Lines      22887   22932    +45     
  Branches    3430    3446    +16     
======================================
- Hits       14858   14801    -57     
- Misses      6715    6820   +105     
+ Partials    1314    1311     -3     
Impacted Files Coverage Δ
src/client/debugger/jupyter/debuggingManager.ts 24% <8%> (-4%) ⬇️
src/client/debugger/jupyter/kernelDebugAdapter.ts 6% <16%> (+<1%) ⬆️
src/client/common/utils/localize.ts 95% <100%> (-1%) ⬇️
src/client/datascience/constants.ts 99% <100%> (+<1%) ⬆️
src/client/debugger/constants.ts 100% <100%> (ø)
src/client/telemetry/index.ts 63% <100%> (+<1%) ⬆️
src/client/datascience/dataScienceSurveyBanner.ts 53% <0%> (-13%) ⬇️
...nt/datascience/notebook/outputs/plotViewHandler.ts 25% <0%> (-5%) ⬇️
src/client/common/cancellation.ts 72% <0%> (-4%) ⬇️
src/client/datascience/jupyter/kernels/helpers.ts 67% <0%> (-4%) ⬇️
... and 15 more

void this.installer.install(Product.ipykernel, controller?.connection.interpreter, undefined, true);
if (response === DataScience.setup()) {
sendTelemetryEvent(DebuggingTelemetry.clickedOnSetup);
this.appShell.openUrl(
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems crappy to me. You try to debug and now you have to go to a website to try and install ipykernel 6? We can't do a best effort and then if it fails send them to the website?

Copy link
Author

Choose a reason for hiding this comment

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

I had this conversation with Claudia. Some people might quit if the installer doesn't work. That's double the annoyance, try to debug, click 'Intall', fail, have to go to a website. We think this way is more effective until we can fix the installer in the python extension.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, sounds like it was discussed, but I have to say, seems pretty crummy for a user experience. Did the installer really fail that often? Was this just for the older users on 3.6?

Copy link
Author

Choose a reason for hiding this comment

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

Sometimes it installs it in the wrong conda env.
Sometimes it fails to activate the conda env because its using powershell.
If the python version is 3.6 or lower, the installation is a 'success' but you didn't actually upgrade to ipykernel 6, but to 5.5.5.

There might be more, but that's what I've seen so far.

Copy link
Author

Choose a reason for hiding this comment

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

I know its not ideal, its giving some trust to the user that they know how to navigate python envs. The bet is that they'll do it, after all, they're using notebooks and want to debug them.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we have telemetry on number of times ipykernel 6 install was tried and corresponding success on debugging a cell?

Copy link
Author

Choose a reason for hiding this comment

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

We don't, but we will starting next month. This PR has new telemetry for that.

"command": "jupyter.runByLineContinue",
"key": "f10",
"mac": "f10",
"when": "jupyter.notebookeditor.runByLineInProgress"
Copy link
Member

Choose a reason for hiding this comment

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

Out of interest, what happens if I'm debugging something in my workspace (not a notebook) and then I start run by line?

Copy link
Author

Choose a reason for hiding this comment

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

The debugging manager checks for the active editor here. Unless you're on the editor, nothing will happen on the run by line side.

const adapter = this.notebookToDebugAdapter.get(cell.notebook);
if (adapter && adapter.debugCellUri?.toString() === cell.document.uri.toString()) {
adapter.runByLineContinue();
}
}),

this.commandManager.registerCommand(DSCommands.RunByLineStop, () => {
Copy link
Member

Choose a reason for hiding this comment

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

Question is the cell specificity needed here? For any editor there would only be one RBL session. So do we need to look for selection and range? Or could we just stop RBL based on the editor?

Copy link
Author

Choose a reason for hiding this comment

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

good point

{
"command": "jupyter.runByLine",
"key": "f10",
"mac": "f10",
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity is the 'mac' entry necessary here? I assumed 'key' was sufficient.

Copy link
Author

Choose a reason for hiding this comment

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

IDK, I don't have a mac to test it.

@@ -480,7 +480,9 @@
"DataScience.interactiveWindowModeBannerSwitchAlways": "Always",
"DataScience.interactiveWindowModeBannerSwitchNo": "No",
"DataScience.ipykernelNotInstalled": "IPyKernel not installed into interpreter {0}",
"DataScience.needIpykernel6": "Ipykernel 6 is needed for debugging, click Install to continue. Or you can run 'pip install ipykernel==6.0.3/conda install ipykernel=6'",
"DataScience.needIpykernel6": "Ipykernel setup required for this feature",
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm sure this has been discussed, but could this message be more specific, and/or could we update the variable name needIpykernel6 to match the new message?

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.

I don't love the pointing at a website to install, but seems like we can resolve that moving forward.

@DavidKutu DavidKutu merged commit ec34b72 into main Aug 18, 2021
@DavidKutu DavidKutu deleted the david/keybindingsAndTelemetry branch August 18, 2021 19:45
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.

5 participants