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

Mostly revert #11038 but without breaking notebooks. #11050

Closed

Conversation

ericsnowcurrently
Copy link
Member

For #10681

This effectively makes the following change to bd942a0 (as opposed to what was done in #11038):

-        const args = internalPython.execModule(moduleName, []);
+        const args = internalPython.execModule(moduleName, [], false);

This makes sure all the extension code is using the centralized "internal" functions when running Python.

@ericsnowcurrently ericsnowcurrently added the no-changelog No news entry required label Apr 9, 2020
@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 9, 2020

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

@ericsnowcurrently ericsnowcurrently changed the title Revert #11038 (but not isolated, for now). Mostly revert #11038 but without breaking notebooks. Apr 9, 2020
@codecov-io
Copy link

codecov-io commented Apr 9, 2020

Codecov Report

Merging #11050 into master will decrease coverage by 0.02%.
The diff coverage is 42.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11050      +/-   ##
==========================================
- Coverage   61.26%   61.23%   -0.03%     
==========================================
  Files         593      593              
  Lines       32480    32484       +4     
  Branches     4592     4592              
==========================================
- Hits        19898    19893       -5     
- Misses      11580    11587       +7     
- Partials     1002     1004       +2     
Impacted Files Coverage Δ
src/client/common/process/pythonDaemonPool.ts 70.00% <42.85%> (-0.52%) ⬇️
src/datascience-ui/react-common/arePathsSame.ts 75.00% <0.00%> (-12.50%) ⬇️
src/client/common/utils/platform.ts 64.70% <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%) ⬇️
...client/datascience/kernel-launcher/kernelFinder.ts 75.70% <0.00%> (-0.94%) ⬇️
src/client/common/process/proc.ts 14.49% <0.00%> (-0.73%) ⬇️

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 63fd864...cb43027. Read the comment docs.

@karthiknadig karthiknadig requested a review from rchiodo April 9, 2020 18:00
Copy link

@rchiodo rchiodo left a comment

Choose a reason for hiding this comment

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

No the daemon should not be using the isolated script. execModule on the daemon isnt actually executing a process. It's loading the module manually.

@rchiodo
Copy link

rchiodo commented Apr 9, 2020

The smoke test has to pass before you can submit. It's indicating this still isn't working:

  1. Smoke Test: Interactive Window
    Run Cell in interactive window:
    Error: Timeout of 180000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/vsts/work/1/s/out/test/smoke/datascience.smoke.test.js)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)

  2. Smoke Test: Interactive Window
    Run Cell in native editor:
    Error: Timeout of 180000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/vsts/work/1/s/out/test/smoke/datascience.smoke.test.js)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)

@rchiodo rchiodo requested a review from DonJayamanne April 9, 2020 18:48
// tslint:disable-next-line:no-suspicious-comment
// TODO(gh-11049) Run isolated (drop the "false" arg).
const args = internalPython.execModule(moduleName, [], false);
const msg = { args };

Choose a reason for hiding this comment

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

Isn't this a redundant variable, why not const msg = { args: internalPython.exec....

const msg = { args: ['-m', moduleName] };
// tslint:disable-next-line:no-suspicious-comment
// TODO(gh-11049) Run isolated (drop the "false" arg).
const args = internalPython.execModule(moduleName, [], false);

Choose a reason for hiding this comment

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

Feels the API is incorrectly named, this is generating arguments but method indicates it's exciting a module. This is not obvious unless I read the code in the function.

@microsoft-github-updates microsoft-github-updates bot changed the base branch from master to main September 3, 2020 21:07
@codecov-commenter
Copy link

codecov-commenter commented Sep 3, 2020

Codecov Report

Merging #11050 into main will decrease coverage by 1.28%.
The diff coverage is 87.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #11050      +/-   ##
==========================================
- Coverage   61.26%   59.98%   -1.29%     
==========================================
  Files         593      734     +141     
  Lines       32480    49412   +16932     
  Branches     4592     8106    +3514     
==========================================
+ Hits        19898    29638    +9740     
- Misses      11580    18199    +6619     
- Partials     1002     1575     +573     
Impacted Files Coverage Δ
src/client/common/process/pythonDaemonPool.ts 76.88% <87.50%> (+6.37%) ⬆️
src/client/datascience/common.ts 61.25% <0.00%> (-38.75%) ⬇️
.../datascience/jupyter/interpreter/jupyterCommand.ts 36.81% <0.00%> (-18.36%) ⬇️
...c/client/common/application/customEditorService.ts 22.44% <0.00%> (-15.06%) ⬇️
src/client/ioc/container.ts 60.00% <0.00%> (-15.00%) ⬇️
src/client/common/utils/platform.ts 63.33% <0.00%> (-13.14%) ⬇️
src/datascience-ui/react-common/arePathsSame.ts 75.00% <0.00%> (-12.50%) ⬇️
...atascience/jupyter/jupyterSessionManagerFactory.ts 34.28% <0.00%> (-9.47%) ⬇️
src/client/common/process/types.ts 90.90% <0.00%> (-9.10%) ⬇️
src/client/datascience/jupyter/serverSelector.ts 82.67% <0.00%> (-8.50%) ⬇️
... and 348 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 63fd864...cb43027. Read the comment docs.

@ericsnowcurrently
Copy link
Member Author

This is unnecessary now that the DS code has been moved out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog No news entry required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants