Allow solr_wrapper to download the code from an arbitrary URL. #123
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
urlconfig string allows you to specify a URL where solr_wrapper can find the SOLR zip file.In the current code, this config string is used not just to download the zip file, but also to guess the name of the topmost directory inside the zip file (e.g.
solr-1.2.3). If the guess is wrong, the extraction process fails.Instead of trying to guess the name of the topmost directory based on config.download_url, just peek inside the zip file after extracting it. This means solr_wrapper can now download the SOLR code from an arbitrary URL.
In practice, this is useful with URLs generated on the fly at download time, such as pre-signed S3 urls.