GH-1768 Drastically simplify auth caching#1791
Conversation
Drastically simplify auth cache, that fixes proxy auth issues. Fixes apache#1768
|
Is it possible to add an IT which fails without this fix. Something similar (but simpler) as https://github.com/Eyjafjallajokull-Roman/maven-proxy-auth-repro? |
|
I agree about the IT and the need for something in UT as this went unnoticed in current test coverage. OTOH, I am unsure how to set something like that up. Moreover, if you look at it, the reality is that Resolver does not even have ITs, only UTs. The "demo" codebase was made to run during IT phase only to make sure basic functionality works (as extra next to existing UTs). Resolver was always tested in Maven ITs. |
|
I cannot properly test, feel free to merge as is. However adding a test to https://github.com/apache/maven-resolver/blob/master/maven-resolver-test-http/src/main/java/org/eclipse/aether/internal/test/util/http/HttpTransporterTest.java leveraging a library like https://github.com/monkeyWie/proxyee (or implement something directly in Jetty) is hopefully feasible later on. |
As there is a reproducible issue for proxy auth cache. Seems auth cache fall apart in the moment non-single thread flow happens. Instead to chase and wrap around our head, I just went to drastically simplify the whole stuff, without dropping any existing feature, and making sure that reproducer does not reproduce anymore.
Fixes #1768