Skip to content

Conversation

@IanMatthewHuff
Copy link
Member

For #13258

  • 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.
@codecov-commenter
Copy link

codecov-commenter commented Aug 10, 2020

Codecov Report

Merging #13377 into master will decrease coverage by 0.00%.
The diff coverage is 81.81%.

Impacted file tree graph

@@ Coverage Diff @@ ## master #13377 +/- ## ========================================== - Coverage 59.71% 59.71% -0.01%  ========================================== Files 670 670 Lines 37338 37346 +8 Branches 5307 5312 +5 ========================================== + Hits 22298 22301 +3  Misses 13905 13905 - Partials 1135 1140 +5 
Impacted Files Coverage Δ
src/client/common/process/types.ts 84.61% <ø> (ø)
...nt/datascience/kernel-launcher/kernelDaemonPool.ts 87.96% <78.94%> (-2.47%) ⬇️
...rc/client/common/process/pythonExecutionFactory.ts 87.25% <100.00%> (ø)
...atascience/kernel-launcher/kernelLauncherDaemon.ts 74.07% <100.00%> (-0.93%) ⬇️
src/client/common/utils/platform.ts 64.70% <0.00%> (-11.77%) ⬇️
src/client/datascience/crossProcessLock.ts 79.41% <0.00%> (-11.77%) ⬇️
src/client/linters/pydocstyle.ts 86.66% <0.00%> (-2.23%) ⬇️
src/client/datascience/debugLocationTracker.ts 76.56% <0.00%> (-1.57%) ⬇️
src/client/common/process/proc.ts 14.49% <0.00%> (-0.73%) ⬇️
.../datascience/interactive-common/interactiveBase.ts 5.49% <0.00%> (-0.04%) ⬇️
... and 6 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 7e62824...5b6f2ba. Read the comment docs.

// The daemon pool can return back a non-IPythonKernelDaemon if daemon service is not supported or for Python 2.
// Use a check for the daemon.start function here before we call it.
if (!daemon.start) {
if (!('start' in daemon)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is where I'd made the previous fix to 2.7 non-daemon launching. But that funky type coming back from the daemon creation was still causing issues in other locations (such as with prewarm) so I converted the deamon create to return the actual type union that it creates and then make sure to handle the cases that might be different for a daemon versus an execution service. I should have changed it the first time around 😞 .

);
}

public async createDaemon<T extends IPythonDaemonExecutionService | IDisposable>(
Copy link

Choose a reason for hiding this comment

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

Would it make more sense to put this 'or' on the 'extends'? Or does that not work?

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking no, since the <> part I see as the "request" for what the user wants. Honestly IPythonDaemonExecutionService is almost the same as IPythonExecutionService so it could go together, but I felt like the distinction was important here between what users are actually request (some type of IPythonDaemonExecutionService) and the fact that if we can't create one then we just return an IPythonExecutionService.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

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

No Coverage information No Coverage information
0.0% 0.0% Duplication

@IanMatthewHuff
Copy link
Member Author

27 failures were just linter test failures so pushing.

@IanMatthewHuff IanMatthewHuff merged commit e18d09b into microsoft:master Aug 11, 2020
@IanMatthewHuff IanMatthewHuff deleted the dev/ianhu/python27PreWarm branch August 12, 2020 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants