-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
Installing plugin without checksums ends up downloading from github #13197
Installing plugin without checksums ends up downloading from github #13197
Conversation
I think we should remove that catch block altogether and just rethrow the first exception from the |
@s1monw I pushed a new commit. |
@@ -153,7 +150,7 @@ public boolean downloadAndVerifyChecksum(URL checksumURL, Path originalFile, Pat | |||
// checksum file doesn't exist | |||
return false; | |||
} catch (IOException e) { | |||
if (ExceptionsHelper.unwrapCause(e) instanceof FileNotFoundException) { |
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.
you can remove the entire catch (IOException e)
block here it's already handled correctly above
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.
Indeed. That was stupid keeping that.
left another comment |
@@ -378,9 +369,6 @@ private URLConnection openConnection(URL aSource) throws IOException { | |||
responseCode == HttpURLConnection.HTTP_MOVED_TEMP || | |||
responseCode == HttpURLConnection.HTTP_SEE_OTHER) { | |||
String newLocation = httpConnection.getHeaderField("Location"); | |||
String message = aSource |
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.
@s1monw I removed also this because it's not used in our code. It's unrelated to the change though.
@s1monw pushed another commit. |
LGTM |
998347d
to
0df3a90
Compare
```sh bin/plugin install lmenezes/elasticsearch-kopf/develop -> Installing lmenezes/elasticsearch-kopf/develop... Trying http://download.elastic.co/lmenezes/elasticsearch-kopf/elasticsearch-kopf-develop.zip ... Trying http://search.maven.org/remotecontent?filepath=lmenezes/elasticsearch-kopf/develop/elasticsearch-kopf-develop.zip ... Trying https://oss.sonatype.org/service/local/repositories/releases/content/lmenezes/elasticsearch-kopf/develop/elasticsearch-kopf-develop.zip ... Trying https://github.com/lmenezes/elasticsearch-kopf/archive/develop.zip ... Downloading .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................DONE Verifying https://github.com/lmenezes/elasticsearch-kopf/archive/develop.zip checksums if available ... Trying https://github.com/lmenezes/elasticsearch-kopf/archive/master.zip ... Downloading ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................DONE Verifying https://github.com/lmenezes/elasticsearch-kopf/archive/master.zip checksums if available ... ``` This happens because we don't have anymore ElasticsearchWrapperException here but standard java exceptions. Closes elastic#13196.
0df3a90
to
03bb285
Compare
This happens because we don't have anymore ElasticsearchWrapperException here but standard java exceptions.
Closes #13196.