Skip to content

Commit

Permalink
Apache Superset: Validate connectivity with Superset 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Jan 7, 2024
1 parent b2a0186 commit 2ff3fba
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/apache-superset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-22.04 ]
superset-version: [ "2.*" ]
superset-version: [ "2.*", "3.*" ]
python-version: [ "3.11" ]

services:
Expand Down
8 changes: 7 additions & 1 deletion framework/apache-superset/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,13 @@ def provision_superset(start_superset):
)

assert response.status_code == 201
assert response.json() == {
payload = response.json()

# Superset 3 uses UUIDs to identify resources.
if "uuid" in payload:
del payload["uuid"]

assert payload == {
"id": 1,
"result": {
"configuration_method": "sqlalchemy_form",
Expand Down
2 changes: 1 addition & 1 deletion framework/apache-superset/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
apache-superset==2.*
apache-superset
crate[sqlalchemy]==0.34.0
marshmallow_enum<2 # Seems to be missing from `apache-superset`?
2 changes: 1 addition & 1 deletion framework/apache-superset/superset_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# SQLALCHEMY_DATABASE_URI = 'sqlite:////path/to/superset.db?check_same_thread=false'

# Flask-WTF flag for CSRF
WTF_CSRF_ENABLED = True
WTF_CSRF_ENABLED = False
# Add endpoints that need to be exempt from CSRF protection
WTF_CSRF_EXEMPT_LIST = []
# A CSRF token that expires in 1 year
Expand Down
1 change: 0 additions & 1 deletion framework/apache-superset/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def test_ui():
html_title = page.text_content("title").strip()
assert html_title == "Superset"
assert page.url.endswith("/superset/welcome/")
assert page.text_content("h1") == "Home"

# Invoke SQL Lab with an example query, and verify response.
sql = "SELECT * FROM sys.summits LIMIT 42;"
Expand Down

0 comments on commit 2ff3fba

Please sign in to comment.