Skip to content
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

Add https support for Druid #4480

Merged
merged 2 commits into from
Feb 28, 2018
Merged

Conversation

mistercrunch
Copy link
Member

closes #4465

Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a comment on making the code more robust.

@@ -107,24 +107,29 @@ def data(self):
'backend': 'druid',
}

@staticmethod
def get_base_url(host, port):
if not host.startswith('http'):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unlikely, but this might cause problems if the hostname starts with http, eg, http-server.example.com. I think it's better to use a regex here:

if not re.match('http(s)?://', host):
    host = 'http://' + host

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call

@betodealmeida
Copy link
Member

I think import re is missing.

@mistercrunch
Copy link
Member Author

Fixed, mergin'

@mistercrunch mistercrunch merged commit 849a2ce into apache:master Feb 28, 2018
@mistercrunch mistercrunch deleted the druid_https branch February 28, 2018 18:12
endpoint = (
'http://{obj.coordinator_host}:{obj.coordinator_port}/status'
).format(obj=self)
endpoint = self.get_base_coordinator_url() + '/status'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mistercrunch this is broken, it should use get_base_url() instead.

michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
* Add https support for Druid

* addressing comment
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
* Add https support for Druid

* addressing comment
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.24.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.24.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

connection https druid cluster
2 participants