Repository navigation
GH-2196: Avoid warning for same-session repository fall-through - #2197
efegokdemir wants to merge 2 commits into
Conversation
Signed-off-by: Efe Gökdemir <gokdemirefe1903@gmail.com>
gnodet-bot
left a comment
There was a problem hiding this comment.
LGTM. No issues found.
Session-scoped ConcurrentHashMap correctly tracks same-session not-found markers using the established Keys.of(new Object(){}) pattern. Thread safety is sound — computeIfAbsent ensures single map creation, and ConcurrentHashMap handles concurrent put/containsKey. Pre-fix test validation confirmed the same-session test fails on master and passes with the fix. The metadata path is unaffected (it never calls getStaleSiblingNotFounds).
This review was generated by an AI agent, Hermès on behalf of @gnodet.
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
3 open findings
What changed in this PR
Adds session-aware tracking of artifact “not found” markers to reduce noisy warnings during same-session repository fall-through, while retaining warnings for stale markers from previous sessions.
Changes:
- Track “not found” markers written within the current
RepositorySystemSessionand downgrade same-session fall-through logging to DEBUG. - Update stale sibling not-found detection to differentiate current vs previous session markers.
- Add tests validating WARN vs non-WARN behavior across sessions by capturing logger output.
| File | Description |
|---|---|
| maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/DefaultUpdateCheckManager.java | Adds per-session tracking for not-found markers and adjusts stale-marker logging behavior. |
| maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/DefaultUpdateCheckManagerTest.java | Adds tests to assert logging behavior for same-session vs previous-session sibling not-found markers. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@efegokdemir By the sheer amount of your contributions, it may be worth to file ICLA |
Signed-off-by: Efe Gökdemir <gokdemirefe1903@gmail.com>
|
Thanks for the heads-up, Tamás! I've signed the ICLA and emailed it to Apache. Appreciate the suggestion! |


DefaultUpdateCheckManagernow tracks artifact not-found markers written during the currentRepositorySystemSession. When a sibling repository later provides the artifact, a marker written in the same session is still expired but logged at DEBUG. A marker from an earlier session continues to produce a warning.Fixes #2196
Testing
mvn -pl maven-resolver-impl -am -Dtest=DefaultUpdateCheckManagerTest -Dsurefire.failIfNoSpecifiedTests=false test— 38 tests passedmvn -pl maven-resolver-impl -am test— 585 tests passed, 5 skippedmvn -pl maven-resolver-impl -am spotless:check— passedgit diff --check— passed