-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Make port number optional in superset for druid #5020
Conversation
It appears that urllib throws error with ssl if port number is provided ``` url = "https://example.com:443/druid/v2" req = urllib.request.Request(url, druid_query_str, headers) res = urllib.request.urlopen(req) ``` The above call fails with the following error: ``` urllib2.HTTPError: HTTP Error 404: Not Found ``` If url is set to https://example.com/druid/v2 it works, this change makes the port number optional.
Full stack trace:
|
superset/connectors/druid/models.py
Outdated
@@ -116,7 +116,12 @@ def data(self): | |||
def get_base_url(host, port): | |||
if not re.match('http(s)?://', host): | |||
host = 'http://' + host | |||
return '{0}:{1}'.format(host, port) | |||
|
|||
if port: |
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.
nit:
url = '{0}:{1}'.format(host, port) if port else host
return url
Codecov Report
@@ Coverage Diff @@
## master #5020 +/- ##
==========================================
+ Coverage 77.34% 77.34% +<.01%
==========================================
Files 44 44
Lines 8664 8665 +1
==========================================
+ Hits 6701 6702 +1
Misses 1963 1963
Continue to review full report at Codecov.
|
* Make port number optional in superset for druid It appears that urllib throws error with ssl if port number is provided ``` url = "https://example.com:443/druid/v2" req = urllib.request.Request(url, druid_query_str, headers) res = urllib.request.urlopen(req) ``` The above call fails with the following error: ``` urllib2.HTTPError: HTTP Error 404: Not Found ``` If url is set to https://example.com/druid/v2 it works, this change makes the port number optional. * Rewrite if/else in concisely python way (cherry picked from commit 2bf53da)
* Make port number optional in superset for druid It appears that urllib throws error with ssl if port number is provided ``` url = "https://example.com:443/druid/v2" req = urllib.request.Request(url, druid_query_str, headers) res = urllib.request.urlopen(req) ``` The above call fails with the following error: ``` urllib2.HTTPError: HTTP Error 404: Not Found ``` If url is set to https://example.com/druid/v2 it works, this change makes the port number optional. * Rewrite if/else in concisely python way
* Make port number optional in superset for druid It appears that urllib throws error with ssl if port number is provided ``` url = "https://example.com:443/druid/v2" req = urllib.request.Request(url, druid_query_str, headers) res = urllib.request.urlopen(req) ``` The above call fails with the following error: ``` urllib2.HTTPError: HTTP Error 404: Not Found ``` If url is set to https://example.com/druid/v2 it works, this change makes the port number optional. * Rewrite if/else in concisely python way (cherry picked from commit 2bf53da)
* Make port number optional in superset for druid It appears that urllib throws error with ssl if port number is provided ``` url = "https://example.com:443/druid/v2" req = urllib.request.Request(url, druid_query_str, headers) res = urllib.request.urlopen(req) ``` The above call fails with the following error: ``` urllib2.HTTPError: HTTP Error 404: Not Found ``` If url is set to https://example.com/druid/v2 it works, this change makes the port number optional. * Rewrite if/else in concisely python way (cherry picked from commit 2bf53da)
* Make port number optional in superset for druid It appears that urllib throws error with ssl if port number is provided ``` url = "https://example.com:443/druid/v2" req = urllib.request.Request(url, druid_query_str, headers) res = urllib.request.urlopen(req) ``` The above call fails with the following error: ``` urllib2.HTTPError: HTTP Error 404: Not Found ``` If url is set to https://example.com/druid/v2 it works, this change makes the port number optional. * Rewrite if/else in concisely python way
* Make port number optional in superset for druid It appears that urllib throws error with ssl if port number is provided ``` url = "https://example.com:443/druid/v2" req = urllib.request.Request(url, druid_query_str, headers) res = urllib.request.urlopen(req) ``` The above call fails with the following error: ``` urllib2.HTTPError: HTTP Error 404: Not Found ``` If url is set to https://example.com/druid/v2 it works, this change makes the port number optional. * Rewrite if/else in concisely python way (cherry picked from commit 2bf53da)
* Make port number optional in superset for druid It appears that urllib throws error with ssl if port number is provided ``` url = "https://example.com:443/druid/v2" req = urllib.request.Request(url, druid_query_str, headers) res = urllib.request.urlopen(req) ``` The above call fails with the following error: ``` urllib2.HTTPError: HTTP Error 404: Not Found ``` If url is set to https://example.com/druid/v2 it works, this change makes the port number optional. * Rewrite if/else in concisely python way (cherry picked from commit 2bf53da)
* Make port number optional in superset for druid It appears that urllib throws error with ssl if port number is provided ``` url = "https://example.com:443/druid/v2" req = urllib.request.Request(url, druid_query_str, headers) res = urllib.request.urlopen(req) ``` The above call fails with the following error: ``` urllib2.HTTPError: HTTP Error 404: Not Found ``` If url is set to https://example.com/druid/v2 it works, this change makes the port number optional. * Rewrite if/else in concisely python way (cherry picked from commit 2bf53da)
* Make port number optional in superset for druid It appears that urllib throws error with ssl if port number is provided ``` url = "https://example.com:443/druid/v2" req = urllib.request.Request(url, druid_query_str, headers) res = urllib.request.urlopen(req) ``` The above call fails with the following error: ``` urllib2.HTTPError: HTTP Error 404: Not Found ``` If url is set to https://example.com/druid/v2 it works, this change makes the port number optional. * Rewrite if/else in concisely python way (cherry picked from commit 2bf53da)
* Make port number optional in superset for druid It appears that urllib throws error with ssl if port number is provided ``` url = "https://example.com:443/druid/v2" req = urllib.request.Request(url, druid_query_str, headers) res = urllib.request.urlopen(req) ``` The above call fails with the following error: ``` urllib2.HTTPError: HTTP Error 404: Not Found ``` If url is set to https://example.com/druid/v2 it works, this change makes the port number optional. * Rewrite if/else in concisely python way (cherry picked from commit 2bf53da)
* Make port number optional in superset for druid It appears that urllib throws error with ssl if port number is provided ``` url = "https://example.com:443/druid/v2" req = urllib.request.Request(url, druid_query_str, headers) res = urllib.request.urlopen(req) ``` The above call fails with the following error: ``` urllib2.HTTPError: HTTP Error 404: Not Found ``` If url is set to https://example.com/druid/v2 it works, this change makes the port number optional. * Rewrite if/else in concisely python way (cherry picked from commit 2bf53da)
* Make port number optional in superset for druid It appears that urllib throws error with ssl if port number is provided ``` url = "https://example.com:443/druid/v2" req = urllib.request.Request(url, druid_query_str, headers) res = urllib.request.urlopen(req) ``` The above call fails with the following error: ``` urllib2.HTTPError: HTTP Error 404: Not Found ``` If url is set to https://example.com/druid/v2 it works, this change makes the port number optional. * Rewrite if/else in concisely python way
* Make port number optional in superset for druid It appears that urllib throws error with ssl if port number is provided ``` url = "https://example.com:443/druid/v2" req = urllib.request.Request(url, druid_query_str, headers) res = urllib.request.urlopen(req) ``` The above call fails with the following error: ``` urllib2.HTTPError: HTTP Error 404: Not Found ``` If url is set to https://example.com/druid/v2 it works, this change makes the port number optional. * Rewrite if/else in concisely python way
It appears that urllib throws error with ssl if port number is provided
The above call fails with the following error:
If url is set to https://example.com/druid/v2 it works, this change
makes the port number optional.