antonio-andrade opened a new issue, #33401:
URL: https://github.com/apache/superset/issues/33401
### Bug description
**How to reproduce the bug**
1. Install Superset 4.1.2 on Kubernetes 1.32.3 using the current Helm Chart
0.14.2 with Helm 3.17.3 and the custom value :
```shell
bootstrapScript: |
#!/bin/bash
pip install psycopg2-binary==2.9.6 \
"duckdb-engine>=0.12.1, <0.13" &&\
if [ ! -f ~/bootstrap ]; then echo "Running Superset with uid {{
.Values.runAsUser }}" > ~/bootstrap; fi
```
2. Connect to Superset
3. Add new database
4. In the dropdown select DuckDB database and fill in SQL Alchemy URI:
duckdb:///:memory:
5. Click `Test connection " => OK
6. Click `Finish`to register the database
7. Go to SQL Lab
8. Try to install httpfs extension :
```sql
INSTALL httpfs;
```
**Expected results**
The https extension should be installed and one can proceed with the
connection to a S3 repository :
```sql
LOAD https;
SET s3_region='fr-par';
SET s3_endpoint='http://s3.fr-par.scw.cloud';
SET s3_access_key_id='xxxxxxx';
SET s3_secret_access_key='xxxx-xxxx-xxxx-xxxx-xxxxxx';
SET s3_url_style = 'vhost';
SET s3_use_ssl=true;
SELECT *
FROM
'https://<bucket>.s3.fr-par.scw.cloud/naiades_analyse_physicochimie.parquet'
LIMIT 10;
```
**Actual results**
The error `DuckDB error Invalid SSL Certificate Requirements Flag:
CERT_NONE` appears
### Screenshots/recordings


### Superset version
4.1.2
### Python version
3.10
### Node version
I don't know
### Browser
Chrome
### Additional context
- Superset python log :
```shell
100.64.0.241 - - [10/May/2025:18:09:30 +0000] "GET /health HTTP/1.1" 200 2
"-" "kube-probe/1.32"
172.16.16.5 - - [10/May/2025:18:09:32 +0000] "POST /tabstateview/ HTTP/1.1"
400 1319 "http://51.159.25.29:8088/sqllab/" "Mozilla/5.0 (Windows NT 10.0;
Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0
Safari/537.36"
2025-05-10 18:09:33,547:INFO:superset.commands.sql_lab.execute:Triggering
query_id: 15
2025-05-10 18:09:33,565:INFO:superset.sql_lab:Query 15: Executing 1
statement(s)
2025-05-10 18:09:33,565:INFO:superset.sql_lab:Query 15: Set query to
'running'
2025-05-10 18:09:33,600:INFO:superset.sql_lab:Query 15: Running statement 1
out of 1
2025-05-10 18:09:33,659:INFO:superset.sql_lab:Query 15: Storing results in
results backend, key: 5a7dc232-274e-427b-9cec-b1e2d7146a58
2025-05-10
18:09:33,684:WARNING:superset.views.error_handling:SupersetErrorsException
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1484, in
full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1469, in
dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File
"/usr/local/lib/python3.10/site-packages/flask_appbuilder/security/decorators.py",
line 95, in wraps
return f(self, *args, **kwargs)
File "/app/superset/views/base_api.py", line 119, in wraps
duration, response = time_function(f, self, *args, **kwargs)
File "/app/superset/utils/core.py", line 1364, in time_function
response = func(*args, **kwargs)
File "/app/superset/views/base_api.py", line 91, in wraps
return f(self, *args, **kwargs)
File "/app/superset/utils/log.py", line 303, in wrapper
value = f(*args, **kwargs)
File "/app/superset/sqllab/api.py", line 409, in execute_sql_query
command_result: CommandResult = command.run()
File "/app/superset/utils/decorators.py", line 266, in wrapped
return on_error(ex)
File "/app/superset/utils/decorators.py", line 236, in on_error
raise ex
File "/app/superset/utils/decorators.py", line 259, in wrapped
result = func(*args, **kwargs)
File "/app/superset/commands/sql_lab/execute.py", line 105, in run
status = self._run_sql_json_exec_from_scratch()
File "/app/superset/commands/sql_lab/execute.py", line 158, in
_run_sql_json_exec_from_scratch
return self._sql_json_executor.execute(
File "/app/superset/sqllab/sql_json_executer.py", line 110, in execute
raise SupersetErrorsException(
superset.exceptions.SupersetErrorsException: [SupersetError(message='Invalid
SSL Certificate Requirements Flag: CERT_NONE',
error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR:
'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>,
extra={'engine_name': 'DuckDB', 'issue_codes': [{'code': 1002, 'message':
'Issue 1002 - The database returned an unexpected error.'}]})]
172.16.16.5 - - [10/May/2025:18:09:33 +0000] "POST /api/v1/sqllab/execute/
HTTP/1.1" 500 279 "http://51.159.25.29:8088/sqllab/" "Mozilla/5.0 (Windows NT
10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0
Safari/537.36"
172.16.16.5 - - [10/May/2025:18:09:33 +0000] "GET
/api/v1/query/updated_since?q=(last_updated_ms:1746900563101) HTTP/1.1" 200 540
"http://51.159.25.29:8088/sqllab/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"
172.16.16.5 - - [10/May/2025:18:09:34 +0000] "POST
/superset/log/?explode=events HTTP/1.1" 200 20
"http://51.159.25.29:8088/sqllab/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"
100.64.0.241 - - [10/May/2025:18:09:35 +0000] "GET /health HTTP/1.1" 200 2
"-" "kube-probe/1.32"
172.16.16.5 - - [10/May/2025:18:09:37 +0000] "POST /tabstateview/ HTTP/1.1"
400 1319 "http://51.159.25.29:8088/sqllab/" "Mozilla/5.0 (Windows NT 10.0;
Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0
Safari/537.36"
172.16.16.5 - - [10/May/2025:18:09:38 +0000] "PUT /tabstateview/6 HTTP/1.1"
200 1 "http://51.159.25.29:8088/sqllab/" "Mozilla/5.0 (Windows NT 10.0; Win64;
x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"
```
- The connection tested with `superset test-db` works fine
```shell
# Identify superset master pod
kubectl get pods
# Launch shell into the identifed pod
kubectl exec -it superset-7d64cf964f-xqrzt -- bash
# Test DuckDB connection
superset test-db duckdb:///:memory:
# Fill the JSON engine params and validate with CTRL+D
{"connect_args":{"preload_extensions":["httpfs"],"config":{"s3_region":"fr-par","s3_access_key_id":"xxxxxxx","s3_secret_access_key":"xxxxxx-xxxx-xxxx-xxxx-xxxxxxxx","s3_endpoint":"https://s3.fr-par.scw.cloud","s3_url_style":"vhost","s3_use_ssl":"True"}}}
```
- The connection with python script works fine
```python
import sqlalchemy
REGION = "fr-par"
ACCESS_KEY_ID = "xxxxxxxx"
SECRET_ACCESS_KEY = "xxxxx-xxxx-xxxx-xxxx-xxxxxxx"
BUCKET = "xxxxx"
FILE = "naiades_analyse_physicochimie.parquet"
url = f"https://{BUCKET}.s3.{REGION}.scw.cloud/{FILE}"
endpoint = f"https://s3.{REGION}.scw.cloud"
if __name__ == "__main__":
engine = sqlalchemy.create_engine(
"duckdb:///:memory:",
connect_args={
"config": {
"s3_region": REGION,
"s3_access_key_id": ACCESS_KEY_ID,
"s3_secret_access_key": SECRET_ACCESS_KEY,
"s3_endpoint": endpoint,
"s3_url_style": "vhost",
"s3_use_ssl": True,
},
},
)
with engine.begin() as conn:
conn.execute("INSTALL spatial; LOAD spatial;")
conn.execute("INSTALL https; LOAD https;")
result = conn.execute(f"SELECT * FROM '{url}' LIMIT 10;")
print(result.fetchall())
```
### Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to
my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug
report.
- [x] 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]