chocolatey / ChocolateyGUI

A delicious GUI for Chocolatey
https://docs.chocolatey.org/en-us/chocolatey-gui/
Apache License 2.0
1.61k stars 248 forks source link

(#1014) Add support for ignoring cached HTTP items #1015

Closed AdmiringWorm closed 1 year ago

AdmiringWorm commented 1 year ago

Description Of Changes

THe changes in this pull request updates outdated and advanced installation to have an option to be able to skip any cached HTTP items that Chocolatey CLI has created. THe automatic outdated calls will still use the normal cached items as it is used with Chocolatey CLI, but if the the user forced the check of outdated it will bypass any cached items already created.

The advanced installation dialog has a new option under advanced options that can toggle on or off the ability to ignore cached items, that can be useful when targeting sources that allows the same version to be replaced.

Motivation and Context

To give similar ability in Chocolatey GUI as with Chocolatey CLI.

Testing

  1. Build a debug version of Chocolatey CLI from latest develop branch.
  2. Open up fiddler and clear out all http caches from Chocolatey CLI.
  3. Open up Chocolatey GUI (ensure you have packages installed, and enabled automatic outdated check, restart Chocolatey GUI if changes are needed).
  4. Go to settings and click the button for clearing out Outdated packages (this only clears out Chocolatey GUI packages).
  5. Close and re-open Chocolatey GUI
  6. Wait until outdated check is complete
  7. Verify no new outgoing query was sent (other than to main entry point of v2/v3 feeds).
  8. Click button to force an outdated check to happen.
  9. Verify queries are sent to get outdated packages.
  10. Go to CCR feed and search for windirstat
  11. Install and uninstall package (take a note of the Query URL used to search for the version, not the actual download URL).
  12. Go to windirstat again and open details page, then press Install Advance
  13. Install the package again and verify the previously noted Query URL is not being used (only the download of the package).
  14. Uninstall the package and do step number 12 again
  15. Expand the the Advanced Option expandable group
  16. Enable the option called Ignore HTTP Cache
  17. Install the package again
  18. Verify the same query used in step 11 was issued again.

Backwards compatibility check

  1. Build a debug version of the Chocolatey CLI from the tag 2.1.0-alpha-20230614
  2. Open up Chocolatey GUI and search for windirstat (if package is installed, uninstall the package first)
  3. Open up details page and press Install Advanced.
  4. Expand the section Advanced Options
  5. Ensure that the option Ignore HTTP Cache is not shown.

Operating Systems Testing

Change Types Made

Change Checklist

Related Issue

Fixes #1014

gep13 commented 1 year ago

@AdmiringWorm thanks for getting this fixed!