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

Add logging to determine why variable tests were timing out #4189

Merged
merged 8 commits into from
Dec 9, 2020

Conversation

DonJayamanne
Copy link
Contributor

For #4047

@DonJayamanne DonJayamanne requested a review from a team as a code owner December 9, 2020 18:41
@@ -177,7 +178,7 @@ export abstract class BasePythonDaemon {
return Object.keys(options).every((item) => daemonSupportedSpawnOptions.indexOf(item as any) >= 0);
}
protected sendRequestWithoutArgs<R, E, RO>(type: RequestType0<R, E, RO>): Thenable<R> {
if (this.proc && typeof this.proc.exitCode !== 'number') {
if (this.isAlive && this.proc && typeof this.proc.exitCode !== 'number') {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

While running the tests locally found that there were some other unhandled exceptions.
Basically after the tests we kill the daemon, however some async code is still attempting to write to the daemon.

This ensures we handle that situation & thus prevent logging or unhandled errors (i.e. spurious errors being logged)

Copy link
Member

Choose a reason for hiding this comment

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

Nice. Think that I'd seen those errors cluttering up the logs before.

const history = await getOrCreateInteractiveWindow(ioc);

traceInfoIf(!!process.env.VSC_CI_ENABLE_TOO_MUCH_LOGGING, 'Got interactive window');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added some logging to find out what part is hanging when the variable tests timeout.

@@ -59,29 +59,41 @@ async function testInnerLoop(

export function runDoubleTest(
name: string,
testFunc: (type: 'native' | 'interactive') => Promise<void>,
testFunc: (this: Mocha.Context, type: 'native' | 'interactive') => Promise<void>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixes to properly pass the context/scope, so we can use this.skip.
We had c.skip but that didn't work as the scope wasn't setup properly.

super("Command 'workbench.action.closeAllEditors' timed out");
}
}
const closeWindowsImplementation = (timeout = 15_000) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Found in the PR that VS Code was timing out here.
We've had this issue in the past hence the timeout.
Updated to ensure we retry again after sleeping for 1/2s.
Possible VSC is stuck/busy, hence giving it time & retrying.

I.e. a work around for something flaky in VS Code.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2020

Code Coverage:

=============================== Coverage summary ===============================
Statements : 74.74% ( 19634/26271 )
Branches : 53.05% ( 8687/16376 )
Functions : 70.35% ( 3623/5150 )
Lines : 76.42% ( 18746/24529 )

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2020

Code Coverage:

=============================== Coverage summary ===============================
Statements : 78.89% ( 20726/26271 )
Branches : 56.76% ( 9295/16376 )
Functions : 76.04% ( 3916/5150 )
Lines : 80.69% ( 19793/24529 )

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2020

Code Coverage:

=============================== Coverage summary ===============================
Statements : 74.77% ( 19643/26271 )
Branches : 53.08% ( 8692/16376 )
Functions : 70.35% ( 3623/5150 )
Lines : 76.46% ( 18756/24529 )

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2020

Code Coverage:

=============================== Coverage summary ===============================
Statements : 74.76% ( 19640/26271 )
Branches : 53.06% ( 8689/16376 )
Functions : 70.35% ( 3623/5150 )
Lines : 76.44% ( 18751/24529 )

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2020

Code Coverage:

=============================== Coverage summary ===============================
Statements : 74.74% ( 19636/26271 )
Branches : 53.07% ( 8691/16376 )
Functions : 70.33% ( 3622/5150 )
Lines : 76.44% ( 18749/24529 )

@@ -600,6 +600,20 @@ jobs:

# Used by tests for non-python kernels.
# Test are enabled via env variable `VSC_JUPYTER_CI_RUN_NON_PYTHON_NB_TEST`
- name: Install Dot.net
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This seems to have been removed from main, I added it back.

- name: Install .NET Interactive
run: dotnet tool install -g --add-source "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" Microsoft.dotnet-interactive
if: matrix.test-suite != 'notebookWithoutPythonExt'
- name: Install Dot.net
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure why this is here, but leave it (no harm cause).
Difficult with all of the copy paste going on in github actions - problem is with github actions.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2020

Code Coverage:

=============================== Coverage summary ===============================
Statements : 75.29% ( 19780/26271 )
Branches : 53.62% ( 8781/16376 )
Functions : 71.07% ( 3660/5150 )
Lines : 76.97% ( 18880/24529 )

@DonJayamanne DonJayamanne merged commit d3b59db into main Dec 9, 2020
@DonJayamanne DonJayamanne deleted the fixVarsTest branch December 9, 2020 20:23
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.

3 participants