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

SSH_TUNNELING is not shown in UI for clickhouse-connect #28114

Open
3 tasks done
arrowcircle opened this issue Apr 17, 2024 · 2 comments · May be fixed by #32348
Open
3 tasks done

SSH_TUNNELING is not shown in UI for clickhouse-connect #28114

arrowcircle opened this issue Apr 17, 2024 · 2 comments · May be fixed by #32348
Assignees
Labels
data:connect:clickhouse Related to Clickhouse

Comments

@arrowcircle
Copy link

Bug description

When I select clickhouse database drive, there is no switch to turn on SSH tunneling. While if I select standard DB, it's present.

How to reproduce the bug

Go to settings - database connections.
Click new.
Select clickhouse in supported databases.
There will be no ssh_tunneling toggle.

Screenshots/recordings

No response

Superset version

4.0.0

Python version

Not applicable

Node version

Not applicable

Browser

Chrome

Additional context

I run in k8s with latest helm chart and 4.0.0 version

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@rusackas rusackas added the data:connect:clickhouse Related to Clickhouse label Apr 17, 2024
@mistercrunch
Copy link
Member

I don't have a direct answer, but can point to the base package and class for everything database-engine-specific, and what seem to be a relevant property (disable_ssh_tunneling) -> https://github.com/apache/superset/blob/master/superset/db_engine_specs/base.py#L213

Seems at least related to your issue but I haven't worked on this feature so I can't tell for sure.

@hughhhh hughhhh self-assigned this Apr 24, 2024
@maybedino maybedino linked a pull request Feb 21, 2025 that will close this issue
10 tasks
@maybedino
Copy link

The SSH option only shows up if the engine has the "ssh" to base, it was still missing from the clickhouse engine:

class ClickHouseParametersSchema(Schema):
username = fields.String(allow_none=True, metadata={"description": __("Username")})
password = fields.String(allow_none=True, metadata={"description": __("Password")})
host = fields.String(
required=True, metadata={"description": __("Hostname or IP address")}
)
port = fields.Integer(
allow_none=True,
metadata={"description": __("Database port")},
validate=Range(min=0, max=65535),
)
database = fields.String(
allow_none=True, metadata={"description": __("Database name")}
)
encryption = fields.Boolean(
dump_default=True,
metadata={"description": __("Use an encrypted connection to the database")},
)
query = fields.Dict(
keys=fields.Str(),
values=fields.Raw(),
metadata={"description": __("Additional parameters")},
)

Adding it there was enough to make it work for us, I opened a pull request with the changes: #32348

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:connect:clickhouse Related to Clickhouse
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants