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

(#508) Fix v3 feeds mixed with v2 feeds not finding packages #3159

Merged
merged 1 commit into from
May 16, 2023

Conversation

AdmiringWorm
Copy link
Member

@AdmiringWorm AdmiringWorm commented May 15, 2023

Description Of Changes

This pull request updates the FindPackage method we use when installing
and acquiring information about a package to properly handle feeds
when there is a mix of feeds that support v2 odata queries, and when
there is one or more feeds that only support v3 feeds without the fallback
to v2 odata APIs.

Motivation and Context

Even when a user uses a mixture of v2 odata queries, v3 with odata v2 support and v3 only feeds, we should still be able to get the information about a specific package and be able to install/upgrade this package.

Testing

  1. Configure Chocolatey CLI with Chocolatey Community Repository feed, and an internal v3 only feed (will send message internally about the feed).
  2. Run choco info isdependency while having both feeds configured, or passing in both sources using --source
  3. Verify no error was returned, and the information about the package is shown.
  4. Run choco install isdependency while having both feeds configured, or passing in both sources using --source
  5. Verify no error was returned, and the package installed successfully.

Operating Systems Testing

  • Windows 10

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v2 compatibility checked?

Related Issue

This commit updates the FindPackage method we use when installing
and acquiring information about a package to properly handle feeds
when there is a mix of feeds that support v2 odata queries, and when
there is one or more feeds that only support v3 feeds without the fallback
to v2 odata APIs.
@AdmiringWorm AdmiringWorm self-assigned this May 15, 2023
@AdmiringWorm AdmiringWorm requested a review from gep13 May 15, 2023 15:56
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gep13 gep13 merged commit 238bd2e into chocolatey:release/2.0.0 May 16, 2023
@gep13
Copy link
Member

gep13 commented May 16, 2023

@AdmiringWorm thank you for getting this fixed up! I have taken this for a spin, and all seems good to me, and the automated testing is happy as well.

@AdmiringWorm AdmiringWorm deleted the multi-feed-list-fix branch May 19, 2023 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants