Issue with installing plugins from github

While attempting to deploy my plugin from github.com, I noticed that the
plugin manager was not finding the correct zip file. The filenames in the
output looked correct, so I attempted to replicate the download via code. I
get the following exception:

java.io.IOException: Redirection detected from https to http. Protocol
switch unsafe, not allowed.
at
org.elasticsearch.common.http.client.HttpDownloadHelper$GetThread.redirectionAllowed(HttpDownloadHelper.java:235)
at
org.elasticsearch.common.http.client.HttpDownloadHelper$GetThread.openConnection(HttpDownloadHelper.java:277)
at
org.elasticsearch.common.http.client.HttpDownloadHelper$GetThread.get(HttpDownloadHelper.java:209)

On a related note, what is the naming convention? When downloading from
github, the code is looking for a zip file with the repo name as the prefix.
When install via a local (directory) url, the zip file needs to have
"elasticsearch-" as the prefix.

Using ES 0.17.2

--
Ivan

BTW, the url redirected to is http://cloud.github.com/downloads/...

My scenario was confirmed in this thread:

On Sun, Jul 31, 2011 at 10:48 PM, Ivan Brusic ivan@brusic.com wrote:

While attempting to deploy my plugin from github.com, I noticed that the
plugin manager was not finding the correct zip file. The filenames in the
output looked correct, so I attempted to replicate the download via code. I
get the following exception:

java.io.IOException: Redirection detected from https to http. Protocol
switch unsafe, not allowed.
at
org.elasticsearch.common.http.client.HttpDownloadHelper$GetThread.redirectionAllowed(HttpDownloadHelper.java:235)
at
org.elasticsearch.common.http.client.HttpDownloadHelper$GetThread.openConnection(HttpDownloadHelper.java:277)
at
org.elasticsearch.common.http.client.HttpDownloadHelper$GetThread.get(HttpDownloadHelper.java:209)

On a related note, what is the naming convention? When downloading from
github, the code is looking for a zip file with the repo name as the prefix.
When install via a local (directory) url, the zip file needs to have
"elasticsearch-" as the prefix.

Using ES 0.17.2

--
Ivan

What the command you use to install the plugin? And what have you uploaded
to your repo (is it a zip file you uploaded)?

Regarding naming convention, you its user_name/repo_name, or
user_name/repo_name/version. If the repo name starts with es-, or
elasticsearch- then it will be removed from the plugin installed.

I will fix the redirection problem...

On Mon, Aug 1, 2011 at 6:49 AM, Ivan Brusic ivan@brusic.com wrote:

BTW, the url redirected to is http://cloud.github.com/downloads/...

My scenario was confirmed in this thread:
New uploader & downloads screen - The GitHub Blog

On Sun, Jul 31, 2011 at 10:48 PM, Ivan Brusic ivan@brusic.com wrote:

While attempting to deploy my plugin from github.com, I noticed that the
plugin manager was not finding the correct zip file. The filenames in the
output looked correct, so I attempted to replicate the download via code. I
get the following exception:

java.io.IOException: Redirection detected from https to http. Protocol
switch unsafe, not allowed.
at
org.elasticsearch.common.http.client.HttpDownloadHelper$GetThread.redirectionAllowed(HttpDownloadHelper.java:235)
at
org.elasticsearch.common.http.client.HttpDownloadHelper$GetThread.openConnection(HttpDownloadHelper.java:277)
at
org.elasticsearch.common.http.client.HttpDownloadHelper$GetThread.get(HttpDownloadHelper.java:209)

On a related note, what is the naming convention? When downloading from
github, the code is looking for a zip file with the repo name as the prefix.
When install via a local (directory) url, the zip file needs to have
"elasticsearch-" as the prefix.

Using ES 0.17.2

--
Ivan

Responses inline.

On Mon, Aug 1, 2011 at 2:11 AM, Shay Banon kimchy@gmail.com wrote:

What the command you use to install the plugin? And what have you uploaded
to your repo (is it a zip file you uploaded)?

% bin/plugin -install brusic/streaming-river

The output looks correct:
-> Installing brusic/streaming-river...
Trying
https://github.com/downloads/brusic/streaming-river/streaming-river-0.17.2.zip.
..
Trying https://github.com/brusic/streaming-river/zipball/v0.17.2...
Trying https://github.com/brusic/streaming-river/zipball/master...

The first zip file is correct, it is the redirection which is problematic.

Regarding naming convention, you its user_name/repo_name, or
user_name/repo_name/version. If the repo name starts with es-, or
elasticsearch- then it will be removed from the plugin installed.

I have been installing locally with a relative path:

% $ELASTICSEARCH_HOME/bin/plugin url target/scala_2.9.0/streaming-river
install streaming-river

-> Installing streaming-river...
Failed to install streaming-river, reason: no protocol:
target/scala_2.9.0/streaming-river

The zip file needs the "elasticsearch-" in order for it to work.

I will fix the redirection problem...

Thanks so much!

--
Ivan