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

(#1485) Display package source during install/upgrade #3267

Merged

Conversation

TheCakeIsNaOH
Copy link
Member

@TheCakeIsNaOH TheCakeIsNaOH commented Jul 15, 2023

Description Of Changes

This logs the package source uri to info before downloading nupkgs
during both install and upgrade. Additionally, it debug logs the
download URI that the nupkg available at.

The information outputs for both individual package installs/upgrades,
and for dependencies that get installed/upgraded by their parent
package. This information is especially useful when multiple sources
are in play, so the user can determine where individual packages
are coming from.

Motivation and Context

See #1485

Now that Chocolatey CLI is using NuGet.Client libraries, this was trivial to implement.

Testing

See added NUnit tests for installing/upgrading from a local source.

For remote sources:

  1. Run .\choco.exe install wget --force --skip-powershell --debug
  2. Validate that the previous command logged the source and download url
  3. Run .\choco.exe upgrade wget --force --skip-powershell --debug
  4. Validate that the previous command logged the source and download url
  5. Run .\choco.exe install dotnet-all --force --skip-powershell --debug
  6. Validate that the previous command logged the source and download url for each downloaded package

Operating Systems Testing

  • Windows 10 22H2

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

Fixes #1485

@TheCakeIsNaOH TheCakeIsNaOH force-pushed the gh1485-install-source-display branch from 410f98d to 9a36b40 Compare January 9, 2024 22:21
This logs the package source uri to info before downloading nupkgs
during both install and upgrade. Additionally, it debug logs the
download URI that the nupkg available at.

The information outputs for both individual package installs/upgrades,
and for dependencies that get installed/upgraded by their parent
package. This information is especially useful when multiple sources
are in play, so the user can determine where individual packages
are coming from.
@gep13 gep13 force-pushed the gh1485-install-source-display branch from 9a36b40 to 726c01e Compare April 24, 2024 12:12
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
Copy link
Member

gep13 commented Apr 24, 2024

@TheCakeIsNaOH said...
Now that Chocolatey CLI is using NuGet.Client libraries, this was trivial to implement.

This is very true! Appreciate you taking the time to get this done!

@gep13
Copy link
Member

gep13 commented Apr 24, 2024

Not sure why the CLA is showing as having not been signed, but I know that it has been, so going to move forward with getting this merged.

image

@gep13 gep13 merged commit c632298 into chocolatey:develop Apr 24, 2024
5 checks passed
@TheCakeIsNaOH TheCakeIsNaOH deleted the gh1485-install-source-display branch April 26, 2024 03: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
2 participants