| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Codecov Report
@@ Coverage Diff @@
## master #12950 +/- ##
=========================================
Coverage ? 60.01%
=========================================
Files ? 672
Lines ? 36590
Branches ? 5135
=========================================
Hits ? 21958
Misses ? 13534
Partials ? 1098
Continue to review full report at Codecov.
|
Sorry, something went wrong.
|
In order to enforce setting and checking trust with the same contents, Rich Chiodo (@rchiodo) and I think it would be good to refactor trustNotebook and isNotebookTrusted to take INotebookModel as a sole parameter, and then grab the file URI and contents from the model. (Don Jayamanne (@DonJayamanne) I know you suggested doing this at the very beginning, so hopefully this is good news.) This PR doesn't do that because we're releasing tomorrow and a major refactor is not strictly necessary to submit this bug fix; we just needed to construct the model, check trust with model.getContents, and update trust accordingly. I'll be submitting a separate PR for the refactor. |
Sorry, something went wrong.
| kind: 'updateTrust', | ||
| oldDirty: model.isDirty, | ||
| newDirty: model.isDirty, | ||
| isNotebookTrusted: await this.trustService.isNotebookTrusted(file, contentsToCheck) |
There was a problem hiding this comment.
Why do we need to perform an update if the notebook is not trusted?
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry, something went wrong.
There was a problem hiding this comment.
But we could skip this update if the notebook comes back as already trusted.
In reply to: 454655061 [](ancestors = 454655061,454653784)
Sorry, something went wrong.
There was a problem hiding this comment.
Because the notebook trust is defaulted to true: https://github.com/microsoft/vscode-python/pull/12950/files#diff-9023bf28fe1ab2fbf6208e4cad576866R352
That's because it's going to be trusted anyway without calling isNotebookTrusted if contents === undefined || isUntitledFile(file) (which is what we did before this PR). And then if we actually need to check if the notebook is trusted, we update the model with the result of the actual check.
Sorry, something went wrong.
There was a problem hiding this comment.
Yes but if the result comes back as trusted, you don't need to update the model.
Sorry, something went wrong.
There was a problem hiding this comment.
Yes but the model is already trusted at that point. So updating it is redundant.
I'm suggesting this:
if (!(await this.trustService.isNotebookTrusted(file, contentsToCheck))) {
model.update({
source: 'user',
kind: 'updateTrust',
oldDirty: model.isDirty,
newDirty: model.isDirty,
isNotebookTrusted: false
}
Sorry, something went wrong.
There was a problem hiding this comment.
Yeah those changes are already in there
Sorry, something went wrong.
There was a problem hiding this comment.
🕐
Sorry, something went wrong.
|
Kudos, SonarCloud Quality Gate passed!
|
Sorry, something went wrong.
* Update model.isTrusted on trust change (#12820) (#12823) * Reduce visual complexity of trust prompt (#12839) (#12847) * Port python 2.7 fix to release (#12877) * port color fix on collapse all (#12895) (#12897) * fix a color on collapse all (#12895) * update changelog * Merge fixes into July release (#12889) Co-authored-by: Timothy Ruscica <35348871+techwithtim@users.noreply.github.com> * Merge more fixes into july release (#12918) Co-authored-by: Joyce Er <joyceerhuiling@gmail.com> * Port trust fixes (#12929) * Fix regressions in trusted notebooks (#12902) * Handle trustAllNotebooks selection * Fix bug where after trusting, UI didn't update * Recover from ENOENT due to missing parent directory when trusting notebook (#12913) * Disable keydown on native cells in untrusted notebooks (#12914) * Hide editor icons when editor is not a notebook (#12934) (#12935) * Check for hideFromUser before activating current terminal (#12942) (#12956) * Check for hideFromUser before activating current terminal * Add tests * Tweak logic * Port final trust fixes for release (#12965) * Only allow Enter / NumpadEnter w/o ctrl/shift/alt (#12939) * Send telemetry for notebook trust prompt selections (#12964) * Fixes for persisting trust (#12950) * Display survey for native notebooks on/after 1st August (#12961) (#12975) Co-authored-by: Joyce Er <joyceerhuiling@gmail.com> Co-authored-by: Joyce Er <joyceerhuiling@gmail.com> * Contains cherry picks, version updates, change log updates (#12983) * Update version and change log * Improve detection when LS is fully loaded for IntelliCode (#12853) * Fix path * Actually fix settings * Add news * Add test * Format * Suppress 'jediEnabled' removal * Drop survey first launch threshold * Wait for client ready * Handle async dispose * Fix the date Co-authored-by: Mikhail Arkhipov <mikhaila@microsoft.com> * hide the gather button while a cell is executing (#12984) * Update date (#13002) * remove release notes from the start page (#13032) * Cherry pick, version change and change log update (#13079) * Ensure languageServer value is valid, send event during activate (#13064) * Update change log and version * Activate banner prompt for Pylance (#12817) * Fix path * Actually fix settings * Add news * Add test * Format * Suppress 'jediEnabled' removal * Drop survey first launch threshold * Remove LS experiments * Frequency + tests * Fix test * Update message to match spec * Open workspace for extension rather than changing setting * Fix localization string * Show banners asynchronously * Add experiments * Formatting * Typo * Put back verifyAll * Remove obsolete experiments, add Pylance * Suppress experiment if Pylance is installed * PR feedback Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com> * Update change log as per comments Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Co-authored-by: Mikhail Arkhipov <mikhaila@microsoft.com> * Port fix the gather survey (#13086) (#13105) * Fix the gather survey (#13086) * fix the gather survey added 'gather stats' telemetry mention the gather comments to update the python ext * oops * fix tests and address comments * update gather stats when resetting the kernel * set globalstate vars to 0 when we open vs code * fix gather stats telemetry * fix tests * fix tests for real Co-authored-by: Joyce Er <joyceerhuiling@gmail.com> Co-authored-by: Ian Huff <ianhu@microsoft.com> Co-authored-by: David Kutugata <dakutuga@microsoft.com> Co-authored-by: Don Jayamanne <don.jayamanne@yahoo.com> Co-authored-by: Timothy Ruscica <35348871+techwithtim@users.noreply.github.com> Co-authored-by: Mikhail Arkhipov <mikhaila@microsoft.com> Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
For #12933