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

Linux build failure: Notebook Editor Integration Test #165149

Closed
joaomoreno opened this issue Nov 1, 2022 · 10 comments
Closed

Linux build failure: Notebook Editor Integration Test #165149

joaomoreno opened this issue Nov 1, 2022 · 10 comments
Assignees
Labels
debt Code quality issues important Issue identified as high-priority integration-test-failure

Comments

@joaomoreno
Copy link
Member

https://dev.azure.com/vscode/VSCode/_build/results?buildId=77644&view=logs&j=a8a6689c-5a84-59c0-482a-7dd9f21eb2d8&t=1fa6fb8d-7bb3-5acd-5778-bf99aac7f637&l=682

  1) Notebook Editor
       Opening a notebook should fire activeNotebook event changed only once:
     Error: Unexpected type
      at assertType (vscode-file://vscode-app/mnt/vss/_work/1/s/out/vs/base/common/types.js:67:19)
      at SimpleNotebookEditorModel.load (vscode-file://vscode-app/mnt/vss/_work/1/s/out/vs/workbench/contrib/notebook/common/notebookEditorModel.js:457:35)
      at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async NotebookModelReferenceCollection.createReferencedObject (vscode-file://vscode-app/mnt/vss/_work/1/s/out/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js:64:26)
      at async NotebookModelResolverServiceImpl.resolve (vscode-file://vscode-app/mnt/vss/_work/1/s/out/vs/workbench/contrib/notebook/common/notebookEditorModelResolverServiceImpl.js:184:31)
      at async MainThreadNotebookDocuments.$tryOpenNotebook (vscode-file://vscode-app/mnt/vss/_work/1/s/out/vs/workbench/api/browser/mainThreadNotebookDocuments.js:117:25)
@joaomoreno
Copy link
Member Author

This is actually preventing a bunch of PRs to make it into main.

image

@joaomoreno joaomoreno added the important Issue identified as high-priority label Nov 1, 2022
@joaomoreno joaomoreno added this to the November 2022 milestone Nov 1, 2022
joaomoreno added a commit that referenced this issue Nov 1, 2022
@joaomoreno
Copy link
Member Author

Skipped this test: #165150

@joaomoreno
Copy link
Member Author

Decided to comment out the entire test suite: #165150 (comment)

joaomoreno added a commit that referenced this issue Nov 1, 2022
* skip flaky test

related to #165149

* skip the entire suite
@rebornix
Copy link
Member

rebornix commented Nov 1, 2022

Thanks for reverting it, this failure is what I was expecting to see but didn't realize it's so common.

Previously we often have NPE for SimpleNotebookEditorModel.notebook as after load, we guarantee the model is a IResolvedNotebookEditorModel. IResolvedNotebookEditorModel#notebook is not undefined, however our isResolved() check previously only checked for Boolean(this._workingCopy); instead of Boolean(this._workingCopy?.model?.notebookModel);. Not we fixed isResolved() condition, it starts to fail when we do the type assert

assertType(this.isResolved());
return this;

@jrieken can you help take a look at this?

@rebornix rebornix assigned jrieken and unassigned mjbvz Nov 1, 2022
@jrieken jrieken removed this from the November 2022 milestone Nov 24, 2022
@jrieken
Copy link
Member

jrieken commented Nov 24, 2022

@bpasero This might actually be interesting for your. AFAIK we simply call resolve on the working copy manager but working copy actually isn't resolved. This is all happening here

async load(options?: INotebookLoadOptions): Promise<IResolvedNotebookEditorModel> {

The working copy doc says that the model is defined once resolve is called but it seems not so (at times)

@bpasero
Copy link
Member

bpasero commented Nov 24, 2022

Maybe running with --verbose in that flaky test gives more info, we print a good amount of details for what is going on in the working copy when resolving or saving:

image

@bpasero
Copy link
Member

bpasero commented Nov 26, 2022

#167212 brings the tests back and sets verbose logging for the failing one (I am not sure why the entire suite was disabled).

There is cases where manager.resolve can return early and maybe that happens here in this case. For example, when a disposed working copy is resolved:

if (this.isDisposed()) {
this.trace('resolve() - exit - without resolving because file working copy is disposed');
return;
}

Or when providing contents for resolving but the working copy is dirty with user changes:

if (!options?.contents && (this.dirty || this.saveSequentializer.hasPending())) {
this.trace('resolve() - exit - without resolving because file working copy is dirty or being saved');
return;
}

Anyway, any of these cases should appear in the logs now with verbose logging enabled.

bpasero added a commit that referenced this issue Nov 26, 2022
* notebook tests - run verbose (#165149)

* bumpb

* 💄
@jrieken jrieken removed their assignment Dec 5, 2022
@rebornix rebornix added the debt Code quality issues label Dec 5, 2022
@bpasero
Copy link
Member

bpasero commented Dec 6, 2022

Does not seem to fail anymore

image

@bpasero bpasero closed this as completed Dec 6, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues important Issue identified as high-priority integration-test-failure
Projects
None yet
Development

No branches or pull requests

5 participants