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

(#3165) Update count method to support nuget service #3166

Merged
merged 1 commit into from
May 24, 2023

Conversation

AdmiringWorm
Copy link
Member

@AdmiringWorm AdmiringWorm commented May 24, 2023

Description Of Changes

The changes in this pull request reintroduces the ability to get the amount of packages available on remote and local nuget sources, which had been overlooked during a previous refactor.

Motivation and Context

Without the changes made in this PR it will cause Chocolatey GUI to not function properly when it tries to get packages from remote and local sources configured in chocolatey.config.
When this is attempted Chocolatey GUI would crash with an exception that a normal source runner could not be found (due to NuGetService not being seen as a source runner anymore).

Testing

  1. Clone the changes in this PR.
  2. Clone the latest tag of Chocolatey GUI.
  3. Run Get-ChocoUpdatedDebugVersion.ps1 -ChocoSourceLocation "<PATH_TO_CLONED_PR_CHANGES>".
  4. Build Chocolatey GUI.
  5. Run Chocolatey GUI.
  6. Navigate to one of the remote or local sources you have configured.
  7. Verify packages show up as expected and no exception is thrown.

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 Count method that is used to get
the amount of packages available on normal and alternative
sources to include support for the nuget service.

During a previous refactor we had removed the support of
acquiring packages on normal sources by a mistake, which
causes an issue with Chocolatey GUI to fail due to no available
source runner can be found when dealing with counting packages.
This was fixed by including an explicit call to the nuget service when
norrmal sources are being used.
@AdmiringWorm AdmiringWorm force-pushed the count-nuget-service branch from a622260 to 159ee69 Compare May 24, 2023 10:08
@AdmiringWorm AdmiringWorm changed the title (maint) Update count method to support nuget service (#3165) Update count method to support nuget service May 24, 2023
@AdmiringWorm AdmiringWorm marked this pull request as ready for review May 24, 2023 10:09
@AdmiringWorm AdmiringWorm requested a review from corbob May 24, 2023 10:09
Copy link
Member

@corbob corbob left a comment

Choose a reason for hiding this comment

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

LGTM

@corbob corbob merged commit 5204265 into chocolatey:master May 24, 2023
@corbob
Copy link
Member

corbob commented May 24, 2023

Thanks for getting this fixed up @AdmiringWorm 😁

@AdmiringWorm AdmiringWorm deleted the count-nuget-service branch May 24, 2023 16:56
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.

3 participants