-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Rehash DB Migration throw an error when processing elasticsearch queries #7272
Comments
We thought this was fixed in #7258, but there's obviously still a flaw in the logic. @gfmellado can you post a screen shot of your Elasticsearch data source connection? |
Thanks, that's simple enough. I tried setting up an Elasticsearch instance on Digitalocean and Vultr to test with, but was unable to connect ( |
@stankovic-marko @g5n828 @NicolasLM @wwl717195673 Do you still use Redash and Elasticsearch? We're looking for people to help out with the Elasticsearch data source and make sure it's working ok with the new |
Pardon me for jumping in. I’m not sure if it’s okay to proceed with the process while the redash/redash/query_runner/elasticsearch.py Lines 94 to 96 in 10ce280
diff --git a/redash/query_runner/elasticsearch.py b/redash/query_runner/elasticsearch.py
index 3eab57dc..dae7592d 100644
--- a/redash/query_runner/elasticsearch.py
+++ b/redash/query_runner/elasticsearch.py
@@ -92,7 +92,7 @@ class BaseElasticSearch(BaseQueryRunner):
logger.setLevel(logging.DEBUG)
self.server_url = self.configuration.get("server", "")
- if self.server_url[-1] == "/":
+ if self.server_url != "" and self.server_url[-1] == "/":
self.server_url = self.server_url[:-1]
basic_auth_user = self.configuration.get("basic_auth_user", None) In my local environment, I was able to continue the migration after making this fix. |
@wm3 that looks better, although we probably want f self.server_url and self.server_url[-1] == "/": Can you create a PR with this change? |
The following |
Issue Summary
The command
docker compose run --rm server manage db upgrade
throws an error when migrating elasticsearch queries from redash 10.1.0 to latest stable version 25.1.0.Steps to Reproduce
docker compose run --rm server manage db upgrade
We've isolated the issue to all elasticsearch queries.
Technical details:
The text was updated successfully, but these errors were encountered: