-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
tools,win: refactor install_tools.bat #24113
Conversation
* Ask for credentials upfront * Try to `-DisableReboots`
I see 3 changes here:
So, points 1 and 3 are mutually exclusive, it doesn't make sense to move forward with both. I believe we should leave handling of credentials to Boxstarter, and not try to duplicate the feature here. I'd like to see if #23987 has a positive effect. If it doesn't help, disabling reboots is probably the best thing to try next. |
It would be great to to know if disabling reboots can never make the installation fail, or if there is some concrete scenario where it will make the installation fail for sure. (cc @gep13 @ferventcoder @jberezanski if you know, that info would be very welcome here. Thanks!) I've only seen the installation of updates fail, but Visual Studio still installed correctly and is usable. However, it fails in a way that makes it look like the whole installation failed, so it's sure to bring more confusion. |
AFAICT this is the recommended way to use boxstarter (Refs:https://boxstarter.org/InstallingPackages)
IMHO it reduces complexity (PS code in .ps1 file, instead of a mixed language .bat), but I agree it make most sense if we accept all 3 changes.
Hoping for feedback on this for boxstarter people
Will do. |
This makes a lot of sense for longer installations, if you need to leave the computer running overnight and don't know if it'll need to reboot or not. Using just
I don't see how that is a benefit. When asking in the command line, Boxstarter also uses a SecureString, which is arguably irrelevant because it can be decrypted so easily. To be clear, the two disadvantages I see in this are:
|
The short answer is, it depends :-( While on a fully patched machine, the three Chocolatey Packages that are choosing to install along with your node application might not need a reboot, on another machine, it might be required. There is no real way of knowing. Chocolatey, first and foremost is a application package manager. It will note that a reboot may be required to continue with further installations, but it won't do anything about it. As a result, attempting to install further packages, if a reboot is pending, might result in a failed package installation. That is where Boxstarter came from in the first place, to detect when a pending reboot is required, and to take the necessary steps to reboot the machine, and then continue with the installation. Disabling reboots might have the unfortunate side effect of failing the later packages, if an earlier one requires a reboot. I don't know what testing infrastructure, but do you test the installation of NodeJS on a suite of machines prior to releasing? |
@gep13, thank you for the explanation.
We don't test the installer, just the binary. I think we might need help from the MSVS team, to clarify what are the prerequisites for installing the MSVS Build Tools SKU... |
Those are some of the things that Boxstarter and Chocolatey are trying to cover for you, however, they can only do that if they are allowed to, i.e. by rebooting the machine when required. Otherwise, the application installations are going to fail. Based on that, and assuming that you are going to continue to shell out to Boxstarter and Chocolatey to perform these installations, I think you have to allow the reboots to happen. That is just my opinion though. |
Ack - 56e913c Although ATM we have to balance the chance of a failed dependency, with the chance of a degraded UX for the baseline installer ⚖️ |
I'll expand upon that. If Package A signals that a reboot is required, not only will Chocolatey not do anything about it (other than displaying a message to the user), Chocolatey will (unfortunately) immediately proceed to install packages dependent on Package A - whose installation may fail, depending on the exact packages in question and the state of the machine. For example, if the .NET Framework needs to be upgraded (as a dependency of another package) and its installation requires a reboot, applications depending on that .NET version may fail to run until the machine is rebooted. That is why, in order to achieve a more robust machine configuration experience, it is better to install known low-level dependencies (vcredist140, dotnetfx, Windows Updates - KB2919355 and others etc.) explicitly in separate choco invocations and allow the machine configuration framework (such as Boxstarter, PowerShell DSC or simply a custom script with autologon and runonce) to ensure the machine is rebooted if necessary in between. |
See also: chocolatey/choco#1038 |
-DisableReboots
Refs: #22645
Refs: #23838
Refs: nodejs/security-wg#439
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes