Skip to content

build(deps): Bump caffeine to 3.2.4 and errorprone to 2.49.0#19527

Open
amaechler wants to merge 1 commit into
apache:masterfrom
amaechler:bump-caffeine-3.2-errorprone-2.49
Open

build(deps): Bump caffeine to 3.2.4 and errorprone to 2.49.0#19527
amaechler wants to merge 1 commit into
apache:masterfrom
amaechler:bump-caffeine-3.2-errorprone-2.49

Conversation

@amaechler
Copy link
Copy Markdown
Contributor

@amaechler amaechler commented May 28, 2026

Description

This PR bumps two dependencies, caffeine (2.9.3 to 3.2.4), and errorprone (2.41.0 to 2.49.0). They update goes together because caffeine pulls in error_prone_annotations transitively, which violates requireUpperBoundDeps without the errorprone bump.

Rewrote CaffeineCacheTest.testSizeEviction

The old test assumed that when the cache exceeded its size limit, the first-inserted entry was always the one evicted, but caffeine 3's eviction policy can keep either entry based on access frequency. The rewrite asserts only that eviction happened and the cache stayed within its size bound, not which specific key was kept.


This PR has:

  • been self-reviewed.
  • a release note entry in the PR description.
  • added or updated version, license, or notice information in licenses.yaml
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.

@amaechler amaechler changed the title Bump caffeine to 3.2.4 and errorprone to 2.49.0 build(deps): Bump caffeine to 3.2.4 and errorprone to 2.49.0 May 28, 2026
Caffeine 3 raised the Java baseline to 11, tightened the AsyncCache
surface, and replaced size-LRU eviction with W-TinyLFU with explicit
admission control. The Caffeine APIs Druid uses (Cache, Caffeine
builder, Weigher, CacheStats) are stable across the transition.

Errorprone 2.49.0 is required because caffeine 3.2.4 pulls
error_prone_annotations 2.49.0 transitively, which violates the
requireUpperBoundDeps enforcer rule without the bump.

CaffeineCacheTest.testSizeEviction is rewritten for W-TinyLFU: the old
test pre-read key1 multiple times before putting key2, biasing the
admission policy to keep key1 and reject val2, so the assertion that
key1 was evicted no longer holds. The rewrite avoids the pre-reads
and asserts only that eviction happened and the cache stayed under
bound, mirroring caffeine's own EvictionTest patterns.

Also adds the previously-missing license entry for org.jspecify:jspecify
1.0.0 in extensions-core/kubernetes-extensions, which the
check-licenses dependency report flags. This was missing pre-bump and
is unrelated to caffeine/errorprone, but the CI license check fails
without it, so it is included here to keep the PR green.
@amaechler amaechler force-pushed the bump-caffeine-3.2-errorprone-2.49 branch from a02af28 to 3d51036 Compare May 28, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant