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

Add our own versions cache #1220

Merged
merged 2 commits into from
Jan 6, 2020
Merged

Add our own versions cache #1220

merged 2 commits into from
Jan 6, 2020

Conversation

fthomas
Copy link
Member

@fthomas fthomas commented Jan 6, 2020

The same rationale as for #1218 applies here too. Our own versions cache
allows for a more fine-grained control of which calls to Coursier (and
therefore potentially to Maven Central) are rate limited. Since we are
using the same TTL for our cache and for Coursier's cache, our cache
should be as fresh as Coursier's.

The previous rate limiting could result in limited calls that hit
Coursier's cache and unlimited calls that missed Coursier's cache.
This won't happen with this implementation. So we're faster now and
reduce the chance of being blacklisted by Maven Central again.

The same rationale as for #1218 applies here too. Our own versions cache
allows for a more fine-grained control of which calls to Coursier (and
therefore potentially to Maven Central) are rate limited. Since we are
using the same TTL for our cache and for Coursier's cache, our cache
should be as fresh as Coursier's.

The previous rate limiting could result in limited calls that hit
Coursier's cache and unlimited calls that missed Coursier's cache.
This won't happen with this implementation. So we're faster now and
reduce the chance of being blacklisted by Maven Central again.
@fthomas fthomas added this to the 0.6.0 milestone Jan 6, 2020
@fthomas fthomas added the enhancement New feature or request label Jan 6, 2020
@codecov
Copy link

codecov bot commented Jan 6, 2020

Codecov Report

Merging #1220 into master will increase coverage by 0.19%.
The diff coverage is 78.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1220      +/-   ##
==========================================
+ Coverage   68.84%   69.03%   +0.19%     
==========================================
  Files          96       97       +1     
  Lines        1438     1447       +9     
  Branches       35       39       +4     
==========================================
+ Hits          990      999       +9     
  Misses        448      448
Impacted Files Coverage Δ
.../scalasteward/core/persistence/KeyValueStore.scala 100% <ø> (ø) ⬆️
...a/org/scalasteward/core/coursier/CoursierAlg.scala 100% <ø> (ø) ⬆️
...la/org/scalasteward/core/application/Context.scala 0% <0%> (ø) ⬆️
...scala/org/scalasteward/core/util/RateLimiter.scala 0% <0%> (ø) ⬆️
...scala/org/scalasteward/core/update/UpdateAlg.scala 60% <100%> (-1.91%) ⬇️
...lasteward/core/persistence/JsonKeyValueStore.scala 100% <100%> (+10%) ⬆️
...ain/scala/org/scalasteward/core/data/Version.scala 94.36% <100%> (+0.08%) ⬆️
...rg/scalasteward/core/update/VersionsCacheAlg.scala 85.71% <85.71%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e8e81c5...f995d52. Read the comment docs.

@fthomas fthomas merged commit d154907 into master Jan 6, 2020
@fthomas fthomas deleted the topic/versions-cache branch January 6, 2020 08:38
fthomas added a commit that referenced this pull request Oct 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant