Skip to content

Remove accidental caching from repo list and other commands - #5943

Merged
mislav merged 1 commit into
trunkfrom
uncache-http-client
Jul 14, 2022
Merged

Remove accidental caching from repo list and other commands#5943
mislav merged 1 commit into
trunkfrom
uncache-http-client

Conversation

@mislav

@mislav mislav commented Jul 14, 2022

Copy link
Copy Markdown
Contributor

Any gh command that has invoked NewCachedHTTPClient has also inadvertently enabled caching for the original http.Client due to the nature that NewCachedHTTPClient mutates the original argument passed. As a consequence, running the same command repeatedly would produce the same stale result.

Commands that were accidentally cached:

  • repo list/repo edit
  • pr checkout/close/comment/diff/edit/merge/ready/reopen/review/view
  • issue create/pr create
  • status

Fixes #5940, fixes #5938
Followup to #5614

Any gh command that has invoked NewCachedHTTPClient has also
inadvertently enabled caching for the original `http.Client` due to the
nature that NewCachedHTTPClient mutates the original argument passed.
@mislav
mislav requested a review from a team as a code owner July 14, 2022 17:12
@mislav
mislav requested review from vilmibm and removed request for a team July 14, 2022 17:12
@mislav
mislav merged commit 25756aa into trunk Jul 14, 2022
@mislav
mislav deleted the uncache-http-client branch July 14, 2022 17:17
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.

'gh repo list' not updating gh repo list --json name

2 participants