-
Notifications
You must be signed in to change notification settings - Fork 9
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
"Latest" install folder isn't always the "latest" #46
Comments
Thanks for reporting this, @marcelais. Unfortunately, at the moment we don't have any great ideas for a solution that don't involve teaching the installation scripts how to understand SemVer, which we aren't keen on at the moment. The most likely path forward will be for us to pursue proper package management for the various supported platforms (e.g. For now, I'd like to acknowledge this issue by leaving it open and invite any suggestions for a good cross-platform solution. |
I think this bug is more important if we want to enable other applications to be able to install the CLI using the scripts. I was just thinking through using the scripts in a library wrapper, and we wouldn't want App 1 to install and use 0.3.0, another app installs 0.2.0 and reset latest back, at least internally this could confuse things. |
@marcelais , @AzureAD/security-experience , @reillysiemens and I have talked through how to change the installation to avoid thrashing on the version We think we want to achieve
Versioned installs only (no more
|
I would prefer that an additional option be required to downgrade my path. Especially with as many things as may bundle an call to the installer, I really don't want a simple mistake by one author to downgrade everyone. It's really easy to do too: There could be scenarios where downgrading the version on the path is correct, but I would prefer it require explicit request. |
@ThomasFWise: From the installer script's perspective, it's not aware that the operation is a downgrade or an upgrade. It's installing whatever version is requested. That's part of the
goal that @kyle-rader mentioned. Those comparisons are non-trivial, especially on Unix platforms where there isn't built-in JSON support for interacting with the GitHub API. The installer actually doesn't even avoid installation if version If what you're suggesting is that we do something like add a Instead, with a The danger of downgrading oneself in a multi-version should be addressed here by asserting control over the The proposal here is probably best summarized as
There's a line between being an installer script and a package manager. I'd prefer to stay as much towards the installer script side of that balance. The goal is to get the bits to disk (and maybe make them quickly executable), not to manage versions. |
You say append, but the Monorepo example says prepend. If you are really appending to the path, then I would be ok with that. Prepend has the problems of potentially silently changing what version someone is using though, so I would be hesitant of that. I'm not sure you can really say there is a monorepo/non-monorepo divide though. The PATH is not separate, so if I'm working on a project that uses this public tool in a non-monorepo configuration it has the potential to mess up the PATH for my other projects, or even my monorepo configured project. |
The monorepo/non-monorepo divide is not a great way to talk about this, I agree. I was really just trying to describe a scenario where multiple versions of this tool are installed alongside one another. You're 💯% correct that there's only one Both append and prepend are correct in this context, @ThomasFWise. The installation script will only ever append. Because we append, any users managing their own environment are free to prepend, secure in the knowledge that their choice will always take precedence. Any external tooling (initialization scripts, etc.) can temporarily override the user's globally defined |
One reason we used 'latest' was to avoid having to know the exact install path to AzureAuth. If the install path was predictable, we could get away with not using latest at all but using the version that was installed. One challenge is that when you ask to install 'v0.3.0' the actual install directory is 'azureauth-v0.3.0-win10-x64' (on my Windows machine) so the installer would have to "know" that full extension. If this is a cross-platform script, then it would have to know all of the various platform flavours. If the installer were to install to the folder that was named exactly the same as the version that was passed into the script, that would make predicting the path easier and also allow the script to more reliably determine if AzureAuth is already installed before calling the installer. A similar option would be to have the install path configuration option be the exact path that we install to instead of a "root" directory that you create a versioned directory underneath. [Essentially, letting the calling script manage the version directory structure.] |
@ThomasFWise are you satisfied by Tucker's last reply? I think we acknowledge the risks, that a user could install a new version, it updates their PATH, but in our primary monorepo scenario so far, our environment is not broken by this since it does/will prepend a specific version. |
@marcelais: Your suggestion is completely reasonable (and preferable). In fact, when we started out, we used that approach and just named the directory according to its version. Unfortunately, in #49 we undid that as a hotfix for a bug that later turned out to be the result of file lock timing with DLLs for a running Unfortunately, it's a backwards incompatible change. However, because we've only published 4 versions of So, if we accept that, the TL;DR on the proposed changes is:
How does that all sound, @kyle-rader, @marcelais, @ThomasFWise? 🤔 |
Yep, that sounds good. |
That sounds reasonable. |
Closed with #120 - no more latest directory. |
(All version numbers are examples.) If you install v0.2.0 of the AuthTool and then subsequently install v0.1.0, the 'latest' folder will point at the v0.1.0 version and not the v0.2.0 version.
Using the latest folder is great for not having to update config files when a new version is released, but if that folder can "regress" to an easlier version, it's usefullness is more limited.
The text was updated successfully, but these errors were encountered: