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

Provide ability to use option for Chocolatey CLI commands to skip cached HTTP query results #1014

Closed
4 tasks done
gep13 opened this issue Jun 14, 2023 · 1 comment · Fixed by #1015
Closed
4 tasks done
Assignees
Labels
5 - Released The issue has been resolved, and released to the public for consumption Improvement Issues that enhances existing functionality, or adds new features
Milestone

Comments

@gep13
Copy link
Member

gep13 commented Jun 14, 2023

Checklist

  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my problem.
  • I have verified this is not an issue for a specific package.
  • I have verified this issue is not security related.

What You Are Seeing?

In Chocolatey CLI 2.0.0, we introduced the NuGet.Client libraries, which by default cache a number of HTTP queries, so that they can be re-used when required. This was further extended in the 2.1.0-alpha's of Chocolatey CLI, to address issues with performance problems. By introducing these caches, we need the ability to ignore the cached results for certain commands. In order to make use of the --ignore-http-cache option that was added in Chocolatey CLI, Chocolatey GUI needs to be extended to allow setting of this option through the Advanced Installation workflow.

What is Expected?

There are times when we want to make sure that we get the most recent results to outgoing queries, rather than previously cached queries. At the same time, we don't want to clear all the cache, so rather skip the cache for the current process. It should be possible to ignore the cache when doing the Advanced Installation workflow within Chocolatey GUI.

This should be done in a backwards-compatible way, so that it isn't necessary to bump to the latest Chocolatey CLI version when introducing this functionality. It should only be available when the installed version Chocolatey CLI is capable of performing this operation.

How Did You Get This To Happen?

There really aren't any steps to reproduce this problem, it is just a feature that needs to be implemented now that we are caching queries that are used within Chocolatey CLI.

System Details

  • Operating System: Windows 10
  • Windows PowerShell version: 5.1
  • Chocolatey CLI Version: 2.0.0
  • Chocolatey Licensed Extension version: N/A
  • Chocolatey License type: Open Source
  • Terminal/Emulator: Windows PowerShell

Installed Packages

N/A

Output Log

N/A

Additional Context

This is related to this issue here: chocolatey/choco#3193

@gep13 gep13 added Improvement Issues that enhances existing functionality, or adds new features 0 - Backlog Issue is accepted, but is not ready to be worked on or not in current sprint labels Jun 14, 2023
@gep13 gep13 added this to the 2.1.0 milestone Jun 14, 2023
@AdmiringWorm AdmiringWorm added 2 - Working A user or team member has started working on the issue and removed 0 - Backlog Issue is accepted, but is not ready to be worked on or not in current sprint labels Jun 14, 2023
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jun 14, 2023
This changes how the outdated command works.
When the user forces an outdated check to happen it will
bypass any cached http resources that Chocolatey CLI has
created.

This allows a user to get the absolute latest information even
when the automatic outdated check does not update outside
of cached items until they have expired.
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jun 14, 2023
This adds a new option to the advanced installation dialog
to be able to ignore any cached http resources that Chocolatey
CLI has cached. This can be useful for sources that allows an existing
version on the source can be replace, and then allow Chocolatey GUI
to download the absolute latest version of the package.
@AdmiringWorm AdmiringWorm added 3 - Review Code has been added, and is available for review as a pull request and removed 2 - Working A user or team member has started working on the issue labels Jun 14, 2023
AdmiringWorm added a commit to AdmiringWorm/ChocolateyGUI that referenced this issue Jun 16, 2023
This adds a new option to the advanced installation dialog
to be able to ignore any cached http resources that Chocolatey
CLI has cached. This can be useful for sources that allows an existing
version on the source can be replace, and then allow Chocolatey GUI
to download the absolute latest version of the package.
gep13 added a commit that referenced this issue Jun 19, 2023
…n-for-chocolatey

(#1014) Add support for ignoring cached HTTP items
@gep13 gep13 added 4 - Done Code has been added to the repository, and has been reviewed by a team member and removed 3 - Review Code has been added, and is available for review as a pull request labels Jun 19, 2023
@gep13 gep13 changed the title Provide option for Chocolatey CLI commands to skip cached query results Provide ability to use option for Chocolatey CLI commands to skip cached HTTP query results Jun 20, 2023
gep13 added a commit that referenced this issue Jun 29, 2023
* release/2.1.0:
  (maint) Update to latest version of chocolatey.lib
  (maint) Update GRM configuration file
  (maint) Remove version bump in nuspec file
  (build) Use latest Chocolatey.Cake.Recipe package
  (maint) Switch to Http for variable names
  (#1014) Add advanced option to ignore cached items
  (#1014) Ignore cached files on forced outdated check
  (build) Make build files consistent with others
  (#993) (fix) Correct syntax in KTS file
  (#993) Add TC schedule trigger
  (maint) Fix StyleCop warnings
  (#980) Use assembly location when debugging
  (maint) Update to released alpha package
  (#1003) Handle null keys during source translation
  (#1005) Normalize version numbers
  (maint) Add banned api analyzer
  (maint) Remove usage of obsolete methods
  (maint) Update to latest Chocolatey.Lib package
@gep13 gep13 added 5 - Released The issue has been resolved, and released to the public for consumption and removed 4 - Done Code has been added to the repository, and has been reviewed by a team member labels Jun 29, 2023
@choco-bot
Copy link

🎉 This issue has been resolved in version 2.1.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Released The issue has been resolved, and released to the public for consumption Improvement Issues that enhances existing functionality, or adds new features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants