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

Fixes to breaking tests #6074

Merged
merged 24 commits into from
Jun 3, 2021
Merged

Fixes to breaking tests #6074

merged 24 commits into from
Jun 3, 2021

Conversation

DonJayamanne
Copy link
Contributor

@DonJayamanne DonJayamanne commented Jun 2, 2021

For #6104

@codecov-commenter
Copy link

codecov-commenter commented Jun 2, 2021

Codecov Report

Merging #6074 (d74a598) into main (ac66cae) will decrease coverage by 1%.
The diff coverage is 76%.

@@          Coverage Diff           @@
##            main   #6074    +/-   ##
======================================
- Coverage     71%     70%    -2%     
======================================
  Files        398     398            
  Lines      26820   26847    +27     
  Branches    3942    3950     +8     
======================================
- Hits       19268   18805   -463     
- Misses      5927    6450   +523     
+ Partials    1625    1592    -33     
Impacted Files Coverage Δ
src/client/common/application/notebook.ts 84% <0%> (-4%) ⬇️
src/client/datascience/notebook/helpers/helpers.ts 73% <ø> (+1%) ⬆️
src/client/datascience/types.ts 100% <ø> (ø)
...rc/client/datascience/commands/notebookCommands.ts 55% <66%> (-15%) ⬇️
src/client/datascience/notebook/notebookEditor.ts 38% <73%> (+2%) ⬆️
...t/datascience/notebook/creation/notebookCreator.ts 92% <100%> (+1%) ⬆️
...t/datascience/notebook/vscodeNotebookController.ts 77% <100%> (+<1%) ⬆️
.../client/datascience/plotting/plotViewerProvider.ts 38% <0%> (-48%) ⬇️
.../datascience/plotting/plotViewerMessageListener.ts 15% <0%> (-47%) ⬇️
src/client/datascience/webviewExtensibility.ts 32% <0%> (-40%) ⬇️
... and 50 more

@DonJayamanne DonJayamanne force-pushed the fixNewNotebook branch 2 times, most recently from b0332bf to fbf6d95 Compare June 3, 2021 14:41
@DonJayamanne DonJayamanne changed the title WIP Fixes to breaking tests Jun 3, 2021
this.commandManager.executeCommand(cmd).then(noop, noop);
}
if (this.notebookEditorProvider.activeEditor?.toggleOutput) {
this.notebookEditorProvider.activeEditor.toggleOutput();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think its cleaner to have it outside this class (that's what we do for other code).

@@ -44,7 +44,13 @@ suite('DataScience - VSCode Notebook - (Creation Integration)', function () {
sinon.restore();
await closeNotebooksAndCleanUpAfterTests(disposables);
});
teardown(async () => closeNotebooksAndCleanUpAfterTests(disposables));
Copy link
Contributor Author

@DonJayamanne DonJayamanne Jun 3, 2021

Choose a reason for hiding this comment

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

This is a duplicate.

@DonJayamanne DonJayamanne marked this pull request as ready for review June 3, 2021 17:52
@DonJayamanne DonJayamanne requested a review from a team as a code owner June 3, 2021 17:52
return;
}
try {
console.error(`window.visibleNotebookEditors.length = ${window.visibleNotebookEditors.length}`);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be removed.

Copy link
Member

Choose a reason for hiding this comment

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

😆 I've got a PR with all the same logging in. Does this PR have a fix for the creation issue? I wasn't seeing that offhand. Checking since I was looking at that as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like more tests are failing because of this, i just found that out (my tests were failing because of this as well)
I thought my tests was failing due to some popup (but that wasn't the case), the notebook wasn't getting created.

Copy link
Member

Choose a reason for hiding this comment

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

I had a PR here that does fix the verify cells test, but I think it's a hack.
https://github.com/microsoft/vscode-jupyter/pull/6069/files
I explicitly check for one visible document being open, and then I force it active. But I'm not sure this is a good fix as I don't know yet what was making it inactive.

Copy link
Member

Choose a reason for hiding this comment

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

At least in that case the notebook was getting created, but it's getting set off of active by something. Doesn't happen locally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Damn it, will need to debug this in VSCode and notify VSCode where the actual bug is

@@ -18,7 +18,9 @@ import {
window,
workspace
} from 'vscode';
import { IS_CI_SERVER } from '../../../test/ciConstants';
Copy link
Member

Choose a reason for hiding this comment

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

I don't believe that a constant like this would be an issue either way. But I've seen issues before where we referenced a check from src/test in product code and it caused an issue by causing the test code to initialize. I believe that isCI from src/client/common/constants is what we would want here. It's the same thing, but not referencing into test source from product code.

Looking at the code I see we do this in other spots, so if you want to leave this for now I can file a code-heath issue to clean up all references of this in a later checkin.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll remove this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually it was already removed.

@DonJayamanne DonJayamanne merged commit e3ea1de into main Jun 3, 2021
@DonJayamanne DonJayamanne deleted the fixNewNotebook branch June 3, 2021 20:12
@@ -45,6 +48,7 @@ export class NotebookCreator {
label: JVSC_EXTENSION_DisplayName
});
const placeHolder = DataScience.placeHolderToSelectOptionForNotebookCreation();
traceInfoIf(IS_CI_SERVER, `Display quick pick for creation of notebooks ${items.length}`);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Damn it, will remove this in another PR.

Copy link
Member

Choose a reason for hiding this comment

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

@DonJayamanne it's fine I think that I need to remove them all as a code-health issue. I don't believe it matters now. I'll file an issue.

DavidKutu pushed a commit that referenced this pull request Jun 3, 2021
DavidKutu pushed a commit that referenced this pull request Jun 3, 2021
* Fix test failures resulting from VSCodes Notebook Start page (#6111)

* Disable kernel auto startup in untrusted workspace (#6088)

* Disable kernel auto startup in untrusted workspace

* Fixes

* Misc

* oops

* misc

* Fixes to breaking tests (#6074)

Co-authored-by: Don Jayamanne <don.jayamanne@outlook.com>
DavidKutu pushed a commit that referenced this pull request Jun 8, 2021
* release candidate (#6059)

* release candidate

* Memorial Day API changes (#6056)

* update changelog

Co-authored-by: Ian Huff <ianhu@microsoft.com>

* Memorial Day API changes (#6056)

* Send only error type in reason (#6067)

* Fallback for sys.prefix not being returned by Python extension (#6053)

* Fixes to toggling output (#6068)

* Better telemetry when we don't find a matching kernel (#6060)

* Better data when fail to find kernel connection (#6070)

* change version and API port (#6085)

* change version to 2021.6.x

* match packagejson and changelog versions

* 6/2 API Changes (#6089)

Co-authored-by: Ian Huff <ianhu@microsoft.com>

* Port #6025 to release (#6103)

* Remove our Run Above/Below commands (#6026)

* Update changelog

* Fix pervasive test issue with editor properties (#6100) (#6106)

* update version to 2021.6.99 to be able to filter (#6122)

* update version to 2021.6.99 to be able to filter
update changelog

* update package lock and VSCode api

* don

* remove api changes in the code

* Port Don's fixes (#6115)

* Fix test failures resulting from VSCodes Notebook Start page (#6111)

* Disable kernel auto startup in untrusted workspace (#6088)

* Disable kernel auto startup in untrusted workspace

* Fixes

* Misc

* oops

* misc

* Fixes to breaking tests (#6074)

Co-authored-by: Don Jayamanne <don.jayamanne@outlook.com>

* Breaking changes ports to release (2 commits) (#6140)

* add component governance file (#6166)

* add component governance file

* remove npm components

* Cherry pick changes from main branch into release (#6174)

* final update (#6176)

* final update

* update changelog

* update verion, engine
revert change on gulpfile

* merge main

* revert engine to 1.57-insider

* delete news files that are on the changelog

* disable insiders build

Co-authored-by: Ian Huff <ianhu@microsoft.com>
Co-authored-by: Don Jayamanne <don.jayamanne@yahoo.com>
Co-authored-by: Don Jayamanne <don.jayamanne@outlook.com>
Co-authored-by: Joyce Er <joyceerhuiling@gmail.com>
DavidKutu pushed a commit that referenced this pull request Jun 10, 2021
* release candidate (#6059)

* release candidate

* Memorial Day API changes (#6056)

* update changelog

Co-authored-by: Ian Huff <ianhu@microsoft.com>

* Memorial Day API changes (#6056)

* Send only error type in reason (#6067)

* Fallback for sys.prefix not being returned by Python extension (#6053)

* Fixes to toggling output (#6068)

* Better telemetry when we don't find a matching kernel (#6060)

* Better data when fail to find kernel connection (#6070)

* change version and API port (#6085)

* change version to 2021.6.x

* match packagejson and changelog versions

* 6/2 API Changes (#6089)

Co-authored-by: Ian Huff <ianhu@microsoft.com>

* Port #6025 to release (#6103)

* Remove our Run Above/Below commands (#6026)

* Update changelog

* Fix pervasive test issue with editor properties (#6100) (#6106)

* update version to 2021.6.99 to be able to filter (#6122)

* update version to 2021.6.99 to be able to filter
update changelog

* update package lock and VSCode api

* don

* remove api changes in the code

* Port Don's fixes (#6115)

* Fix test failures resulting from VSCodes Notebook Start page (#6111)

* Disable kernel auto startup in untrusted workspace (#6088)

* Disable kernel auto startup in untrusted workspace

* Fixes

* Misc

* oops

* misc

* Fixes to breaking tests (#6074)

Co-authored-by: Don Jayamanne <don.jayamanne@outlook.com>

* Breaking changes ports to release (2 commits) (#6140)

* add component governance file (#6166)

* add component governance file

* remove npm components

* Cherry pick changes from main branch into release (#6174)

* final update (#6176)

* final update

* update changelog

* add missing thanks to changelog (#6197)

* Skip uploading vsix to azure blob store (#6204)

* publish release

* publish release

* remove last 2 numbers from release (#6219)

* publish release

* fix conflicts

* update engine to 1.58.0-insider

* return engine version to 1.57.0-insider

* Do not activate Python before opening nb (#6201) (#6230)

* publish release

Co-authored-by: Ian Huff <ianhu@microsoft.com>
Co-authored-by: Don Jayamanne <don.jayamanne@yahoo.com>
Co-authored-by: Don Jayamanne <don.jayamanne@outlook.com>
Co-authored-by: Joyce Er <joyceerhuiling@gmail.com>
DavidKutu pushed a commit that referenced this pull request Jun 16, 2021
* release candidate (#6059)

* release candidate

* Memorial Day API changes (#6056)

* update changelog

Co-authored-by: Ian Huff <ianhu@microsoft.com>

* Memorial Day API changes (#6056)

* Send only error type in reason (#6067)

* Fallback for sys.prefix not being returned by Python extension (#6053)

* Fixes to toggling output (#6068)

* Better telemetry when we don't find a matching kernel (#6060)

* Better data when fail to find kernel connection (#6070)

* change version and API port (#6085)

* change version to 2021.6.x

* match packagejson and changelog versions

* 6/2 API Changes (#6089)

Co-authored-by: Ian Huff <ianhu@microsoft.com>

* Port #6025 to release (#6103)

* Remove our Run Above/Below commands (#6026)

* Update changelog

* Fix pervasive test issue with editor properties (#6100) (#6106)

* update version to 2021.6.99 to be able to filter (#6122)

* update version to 2021.6.99 to be able to filter
update changelog

* update package lock and VSCode api

* don

* remove api changes in the code

* Port Don's fixes (#6115)

* Fix test failures resulting from VSCodes Notebook Start page (#6111)

* Disable kernel auto startup in untrusted workspace (#6088)

* Disable kernel auto startup in untrusted workspace

* Fixes

* Misc

* oops

* misc

* Fixes to breaking tests (#6074)

Co-authored-by: Don Jayamanne <don.jayamanne@outlook.com>

* Breaking changes ports to release (2 commits) (#6140)

* add component governance file (#6166)

* add component governance file

* remove npm components

* Cherry pick changes from main branch into release (#6174)

* final update (#6176)

* final update

* update changelog

* add missing thanks to changelog (#6197)

* Skip uploading vsix to azure blob store (#6204)

* publish release

* publish release

* remove last 2 numbers from release (#6219)

* publish release

* Do not activate Python before opening nb (#6201) (#6230)

* publish release

* Port LiveKernelModel fix to release for point release (#6264)

* Port keybinding updates to release (#6268)

* Contribute shift+enter, ctrl+enter, L, shift+L (#6205)

* Ctrl+Enter should put cell into command mode after executing (#6231)

* Update CHANGELOG and remove news

* port test fix (#6275)

* Fix Restarting kernel... test (#6267)

* wait for the restart command

* add news file

* update changelog

* Fix native notebook interrupt toolbar (#6280) (#6282)

* update changelog (#6284)

* -update version
-update changelog

* leave version as it was

* Respect jupyter.enableKeyboardShortcuts setting and enable ctrl+enter in command mode (#6293)

* publish release

* fix gulpfile

* undo change

Co-authored-by: Ian Huff <ianhu@microsoft.com>
Co-authored-by: Don Jayamanne <don.jayamanne@yahoo.com>
Co-authored-by: Don Jayamanne <don.jayamanne@outlook.com>
Co-authored-by: Joyce Er <joyceerhuiling@gmail.com>
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