-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fixes to trust service #14352
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
Fixes to trust service #14352
Conversation
await trustService.trustNotebook(uri, contents); | ||
assert.isTrue(await trustService.isNotebookTrusted(uri, contents), 'Notebook is not trusted'); | ||
}); | ||
test('Trusting a notebook (json saved with different formats)', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something I should have added in the previous PR.
Kudos, SonarCloud Quality Gate passed!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh dear, I did see that the notebook trust tests were failing, but assumed it was due to the native notebooks trust bug...
I ran the tests locally as well and it passed with the bug in t. |
Codecov Report
@@ Coverage Diff @@
## main #14352 +/- ##
==========================================
- Coverage 59.91% 59.43% -0.49%
==========================================
Files 709 716 +7
Lines 39334 40009 +675
Branches 5698 5799 +101
==========================================
+ Hits 23567 23779 +212
- Misses 14529 14970 +441
- Partials 1238 1260 +22
Continue to review full report at Codecov.
|
@@ -38,7 +38,13 @@ export class TrustService implements ITrustService { | |||
this.computeDigest(this.getFormattedContents(notebookContents)) | |||
]); | |||
|
|||
return this.digestStorage.containsDigest(uri, digest1) || this.digestStorage.containsDigest(uri, digest2); | |||
// return this.digestStorage.containsDigest(uri, digest1) || this.digestStorage.containsDigest(uri, digest2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull the old commented out code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove in next PR, as CI is slow.
* Remove cell index property and use build in prop (#14239) * Update other cells in cell execution (#14240) * Tests for prompting to install missing ipykernel (#14266) * Treat Native notebook tests as VS Code tests (#14282) * Fixes to blowing away of kernel info & not using right startup info (… … * Default cell language for native notebooks (#14314) * Ignore formatting in ipynb when dealing with trust (#14333) * Fixes to trust service (#14352) * Change `IPython kernel` to `Jupyter kernel` (#14375) * Trust for native notebooks (#14353)
I managed to break the trust service in a previous PR.
The tests didn't catch that, I wrote some real tests to test with VS Code (super fast test, run in 192ms, i.e. using VSC isnt an issue for such tests).
Basically trust was completely broken, nothing would get trusted.