Skip to content

[Bug]: Windows install script is still flaky #448

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

Open
ayewo opened this issue Jul 31, 2023 · 0 comments
Open

[Bug]: Windows install script is still flaky #448

ayewo opened this issue Jul 31, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@ayewo
Copy link

ayewo commented Jul 31, 2023

Describe the bug

Wanted to investigate the perf issues on Windows in #388 and #401 but had a bit of trouble getting the installer script to work on the Windows VM I used.

On the Windows Server 2019 VM I used for testing, the detection of a valid installation of python appeared to be a bit flaky.
In my testing:

Python

a. If you run the script for the first time, the check for a supported version of python will fail, even if a supported version was already installed.
b. If you re-run the script a second time, within the same PowerShell console, the check will pass and proceed to the check for the next dependency (i.e. git.)
c. If you open a fresh PowerShell console to re-run the script, it will fail to correctly detect that a supported version of python is installed (like in #a above).

Git

The detection of a valid installation of git was causing the install script to fail so I made some changes to make it a bit more robust.

The git install command somehow doesn't update the %PATH% to include the binaries for git and bash which is why the presence check always failed, even after the script downloaded & installed git.
To fix the issue: I refactored the code to explicitly add the path to those binaries to the USER and SYSTEM PATH.

OpenAdapt

I also made a few tentative changes (as per my proposal in #447):

  • I moved the installation folder for OpenAdapt from the root drive at C:\OpenAdaptSetup\OpenAdapt to the user's home directory (at C:\Users\$USER\OpenAdapt) and added a check to delete it if it already exists. Right now when the script is re-run it will fail if the C:\OpenAdaptSetup\OpenAdapt folder exists and is non-empty.
  • I also renamed a handful of variables to make them a bit clearer.

To Reproduce

See above.

@ayewo ayewo added the bug Something isn't working label Jul 31, 2023
ayewo added a commit to ayewo/OpenAdapt that referenced this issue Jul 31, 2023
…eliable; minor refactoring for vars and function calls (OpenAdaptAI#448)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant