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

[SDK Automation] JS automation script doesn't need to install 'node' repeatedly #7967

Closed
Tracked by #8039
raych1 opened this issue Mar 28, 2024 · 1 comment · Fixed by Azure/azure-sdk-for-js#30607
Assignees

Comments

@raych1
Copy link
Member

raych1 commented Mar 28, 2024

Node 18 has been installed in the spec PR pipeline and each SDK language automation script should not need to install it.
The following is the pipeline log from the spec PR:

01:18:47.322 cmdout 	[automation_init.sh] => nvm is already installed in /home/cloudtest/.nvm, trying to update using git
01:18:47.917 cmdout 	[automation_init.sh] 
=> => Compressing and cleaning up git repository
01:18:47.923 cmdout 	[automation_init.sh] => Appending nvm source string to /home/cloudtest/.bashrc
01:18:47.923 cmdout 	[automation_init.sh] => Appending bash_completion source string to /home/cloudtest/.bashrc
01:18:49.130 cmdout 	[automation_init.sh] => You currently have modules installed globally with `npm`. These will no
01:18:49.130 cmdout 	[automation_init.sh] => longer be linked to the active version of Node when you install a new node
01:18:49.130 cmdout 	[automation_init.sh] => with `nvm`; and they may (depending on how you construct your `$PATH`)
01:18:49.130 cmdout 	[automation_init.sh] => override the binaries of modules installed with `nvm`:
01:18:49.131 cmdout 	[automation_init.sh] /opt/hostedtoolcache/node/18.19.1/x64/lib
01:18:49.131 cmdout 	[automation_init.sh] +-- corepack@0.22.0
01:18:49.131 cmdout 	[automation_init.sh] => If you wish to uninstall them at a later point (or re-install them under your
01:18:49.131 cmdout 	[automation_init.sh] => `nvm` Nodes), you can remove them from the system Node as follows:
01:18:49.131 cmdout 	[automation_init.sh]      $ nvm use system
01:18:49.131 cmdout 	[automation_init.sh]      $ npm uninstall -g a_module
01:18:49.131 cmdout 	[automation_init.sh] => Close and reopen your terminal to start using nvm or run the following to use it now:
01:18:49.131 cmdout 	[automation_init.sh] export NVM_DIR="$HOME/.nvm"
01:18:49.132 cmdout 	[automation_init.sh] [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
01:18:49.132 cmdout 	[automation_init.sh] [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
01:18:49.385 cmdout 	[automation_init.sh] Downloading and installing node v18.15.0...
01:18:49.457 cmderr 	[automation_init.sh] Downloading https://nodejs.org/dist/v18.15.0/node-v18.15.0-linux-x64.tar.xz...
01:18:49.584 cmderr 	[automation_init.sh] Computing checksum with sha256sum
01:18:49.677 cmderr 	[automation_init.sh] Checksums matched!
01:18:51.625 cmdout 	[automation_init.sh] Now using node v18.15.0 (npm v9.5.0)
01:18:51.725 cmdout 	[automation_init.sh] default -> node (-> v18.15.0 *)
01:18:57.991 cmderr 	[automation_init.sh]  WARN deprecated readdir-scoped-modules@1.1.0: This functionality has been moved to @npmcli/fs
01:18:58.034 cmderr 	[automation_init.sh]  deprecated debuglog@1.0.1: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
01:18:59.446 cmderr 	[automation_init.sh] npm WARN deprecated read-package-tree@5.1.6: The functionality that this package provided is now in @npmcli/arborist
01:19:00.081 cmderr 	[automation_init.sh]  @azure/msal-node@1.18.4: A newer major version of this library is available. Please upgrade to the latest available version.
01:19:01.493 cmdout 	[automation_init.sh] added 564 packages in 9s
01:19:01.493 cmdout 	[automation_init.sh] 75 packages are looking for funding
01:19:01.493 cmdout 	[automation_init.sh]   run `npm fund` for details
01:19:01.494 cmderr 	[automation_init.sh]  
01:19:01.494 cmderr 	[automation_init.sh] npm notice New major version of npm available! 9.5.0 -> 10.5.0
01:19:01.494 cmderr 	[automation_init.sh] npm notice Changelog: <[https://github.com/npm/cli/releases/tag/v10.5.0>](https://github.com/npm/cli/releases/tag/v10.5.0%3E)
01:19:01.494 cmderr 	[automation_init.sh] npm notice Run `npm install -g npm@10.5.0` to update!
01:19:01.494 cmderr 	[automation_init.sh] npm notice 
01:19:06.187 cmderr 	[automation_init.sh]  WARN deprecated @azure/storage-blob@10.5.0: This version has been deprecated, please upgrade to the version tagged as latest
01:19:06.487 cmdout 	[automation_init.sh] added 267 packages in 5s
01:19:06.487 cmdout 	[automation_init.sh] 21 packages are looking for funding
01:19:06.487 cmdout 	[automation_init.sh]   run `npm fund` for details
01:19:06.501 info 	Script return with result [succeeded] code [0] signal [null] cwd [azure-sdk-for-js]: sh .scripts/automation_init.sh
01:19:06.501 endsection 	Call initScript

@MaryGao

@wanlwanl
Copy link
Member

wanlwanl commented Aug 1, 2024

@kazrael2119 , could you handle this?
It should be simple: remove the lines selected, and then test
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants