-
Notifications
You must be signed in to change notification settings - Fork 119
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
[MRESOLVER-305] Handle blocked state at connector level #228
[MRESOLVER-305] Handle blocked state at connector level #228
Conversation
As blocked is really about block remote access. Locally cached things should not be affected, but current solution did not cover all execution paths. --- https://issues.apache.org/jira/browse/MRESOLVER-305
{ | ||
if ( repository.getMirroredRepositories().isEmpty() ) | ||
{ | ||
throw new NoRepositoryConnectorException( repository, "Blocked repository: " + repository ); |
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.
we should probably have some tests, because to me it is not clear where this exception is caught and logged. Does it prevent other remote repos from being tried or not?
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.
if you look from where this block was removed, it is in same try-catch where this method is invoked (and throws this exception). This move basically prevents any "remote access" to blocked repositories, not just for one case like originally. But yes, I agree, we do need test, I thought to reuse existing ones (are there any?)
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.
But if I have one blocked remote repo and one not-blocked one I expect the latter to be used instead (if possible). Resolving should only fail if the requested artifact/metadata could not be delivered from any non-blocked remote repo.
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.
Yes, as connector provider provides connector for one given remote repo (is param on method), so it will happily provide connector instance for other non-blocked remote repositories....
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.
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.
Yes, in short: resolver will refuse to provide any connector for blocked RemoteRepository instances. Everywhere.
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.
Thanks, LGTM
As blocked is really about block remote access. Locally cached things should not be affected, but current solution did not cover all execution paths.
https://issues.apache.org/jira/browse/MRESOLVER-305