-
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
base: master
Are you sure you want to change the base?
Bug: Filter fixes #1655
Conversation
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
Also, fix misaligned filter sources re session This is "mild backport" of apache#1655
Signed-off-by: Tamas Cservenak <tamas@cservenak.net>
Whenever RemoteRepository is used as a key in map, it has to be normalized, as otherwise things may fall apart.
Changes: * fix manager to make sure filters and session are aligned * support same (newly introduced) properties This is "mild backport" of #1655
|
|
||
| private boolean supportedResolvePrefixesForRemoteRepository( | ||
| RepositorySystemSession session, RemoteRepository remoteRepository) { | ||
| // TODO: RemoteRepository.isRepositoryManager() is still unused in Maven; once used, factor it in |
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.
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.
In fact, let me work thru this: despite nothing sets this RemoteRepository property, it is queried regularly in resolver codebase.
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