-
Notifications
You must be signed in to change notification settings - Fork 883
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
update azdata-test in notebooks extension #24984
Conversation
@@ -150,7 +150,7 @@ export class BookTocManager implements IBookTocManager { | |||
} | |||
|
|||
for (const [key, value] of this.tocFiles.entries()) { | |||
const yamlFile = await yaml.safeLoad(value); |
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.
this wasn't related to the package version update, but it was a red squiggly when I was in the file, so updated this while I was there
@@ -183,7 +183,7 @@ export class BookModel { | |||
if (this._tableOfContentsPath) { | |||
try { | |||
let fileContents = await fsPromises.readFile(this._configPath, 'utf-8'); | |||
const config = yaml.safeLoad(fileContents.toString()); | |||
const config = yaml.safeLoad(fileContents.toString()) as JupyterBookSection; |
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.
@barbaravaldez could you double check if this cast and the one below in bookTocManager.ts
are correct or should be changed? The variables in the tests have types specified, but wasn't sure about these
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.
JupyterBookSection is the only class I'm seeing with a title field for this one, and the tableOfContents variable in bookTocManager already had a JupyterBookSection[] type. Looks good to me.
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.
Yup! It looks good to me
Pull Request Test Coverage Report for Build 7042003367Warning: This coverage report may be inaccurate.We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
💛 - Coveralls |
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.
It should be safe IMO, but it looks like yarn.lock has a lot of package updates arriving with this PR..
@@ -691,7 +691,7 @@ | |||
"@types/request": "^2.48.1", | |||
"@types/rimraf": "^2.0.2", | |||
"@types/sinon": "^9.0.4", | |||
"@types/tar": "^4.0.3", | |||
"@types/tar": "^6.1.10", |
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.
I had to update this version to get rid of the error when yarn npm-run-all -lp extensions-ci
was getting run in the Compile & Hygiene step of the PR validation pipeline (example failure) .
The problem was that the type definition file for @types/minipass couldn't be located, but when I looked at the @types/minipass folder in notebooks node_modules folder, the readme said that minipass already includes it's types definition, so dependencies on @types/minipass are unnecessary and it's expected that there isn't an index.d.ts file. The @types/minipass package has been marked as deprecated, so it really shouldn't be used.
Version 4.0.3 of @types/tar has a dependency on @types/minipass, but the latest version has a dependency on minipass, so updating the version resolved the issue of the @types/minipass index.d.ts file not being found.
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.
And we're using v6 of tar anyways, so this is the correct thing to do for that regardless! 😄
This updates the azdata-test dependency in the notebooks extension to fix this dependabot alert: https://github.com/microsoft/azuredatastudio/security/dependabot/603
There were a few updates that needed to be made since a few compilation errors started after the azdata-test package was bumped, since it also bumped several other dependencies. There were the errors:
![image](https://private-user-images.githubusercontent.com/31145923/283630327-6c78f3a7-3d0e-4e8e-b870-8cb0b8a5d4bb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1NzgzOTUsIm5iZiI6MTcyMDU3ODA5NSwicGF0aCI6Ii8zMTE0NTkyMy8yODM2MzAzMjctNmM3OGYzYTctM2QwZS00ZThlLWI4NzAtOGNiMGI4YTVkNGJiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzEwVDAyMjEzNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgyZGEyZTQ3ODA1ZTQ2ZjYxM2U3YzRmYjI5Njg4NTQ5MjYyYjEzZWE0NzAxNWY3YTRiZDRlNmU3YTMyOGM3ZmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.IHP6lMbPVEBBQwCrbaoQ3r6DC8UP2WmNzMEuk7xNo8o)
The fix was to cast the result from those
yaml.safeLoad()
calls. It looks like the errors started showing up because the resolved version of @types/js-yaml went from 3.12.1 to 3.12.10 and the return type changed fromany
tostring | object | undefined
3.12.1:
![image](https://private-user-images.githubusercontent.com/31145923/283630785-438ee6c7-8f2b-43b7-93a2-65a1ea9bc0f6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1NzgzOTUsIm5iZiI6MTcyMDU3ODA5NSwicGF0aCI6Ii8zMTE0NTkyMy8yODM2MzA3ODUtNDM4ZWU2YzctOGYyYi00M2I3LTkzYTItNjVhMWVhOWJjMGY2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzEwVDAyMjEzNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIyMDc2NDIwOTg4N2QyOWIwZWQwZmY0NjJhZTZjNDY1OWQxZjhmNGY0Zjg4NTZjOWYxZGViNTljODczNzQxYTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.SyfiKcgLWFd77ZnNE6P2yf5EuxBY83m4frIxcROgWNI)
![image](https://private-user-images.githubusercontent.com/31145923/283630799-e9caeb49-9cc3-468a-9606-4882c2f47957.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA1NzgzOTUsIm5iZiI6MTcyMDU3ODA5NSwicGF0aCI6Ii8zMTE0NTkyMy8yODM2MzA3OTktZTljYWViNDktOWNjMy00NjhhLTk2MDYtNDg4MmMyZjQ3OTU3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzEwVDAyMjEzNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBiZjY0NTJlZTFhNWU1MThiZjU4ZTdjN2FhMTg4MTUzNmEyYzhhNmUwNjdiYzE0MDI4NWZjMzkzZTQ5YWFlNzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.gMawtDjWiqaJpll4bGvP4od9stQcAhnKVO5-p1JEh5Q)
3.12.10
I also ran the notebook extension unit tests locally and confirmed that they're still passing. The extension unit tests aren't currently running in the pipelines, so that's what I'll look into enabling again next...