Skip to content

GH-2196: Avoid warning for same-session repository fall-through - #2197

Open
efegokdemir wants to merge 2 commits into
apache:masterfrom
efegokdemir:efe/2196-session-notfound-logging
Open

efegokdemir wants to merge 2 commits into
apache:masterfrom
efegokdemir:efe/2196-session-notfound-logging

Conversation

@efegokdemir

@efegokdemir efegokdemir commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

DefaultUpdateCheckManager now tracks artifact not-found markers written during the current RepositorySystemSession. 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 passed
  • mvn -pl maven-resolver-impl -am test — 585 tests passed, 5 skipped
  • mvn -pl maven-resolver-impl -am spotless:check — passed
  • git diff --check — passed

Signed-off-by: Efe Gökdemir <gokdemirefe1903@gmail.com>

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@cstamas cstamas added the enhancement New feature or request label Oct 12, 2026
@cstamas cstamas added this to the 2.0.25 milestone Oct 12, 2026
@cstamas
cstamas requested a balanced review from Copilot October 12, 2026 17:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 RepositorySystemSession and 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.

@cstamas

cstamas commented Oct 12, 2026

Copy link
Copy Markdown
Member

@efegokdemir By the sheer amount of your contributions, it may be worth to file ICLA
https://www.apache.org/licenses/contributor-agreements.html

Signed-off-by: Efe Gökdemir <gokdemirefe1903@gmail.com>
@efegokdemir

Copy link
Copy Markdown
Contributor Author

Thanks for the heads-up, Tamás! I've signed the ICLA and emailed it to Apache. Appreciate the suggestion!

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.

Warning "expiring the cached not-found" logged for every artifact found in a later repository of the same session

4 participants