-
Notifications
You must be signed in to change notification settings - Fork 140
Bug: Filter fixes #1655
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
Open
cstamas
wants to merge
12
commits into
apache:master
Choose a base branch
from
cstamas:fix-prefix-filter
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Bug: Filter fixes #1655
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Two major issues: one was that it tried to fix the Maven issue of remote repository uniqueness (globally), and that attempt was in fact wrong, fix is elsewhere. The reason it tried to do this is in fact to circumvent locking issues apache#1644. The other issue was filter lifecycle, manager did it wrongly: the bug caused that one session was used to acquire filters and same filter got used for potentially other (maybe even reconfigured) session. This overlook forced filters to implement hoops and loops (to prevent recursion), but also prevented any third party code to have saying in filter operation. Changes: * fix manager to make sure filters and session are aligned * fix/simplify prefix filter recursion prevention * introduce public and documented way to inhibit prefix discovery
cstamas
added a commit
to cstamas/maven-resolver
that referenced
this pull request
Nov 14, 2025
Also, fix misaligned filter sources re session This is "mild backport" of apache#1655
Signed-off-by: Tamas Cservenak <[email protected]>
Whenever RemoteRepository is used as a key in map, it has to be normalized, as otherwise things may fall apart.
cstamas
added a commit
that referenced
this pull request
Nov 17, 2025
Changes: * fix manager to make sure filters and session are aligned * support same (newly introduced) properties This is "mild backport" of #1655
gnodet
reviewed
Nov 18, 2025
|
|
||
| private boolean supportedResolvePrefixesForRemoteRepository( | ||
| RepositorySystemSession session, RemoteRepository remoteRepository) { | ||
| // TODO: RemoteRepository.isRepositoryManager() is still unused in Maven; once used, factor it in |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be a good idea to create an issue in Maven and reference it here, so that we can track more easily in the future.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Three major issues:
Changes:
Note: as this PR now removes the "hack" (that in fact tried to circumvent #1644) we are now back at state we were before #1575 (the "by make repositories unique" bit). As we see, this change (without locking fix) will cause Maven IT failures, as ITs are executed in parallel, and "prefix discovery" initiated over same local repository will/may cause locking conflicts and hence timeouts (result is sporadically failing ITs due locking timeouts). Hence, this fix is to be followed by fix for #1644
Fixes #1654
Fixes #1667