-
Notifications
You must be signed in to change notification settings - Fork 909
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
Prevent dependency resolution from unexpectedly downgrading packages #3461
Comments
I have the same bug on servers with a newly upgraded chocolatey client. # Choco Search cannot find the newest version
PS D:\> choco search vscode
Chocolatey v2.3.0
vscode 1.86.2
1 packages found.
# Pre Package found
PS D:\> choco search vscode -pre
Chocolatey v2.3.0
vscode 1.90.0
# Choco search
PS D:\> choco search vscode -all
Chocolatey v2.3.0
vscode 1.90.0
vscode 1.89.1
vscode 1.89.0
vscode 1.88.1
vscode 1.88.0
vscode 1.87.2
vscode 1.87.0
vscode 1.86.2
vscode 1.86.1
vscode 1.86.0
vscode 1.85.2
vscode 1.85.1
vscode 1.85.0
vscode 1.84.2
vscode 1.84.0
vscode 1.83.1
vscode 1.83.0
vscode 1.81.1
vscode 1.81.0
vscode 1.80.2
vscode 1.80.1
vscode 1.80.0
vscode 1.79.2
vscode 1.79.0
vscode 1.78.2
vscode 1.78.0
vscode 1.77.3
vscode 1.77.1
vscode 1.77.0
vscode 1.76.2
vscode 1.76.1
vscode 1.76.0
vscode 1.75.1
vscode 1.75.0
vscode 1.74.3
vscode 1.73.1 |
So, it looks like there are a few things going on here, and I'm going to see if I can lay them out before asking for some more files. @Terrance, in looking at the logs, it looks like you actually started at 1.89.0 of both vscode and vscode.install. It then detected 1.89.1 of vscode, and installed that version for both vscode and vscode.install. It then went looking for an upgrade to vscode.install, and noted that it had an upgrade. It then determined that the dependency resolution for vscode couldn't be resolved for 1.90.0, so it asked Chocolatey Community Repository for the verisons of vscode that were available. For whatever reason, Chocolatey Community Repository or Chocolatey CLI did not provide back 1.89.1 as an available version, so Chocolatey CLI determined that it needed to install version 1.89.0, and it ensured both vscode and vscode.install were available at that version, and installed it. This is not the expected behaviour for any part of this. I am able to readily reproduce the behaviour where an install that resolves a dependency to a downgrade version will downgrade to that version, which it should not do. The part I'm not able to readily reproduce is where it seems that Chocolatey Community Repository is providing different results. This part feels like a caching issue, and may be unable to be reproduced at the moment, but if we could try: Going off of the output that @Outek provided which appears to possibly show the discrepency in what's reported, could you run the following commands as administrator (this will rule out any user vs system ChocolateyHttpCache differences and create a zip file of the contents of choco cache remove
choco search vscode --exact
choco cache remove
choco search vscode --exact --pre
choco cache remove
choco search vscode --exact --all Hoping that there is an output of different versions that could help us identify the source of the issue. |
Yes, I believe I originally started at 1.89.0, but the downgrade was more readily reproducible at the time by forcing an install of 1.89.1 first, then requesting an upgrade (which would result in a downgrade to 1.89.0). I suspect it may be too late to get some meaningful output (I have since updated to 1.91.0 which is the current stable version, and there are no pending releases in Chocolatey), but here you go:
|
Report package result error instead of throwing exception. a Continue on downgrade attempt.
Report package result error instead of throwing exception. a Continue on downgrade attempt.
This commit adds pester tests and files required for the pester tests. The tests include ensuring that installing a package that contains a dependency tree that spans lots of versions does not take unnecessarily long. As well as duplicating an integration test into the pester tests to provide us with some belt and suspenders to help us catch issues at both the integration and the pester test levels.
This commit adds pester tests and files required for the pester tests. The tests include ensuring that installing a package that contains a dependency tree that spans lots of versions does not take unnecessarily long. As well as duplicating an integration test into the pester tests to provide us with some belt and suspenders to help us catch issues at both the integration and the pester test levels.
This commit adds pester tests and files required for the pester tests. The tests include ensuring that installing a package that contains a dependency tree that spans lots of versions does not take unnecessarily long. As well as duplicating an integration test into the pester tests to provide us with some belt and suspenders to help us catch issues at both the integration and the pester test levels.
Some of these package already existed on our internal repository, while some of them have been added for the tests being added.
We have added some tests for the install all command. This adds a new package source to the testing environment so that we can run the tests locally and in Test Kitchen.
Some of these package already existed on our internal repository, while some of them have been added for the tests being added.
We have added some tests for the install all command. This adds a new package source to the testing environment so that we can run the tests locally and in Test Kitchen.
Add a number of tests for dependency scenarios where we did not have tests before.
Some of these package already existed on our internal repository, while some of them have been added for the tests being added.
We have added some tests for the install all command. This adds a new package source to the testing environment so that we can run the tests locally and in Test Kitchen.
Add a number of tests for dependency scenarios where we did not have tests before.
We have added some tests for the install all command. This adds a new package source to the testing environment so that we can run the tests locally and in Test Kitchen.
Add a number of tests for dependency scenarios where we did not have tests before.
Address review comments by using full version string for PackageResults, and use case insensitive compares when determining if a package has dependencies that failed to install.
Some of these package already existed on our internal repository, while some of them have been added for the tests being added.
We have added some tests for the install all command. This adds a new package source to the testing environment so that we can run the tests locally and in Test Kitchen.
Add a number of tests for dependency scenarios where we did not have tests before.
Address review comments by using full version string for PackageResults, and use case insensitive compares when determining if a package has dependencies that failed to install.
🎉 This issue has been resolved in version 2.4.0 🎉 The release is available on: |
Checklist
What You Are Seeing?
The latest version of
vscode.install
is 1.90.0, butvscode
is still on 1.89.1 as the 1.90.0 release is still in moderation. This seems to cause weird behaviour when upgrading, as 1.89.1 is installed first, then 1.90.0 is attempted and fails, and at that point 1.89.0 rather than 1.89.1 is chosen instead. This means I was actually downgraded as a result of the "upgrade", having originally started on 1.89.1.What is Expected?
I should be kept on version 1.89.1 as the latest release with matching meta/install packages.
How Did You Get This To Happen?
choco upgrade all
, having started onvscode
1.89.1 andvscode.install
1.89.1, resulted invscode
1.89.0 andvscode.install
1.89.0. Subsequent upgrade attempts stay at these version.System Details
Installed Packages
Output Log
Additional Context
There seems to be two issues here: the packages themselves being mismatched, but also the downgrade from the latest meta package (for which the install package is available) to the one before.
The text was updated successfully, but these errors were encountered: