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

feat(http): Switch to pluggable HTTP cache implementation #27966

Merged
merged 11 commits into from Mar 19, 2024

Conversation

zharinov
Copy link
Collaborator

@zharinov zharinov commented Mar 16, 2024

Changes

  • Create cacheProvider option for Http class
  • Implement CacheProvider interface for repository cache
    • Make sure older cache data is compatible with new code
  • Refactor Http request options type
  • Improve tests and coverage

This PR makes it possible to connect package cache with the HTTP caching capabilities.
For example, npm caching logic could be simplified.

Context

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@zharinov zharinov changed the title feat(http): Pluggable HTTP cache feat(http): Pluggable HTTP cache implementation Mar 16, 2024
lib/util/http/index.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

Can this be broken into smaller steps, or too hard?

@zharinov
Copy link
Collaborator Author

Yes, let's split

Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

superceeded 😉

@zharinov
Copy link
Collaborator Author

Not really, now we have to switch to the new implementation. I would like to use this PR for this.

# Conflicts:
#	lib/util/http/cache/abstract-http-cache-provider.ts
#	lib/util/http/cache/schema.ts
#	lib/util/http/index.ts
#	lib/util/http/types.ts
@zharinov zharinov marked this pull request as ready for review March 19, 2024 15:25
@zharinov zharinov changed the title feat(http): Pluggable HTTP cache implementation feat(http): Switch to pluggable HTTP cache implementation Mar 19, 2024
@rarkins rarkins added this pull request to the merge queue Mar 19, 2024
Merged via the queue into renovatebot:main with commit 8596967 Mar 19, 2024
37 checks passed
@rarkins rarkins deleted the feat/pluggable-http-cache branch March 19, 2024 16:41
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 37.258.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants