Compare commits

..

363 Commits

Author SHA1 Message Date
Mehmet Salih Yavuz
071ab203b5 fix(Select): select all buttons to inherit font (#38313)
(cherry picked from commit ac2914486f)
2026-03-13 13:18:41 -07:00
Đỗ Trọng Hải
79e3f1472c fix(db-modal): update doc refs for DB connection modal (#38091)
(cherry picked from commit fc5fda3d1a)
2026-03-12 14:46:36 -07:00
Amin Ghadersohi
a66cf66158 fix: silence deprecation warnings causing noisy production logs (#38128)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
(cherry picked from commit 01d5245cd2)
2026-03-12 12:49:05 -07:00
Evan Rusackas
2632df41c1 fix(charts): improve minor gridline visibility in dark themes (#38371)
Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
(cherry picked from commit 7815afb24d)
2026-03-11 22:39:29 -07:00
amaannawab923
98a04b1bc2 fix(ag-grid): render boolean columns as checkboxes instead of blank cells (#38279)
(cherry picked from commit e5cbc98482)
2026-03-11 18:44:56 -07:00
Evan Rusackas
3bb37d3f78 fix(tags): expire tag relationship after deleting all tagged objects (#38163)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 51ac758b80)
2026-03-10 21:41:18 -07:00
Enzo Martellucci
88e82bebe3 fix(explore): prevent TypeError when chart dimension returns empty string (#38276)
(cherry picked from commit 016417f793)
2026-03-10 14:12:41 -07:00
Gabriel Torres Ruiz
922f4a402c fix(templates): restore css_bundle calls in spa.html for production builds (#38350)
(cherry picked from commit 2ab9d37a00)
2026-03-10 14:11:05 -07:00
jaymasiwal
76d6a1dd6d fix(actionlog): restore full name display in Action Logs user column (#37985)
(cherry picked from commit f5d489da29)
2026-02-27 23:13:55 -08:00
Evan Rusackas
48a6921ade fix(docs): guard window reference in logging.ts for SSR compatibility (#38201) 2026-02-27 23:13:55 -08:00
Manoj S
3baecdc622 fix(table): preserve line breaks in cell content modal (#37036) 2026-02-27 23:13:55 -08:00
Kamil Gabryjelski
50f0306753 fix(button): use colorLink token for link-style buttons (#38121)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 23:13:53 -08:00
Vanessa Giannoni
23431467e9 fix(table): preserve time grain aggregation when temporal column casing changes (#37893)
(cherry picked from commit f4acce5727)
2026-02-27 23:13:33 -08:00
Đỗ Trọng Hải
c85f58f9cc fix(home): null check for possibly undefined filtered other table data due to insufficient permission (#37983)
(cherry picked from commit 9131739f98)
2026-02-27 23:13:33 -08:00
Enzo Martellucci
85c8ec073a fix(native-filters): align refresh icon with default value field (#37802)
(cherry picked from commit b012b63e5b)
2026-02-27 23:13:33 -08:00
Kamil Gabryjelski
667e964577 fix: Unreachable drop zones within tabs in dashbboard editor (#37904)
(cherry picked from commit b0be47a4ac)
2026-02-27 23:13:30 -08:00
Mehmet Salih Yavuz
1c1af8d0c8 fix(explore): Don't show unsaved changes modal on new charts (#37714)
(cherry picked from commit 69c679be20)
2026-02-27 10:16:12 -08:00
Kamil Gabryjelski
841adfc15a perf: fix N+1 query in Slice.datasource property (#37899)
(cherry picked from commit 26a2e12779)
2026-02-26 15:05:54 -08:00
Kamil Gabryjelski
e3ba8b1b2a perf: fix N+1 query in chart list API when thumbnail_url is requested (#37895)
(cherry picked from commit 98ca599eef)
2026-02-26 11:56:12 -08:00
wuqicyber
36864034e3 fix(table-chart): support orderby adhoc columns with server-side pagination (#37521)
(cherry picked from commit 6f34ba7d4a)
2026-02-25 18:58:42 -08:00
Vitor Avila
51f71deed8 fix: Allow non-owners to fave/unfave charts (#38095)
(cherry picked from commit f60432e34c)
2026-02-25 16:26:16 -08:00
Evan Rusackas
564ed6cd13 fix(excel): remove unwanted index column from Excel exports (#38176)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
(cherry picked from commit c4eb7de6de)
2026-02-25 14:27:01 -08:00
Evan Rusackas
0976718c5c fix(security): fix Guest Token API 422 error by disabling JWT sub claim verification (#38177)
Co-authored-by: hainenber <dotronghai96@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
(cherry picked from commit 50cc1b93d2)
2026-02-25 09:33:58 -08:00
Ujjwaljain16
22b981b48a fix(encryption): resolve SECRET_KEY lazily to fix silent re-encrypt-secrets failures (#37982)
(cherry picked from commit 2d44f52ad1)
2026-02-24 22:38:14 -08:00
Jonathan Alberth Quispe Fuentes
a14eb47b5a fix(roles): optimize user fetching and resolve N+1 query issue (#37235)
(cherry picked from commit 88ce1425e2)
2026-02-24 14:22:32 -08:00
Amin Ghadersohi
62c36cb5ad fix: pin setuptools <81 to prevent pkg_resources removal (#36104)
(cherry picked from commit 519990e2fb)
2026-02-11 12:43:51 -08:00
Kamil Gabryjelski
075df66e2f fix: Vertical lines in the middle of Treemap categories (#37808)
(cherry picked from commit f25d95be41)
2026-02-09 13:45:54 -08:00
Rini Misini
dd36d6f967 fix(db): prevent long database error messages from overflowing UI (#37709)
Co-authored-by: RiniMisini12 <misinirini@gmail.com>
(cherry picked from commit f4708a5648)
2026-02-09 13:42:05 -08:00
Abhishek Mishra
0d9d427305 fix(alerts): show screenshot width field for PDF reports (#37037)
(cherry picked from commit e9ae212c1c)
2026-02-06 14:59:34 -08:00
JUST.in DO IT
ae5f060df3 fix(world-map): reset hover highlight on mouse out (#37716)
Co-authored-by: Arunodoy18 <arunodoy630@gmail.com>
(cherry picked from commit a04571fa20)
2026-02-06 14:10:06 -08:00
Joe Li
30e854f551 chore: Adds 6.0.1rc1 data to CHANGELOG.md 2026-02-05 13:24:00 -08:00
bikashbarua
e36a1c216d fix: Rename Truncate Axis to Truncate Y Axis in bar chart controls (#37403)
Co-authored-by: Joe Li <joe@preset.io>
Co-authored-by: SBIN2010 <Sbin2010@mail.ru>
(cherry picked from commit 4e4fa53c8d)
2026-02-05 12:01:56 -08:00
Nancy Chauhan
fc1690f50b fix(security): update jspdf to 4.0.0 to address CVE-2025-68428 (#37553) 2026-02-04 15:30:20 -08:00
Jamile Celento
86d4605061 fix(native-filters): update TEMPORAL_RANGE filter subject when Time Column filter is applied (#36985)
(cherry picked from commit 2dfc770b0f)
2026-02-04 11:54:53 -08:00
Vanessa Giannoni
565503e835 fix(timeseries): restore ECharts tooltip after closing drill menu (#37284)
(cherry picked from commit 6b7b23ed78)
2026-02-04 11:35:14 -08:00
Ramiro Aquino Romero
ce8a709839 fix: charts row limit warning is missing for server (#37112) 2026-02-02 19:47:33 -08:00
Jonathan Alberth Quispe Fuentes
b00603d9fb fix: Heatmap does not render correctly on normalization (#37208) 2026-02-02 19:30:08 -08:00
JUST.in DO IT
27a0f08280 fix(dashboard): Avoid calling loadData for invisible charts on virtual rendering (#37452) 2026-02-02 16:44:09 -08:00
Evan Rusackas
0640beee19 fix(chart): enable cross-filter on bar charts without dimensions (#37407)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
(cherry picked from commit ae10e105c2)
2026-02-02 13:04:16 -08:00
Felipe López
d1e7eeacf7 fix(charts): Table chart shows an error on row limit (#37218) 2026-01-30 12:52:02 -08:00
Alejandro Solares
c8c934afe2 chore(deps): bump dependencies to address security vulnerabilities (#37552) 2026-01-30 09:56:08 -08:00
Jean Massucatto
71863b73a3 fix(themes): correct action icons size and restore missing tooltips (#37409) 2026-01-29 21:27:49 -08:00
Jean Massucatto
95663c4619 fix(deckgl): change deck gl Path default line width unit to meters (#37248) 2026-01-29 14:54:39 -08:00
Mehmet Salih Yavuz
9adcd7a451 fix(Multilayer): preserve dashboard context for embedded (#37495) 2026-01-29 14:15:10 -08:00
Felipe López
2c0f00c8e4 fix(charts): numerical column for the Point Radius field in mapbox (#36962)
(cherry picked from commit 675a4c7a66)
2026-01-29 14:15:06 -08:00
Vanessa Giannoni
7ddfda9576 fix(explore): remove extra spacing when Advanced Analytics section is hidden (#37456)
(cherry picked from commit 7110fc9cde)
2026-01-29 14:10:55 -08:00
Gabriel Torres Ruiz
72d28d7a0f fix(dashboard): catch DatasourceNotFound in get_datasets to prevent 404 (#37503) 2026-01-29 14:10:55 -08:00
Reynold Morel
a7aad1beff fix(dashboard): resolve dropdown popup positioning (#36963) 2026-01-29 14:10:50 -08:00
Vanessa Giannoni
c4bbf1beae fix(dashboard-filters): prevent clearing all filters when editing a native filter (#37253)
(cherry picked from commit ec2509a8b4)
2026-01-29 14:10:46 -08:00
Jean Massucatto
4f8d977940 fix(select): prevent bulk action buttons from being cut off in filters (#37453)
(cherry picked from commit abf90de0ca)
2026-01-28 12:09:15 -08:00
Vanessa Giannoni
cedce39c09 fix(ag-grid-table): preserve time grain aggregation when temporal column casing changes (#36990)
(cherry picked from commit a7e7cc30a9)
2026-01-27 11:31:42 -08:00
isaac-jaynes-imperva
84972a7d6b fix(database): include configuration_method in the DB export/import flow (#36958)
Co-authored-by: codeant-ai-for-open-source[bot] <244253245+codeant-ai-for-open-source[bot]@users.noreply.github.com>
(cherry picked from commit 3f37cdbf9c)
2026-01-26 12:04:05 -08:00
Felipe López
3d71e69a68 fix(charts): missing globalOpacity prop with mapbox (#37168) 2026-01-26 11:49:37 -08:00
Yousuf Ansari
3895db430a fix(deckgl-contour): prevent WebGL freeze by clamping and auto-scaling cellSize (#37244)
(cherry picked from commit b09e60c1ec)
2026-01-26 10:44:32 -08:00
Ramiro Aquino Romero
9239a8ee83 fix: display correct icon for Multi Chart in quick switcher (#37256)
(cherry picked from commit 8aebfe1105)
2026-01-26 10:02:44 -08:00
Martyn Gigg
26c4b09b45 fix(superset-frontend): Fixes for broken functionality when an application root is defined (#36058)
(cherry picked from commit e4f649e49c)
2026-01-26 09:36:05 -08:00
Christian Geier
c912b93770 fix(datasets): respect application root in database management link (#36986)
(cherry picked from commit 34418d7e0b)
2026-01-23 14:39:25 -08:00
Joe Li
5796871919 fix(time-range-modal): time range modal for out of scope filter is not displayed correctly (#36996)
Cherry-picked from 54919c9 with adaptation for 6.0 branch:

Accepted:
- FilterControls.tsx: Fix for overflowedByIndex calculation that now considers
  filterBarOrientation - out-of-scope filters in vertical mode are in a Collapse
  panel and should not be marked as overflowed
- DateFilterLabel.test.tsx: New tests for isOverflowingFilterBar prop behavior

Rejected:
- FilterControls.test.tsx: Incompatible with 6.0 - uses ChartCustomizationType,
  ChartCustomizationDivider, and props that don't exist in this branch version

Original commit: 54919c942a

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 13:43:15 -08:00
Jean Massucatto
054040be85 fix(dataset-editor): add missing Data type label in calculated columns tab (#37165)
(cherry picked from commit 04c5517206)
2026-01-23 13:38:06 -08:00
Gabriel Torres Ruiz
c3a7048c10 fix(sqllab): add colorEditorSelection token for visible text selection (#36932) 2026-01-22 11:50:54 -08:00
Ramiro Aquino Romero
6b8409baf0 fix(api): nan is not properly handled for athena connections (#37071)
(cherry picked from commit fadab21493)
2026-01-22 11:07:10 -08:00
Rafael Benitez
0773e25383 fix: pin remark-gfm to v3.0.1 for compatibility with react-markdown v8 (#36388)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit daec330127)
2026-01-21 13:58:59 -08:00
Luis Sánchez
da63984a21 fix(chart): Horizontal bar chart value labels cut off (#36989) 2026-01-21 13:38:00 -08:00
Ramiro Aquino Romero
444f49c6cf fix(delete-filter): deleted native filters are still shown until [sc-96553] (#37012) 2026-01-20 10:58:39 -08:00
Luis Sánchez
9f359f9124 fix(timeseries): x-axis last month was hidden (#37181)
(cherry picked from commit f4597be341)
2026-01-19 11:41:57 -08:00
Jamile Celento
cfa0f03e88 fix(native-filters): enable Apply button when selecting Boolean FALSE value (#37017)
(cherry picked from commit 4393db57d9)
2026-01-19 09:32:10 -08:00
Geidō
682599d7de fix(Dashboard): Auto-apply filters with default values when extraForm… (#36927)
(cherry picked from commit 2900258e05)
2026-01-19 09:31:02 -08:00
Jean Massucatto
b4b900adce fix(calendar-heatmap): correct month display across timezones (#37064)
(cherry picked from commit 2e29e33dd8)
2026-01-19 08:43:26 -08:00
tiya-9975
1a8bea4072 fix(sunburst): make Show Total text theme-aware (#37177)
Co-authored-by: DarshCode123 <darshjain193@gmail.com>
Co-authored-by: SBIN2010 <Sbin2010@mail.ru>
(cherry picked from commit f984dca5cc)
2026-01-19 08:38:44 -08:00
Yousuf Ansari
82e172dd3e fix(mixed-timeseries): prevent duplicate legend entries (#37217)
(cherry picked from commit a77c2d550c)
2026-01-19 08:37:44 -08:00
Brandon Sovran
261944713c fix: Implement SIP-40 error styles for GAQ (#36596)
(cherry picked from commit 0f56e3b9ae)
2026-01-16 16:03:45 -08:00
Pedro Rodrigues
0d7947c7fc feat: add droppable area to tab empty state (#37210)
(cherry picked from commit 4b1d92e575)
2026-01-16 15:48:26 -08:00
Kamil Gabryjelski
bb7e56d8cc fix: HTML detection in tables (#37171)
(cherry picked from commit 54f19856de)
2026-01-16 10:42:52 -08:00
Kamil Gabryjelski
e643a47deb fix: Move head_custom_extra above csrf token input (#37173)
(cherry picked from commit ab8df1ab34)
2026-01-16 10:42:21 -08:00
Mehmet Salih Yavuz
2083622f18 fix(controls): Only initialize categorical control on numeric x axis (#37115)
(cherry picked from commit 6eb4db6930)
2026-01-15 16:55:26 -08:00
Reynold Morel
98c8ffa0df fix(dashboard): revert cell hover and active colors to grayscale (#36991)
(cherry picked from commit 0404c99e39)
2026-01-14 15:38:15 -08:00
Jonathan Alberth Quispe Fuentes
b183f04fa5 fix(table): keep d3-format semantics when applying currency formatting (#37039)
(cherry picked from commit ad3812edd7)
2026-01-13 11:01:33 -08:00
Damian Pendrak
3fcebdb1cb fix(deckgl): remove visibility condition in deckgl stroke color (#37029)
(cherry picked from commit 2a38ce001e)
2026-01-12 14:36:13 -08:00
ankitajhanwar2001
81149348f1 fix(sqlglot): use Athena dialect for awsathena parsing (#36747)
(cherry picked from commit d8f7ae83ee)
2026-01-12 14:36:13 -08:00
Amin Ghadersohi
7566a551ed fix(models): prevent SQLAlchemy and_() deprecation warning (#37020)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
(cherry picked from commit 911d72c957)
2026-01-12 14:36:13 -08:00
Mehmet Salih Yavuz
e5192481c6 fix(reports): Use authenticated user as recipient for chart/dashboard reports (#36981)
(cherry picked from commit 4f5789abfe)
2026-01-12 14:36:13 -08:00
Mehmet Salih Yavuz
aa3b497262 fix(Tabs): prevent infinite rerenders with nested tabs (#37018)
(cherry picked from commit 0294c30c9e)
2026-01-12 14:35:43 -08:00
Levis Mbote
e67e602892 fix: handle undefined template variables safely in query rendering. (#35009)
(cherry picked from commit dfdf8e75d8)
2026-01-07 10:54:23 -08:00
Gabriel Torres Ruiz
fe9202ee0b fix(alerts): wrong alert trigger with custom query (#35871)
(cherry picked from commit 5edaed2e5b)
2026-01-07 10:53:46 -08:00
Evan Rusackas
c4fd5759af fix(security): enforce datasource access control in get_samples() (#36550)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 861e5cd013)
2026-01-07 10:52:24 -08:00
amaannawab923
977ff44851 fix(ag-grid): Ag Grid Date Filter timezone correction (#36270)
(cherry picked from commit d7d94ba640)
2026-01-07 10:51:51 -08:00
Joe Li
d3ba4c7b21 fix(dashboard): prevent table chart infinite reload loop (#36686)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
(cherry picked from commit c026ae2ce7)
2026-01-06 14:37:40 -08:00
Felipe López
16f1bb5b88 fix(SQLLab): remove error icon displayed when writing Jinja SQL even when the script is correct (#36422)
(cherry picked from commit cedc35e39f)
2026-01-06 11:51:55 -08:00
JUST.in DO IT
68c03f501c fix(trino): update query progress using cursor stats (#36872)
(cherry picked from commit 12a266fd2f)
2026-01-06 09:58:58 -08:00
Enzo Martellucci
cdb0317be8 fix(plugin-chart-table): remove column misalignment when no scrollbars are present (#36891)
(cherry picked from commit 740ddc03e2)
2026-01-05 11:59:00 -08:00
innovark
d3eec7772a fix(RightMenu): fix inconsistent icon alignment in RightMenu items (#36532)
(cherry picked from commit d07a452e9b)
2026-01-05 11:57:55 -08:00
innovark
0022644b84 fix(SavedQueries): unify query card actions styling across all home page cards (#36671)
(cherry picked from commit e5489bd30f)
2026-01-05 11:57:26 -08:00
Levis Mbote
7702515c53 fix(logout): clicking logout displays an error notification "invalid username or password" (#36490) 2026-01-05 11:56:26 -08:00
Luis Sánchez
6042099296 fix(TableChart): render cell bars for columns with NULL values (#36819) 2026-01-05 11:50:32 -08:00
Mehmet Salih Yavuz
0503983d59 fix: Clear database form errors (#36854) 2026-01-05 11:37:13 -08:00
Enzo Martellucci
668026eeac fix: SqlLab error when collapsing the left panel preview (#36858)
Co-authored-by: Diego Pucci <diegopucci.me@gmail.com>
2026-01-05 11:24:46 -08:00
Enzo Martellucci
3d644e6918 fix(chart-creation): use exact match when loading dataset from URL parameter (#36831)
(cherry picked from commit fe5d5fdae6)
2026-01-05 08:47:01 -08:00
Levis Mbote
747b4c0125 fix: fix error with dashboard filters when global async queries is enabled and user navigates quickly (#36639) 2026-01-05 08:45:54 -08:00
Mehmet Salih Yavuz
fee1f16bfe fix(TableCollection): only apply highlight class when defined (#36809)
(cherry picked from commit 28c802fb6c)
2025-12-29 13:11:06 -08:00
Enzo Martellucci
3b15ff3d83 fix: UI cut off (#36531)
Co-authored-by: Diego Pucci <diegopucci.me@gmail.com>
(cherry picked from commit 32c98d02d3)
2025-12-29 13:11:05 -08:00
Vitor Avila
9e9e8ce056 fix: Use is_active for guest users (#36716)
(cherry picked from commit 737a5162e4)
2025-12-17 13:35:28 -08:00
Yousuf Ansari
cc428c7a5c fix(echarts): use scroll legend for horizontal layouts to prevent overlap (#36306)
(cherry picked from commit 33a425bbbc)
2025-12-17 12:01:25 -08:00
SBIN2010
8a92092d7e fix: removed dashboard from main page in "All" tab, refreshes dashboard list (#35945) 2025-12-17 12:00:00 -08:00
Evan Rusackas
cffaffd769 fix(dashboard): import with overwrite flag replaces charts instead of merging (#36551)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 52c711b0bc)
2025-12-17 11:20:47 -08:00
Evan Rusackas
c5c72bbad7 fix(sql): handle backtick-quoted identifiers with base dialect (#36545)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit c7a4d4f2cc)
2025-12-16 15:25:27 -08:00
Alexandru Soare
4588d84929 fix(tab): Fix tabs in column not clickable (#36528)
(cherry picked from commit 8b1c41a012)
2025-12-16 15:24:35 -08:00
Evan Rusackas
844c3e1279 fix(api): Fix JWT authentication for /api/v1/me endpoints (#36410)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 1f5df7407f)
2025-12-16 15:22:35 -08:00
Elizabeth Thompson
8e70875d6b fix: add subdirectory deployment support for app icon and reports urls (#35098)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Daniel Gaspar <danielvazgaspar@gmail.com>
(cherry picked from commit b35b1d7633)
2025-12-15 14:17:22 -08:00
Luis Sánchez
03e5001e0e fix(SqlLab): enhance SQL formatting with Jinja template support. (#36277)
(cherry picked from commit e7c060466d)
2025-12-15 10:09:51 -08:00
Risheit Munshi
cbd27802a8 fix(chart): Display better hover text for country map charts (#36323)
Co-authored-by: askinner1 <144823527+askinner1@users.noreply.github.com>
Co-authored-by: codeant-ai-for-open-source[bot] <244253245+codeant-ai-for-open-source[bot]@users.noreply.github.com>
(cherry picked from commit 67cf287c03)
2025-12-15 09:59:53 -08:00
Shunki
df28ce4deb fix(roles): Add missing SQLLab permissions for estimate and format (#36263)
(cherry picked from commit 440cbc4c1f)
2025-12-15 09:17:06 -08:00
Sam Firke
1236a8582e fix(heatmap): y-axis sorts in order (#36302)
Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit 3345eb32c5)
2025-12-08 15:42:23 -08:00
Enzo Martellucci
b1c57c1fc8 fix(Gauge): clearing previously set min and max values in a gauge chart sets the data labels to 0 (#36425)
Co-authored-by: Diego Pucci <diegopucci.me@gmail.com>
(cherry picked from commit 236e000398)
2025-12-08 15:41:30 -08:00
Elizabeth Thompson
66a7a0a690 fix(reports): simplify logging to focus on timing metrics (#36227)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Vitor Avila <vitorfragadeavila@gmail.com>
(cherry picked from commit c36ac53445)
2025-12-08 15:41:30 -08:00
Gabriel Torres Ruiz
3ce1687725 fix(echarts): pass vizType to enable theme overrides in all chart types (#36389)
(cherry picked from commit 1d8d30e5bb)
2025-12-08 15:30:04 -08:00
yousoph
3e42dd8511 fix: button text capitalization (#36444) 2025-12-08 13:48:10 -08:00
Joe Li
6a1c30e5e7 chore: update changelog for 6.0.0rc4 2025-12-04 10:55:36 -08:00
Felipe López
e763c96381 fix(SQLLab): most recent queries at the top in Query History without refreshing the page (#36359)
(cherry picked from commit 62d86aba14)
2025-12-03 10:17:30 -08:00
Beto Dealmeida
0753fd4c45 fix: is_column_reference check (#36382)
(cherry picked from commit d05ab91d11)
2025-12-02 13:15:39 -08:00
om pharate
3a537498f6 feat(controlPanel): add integer validation for rows per page setting (#36289)
(cherry picked from commit 01f032017f)
2025-12-01 14:46:28 -08:00
Daniel Vaz Gaspar
8f061d0c0a fix(log): remove unwanted info from logs REST API (#36269)
(cherry picked from commit bae716fa83)
2025-11-25 16:07:35 -08:00
Daniel Vaz Gaspar
e0e52086cd fix: remove unwanted info from tags REST API (#36266)
(cherry picked from commit cd36845d56)
2025-11-25 08:41:39 -08:00
Enzo Martellucci
2a21ef6dc9 fix: Columns bleeding into other cells (#36134)
Co-authored-by: Diego Pucci <diegopucci.me@gmail.com>
Co-authored-by: Geidō <60598000+geido@users.noreply.github.com>
(cherry picked from commit 062e4a2922)
2025-11-25 08:41:01 -08:00
Enzo Martellucci
72fbaa6677 fix: Table chart types headers are offset from the columns in the table (#36190)
Co-authored-by: Diego Pucci <diegopucci.me@gmail.com>
(cherry picked from commit ab8352ee66)
2025-11-25 08:40:15 -08:00
Enzo Martellucci
6d49d1e182 fix: Extra controls width for Area Chart on dashboards (#36133)
Co-authored-by: Diego Pucci <diegopucci.me@gmail.com>
(cherry picked from commit cac6ffcd3c)
2025-11-25 08:39:46 -08:00
Elizabeth Thompson
5b51c7e89e fix(screenshots): Only cache thumbnails when image generation succeeds (#36126)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 08c1d03479)
2025-11-25 08:38:39 -08:00
Beto Dealmeida
74f455f076 fix: adhoc column quoting (#36215)
(cherry picked from commit e303537e0c)
2025-11-21 13:43:04 -08:00
Daniel Vaz Gaspar
a911a50680 fix(sqllab): validate results backend writes and enhance 410 diagnostics (#36222)
(cherry picked from commit 348b19cb4c)
2025-11-21 11:18:33 -08:00
Enzo Martellucci
5b820699e8 fix(dashboard): adjust vertical spacing for numerical range filter to prevent overlaps (#36167)
(cherry picked from commit 6d359161bb)
2025-11-20 09:25:55 -08:00
Joe Li
c3308f4447 chore: update changelog for 6.0.0rc3 2025-11-19 16:07:14 -08:00
Beto Dealmeida
9cfd35d43a chore: bump duckdb et al. (#36171)
(cherry picked from commit 53207302f9)
2025-11-19 13:55:45 -08:00
Evan Rusackas
785a6d0237 chore(docs): config Kapa to use logo from the repo (#36177)
(cherry picked from commit cdbd5bf4f9)
2025-11-19 13:48:28 -08:00
Richard Fogaca Nienkotter
71be38f003 fix(dashboard): ensure charts re-render when visibility state changes (#36011)
(cherry picked from commit 4582f0e8d2)
2025-11-19 13:47:44 -08:00
Enzo Martellucci
f3db80bfee fix(datasets): prevent viewport overflow in dataset creation page (#36166)
(cherry picked from commit a268232ed6)
2025-11-18 14:23:20 -08:00
SBIN2010
6cc46750b9 fix: role list edit modal height (#36123)
(cherry picked from commit 43e9e1ec36)
2025-11-18 11:00:58 -08:00
Richard Fogaca Nienkotter
c9a7f2d02e fix(cache): apply dashboard filters to non-legacy visualizations (#36109)
(cherry picked from commit 8315804c85)
2025-11-18 11:00:20 -08:00
Richard Fogaca Nienkotter
3c5868c412 fix: 'save and go to dashboard' option was disabled after changing the chart type (#36122)
(cherry picked from commit a9fd600c52)
2025-11-18 10:59:13 -08:00
PolinaFam
4112fecc93 fix(translations): Fix Russian translations for EmptyState (#34055)
Co-authored-by: Polina Fam <pfam@ptsecurity.com>
(cherry picked from commit fb325a8f24)
2025-11-18 10:51:03 -08:00
Yuvraj Singh Chauhan
ea1ab05e8d fix(tags): ensure tag creation is compatible with MySQL by avoiding Markup objects (#36075)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit 28bdec2c79)
2025-11-18 10:49:04 -08:00
Beto Dealmeida
0e3092dd56 fix(datasets): prevent double time filter application in virtual datasets (#35890)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 3b226038ba)
2025-11-18 10:48:18 -08:00
Gabriel Torres Ruiz
91814f3dfe fix(navbar): some styling + components inconsistencies (#36120)
(cherry picked from commit 9bff64824b)
2025-11-17 15:06:20 -08:00
Yong Le He
c9501fddb8 fix(dashboard): ensure world map chart uses correct country code format in crossfilter (#35919)
(cherry picked from commit fb8eb2a5c3)
2025-11-17 11:38:21 -08:00
Levis Mbote
fe58baa23c fix: fix crossfilter persisting after removal (#35998)
(cherry picked from commit 85413f2a65)
2025-11-17 11:35:58 -08:00
SBIN2010
19ebeea030 fix: opacity color formating (#36101) 2025-11-14 15:53:42 -08:00
Joe Li
18ed2290bc fix(table-chart): fix missing table header IDs (#35968)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-14 15:53:24 -08:00
Richard Fogaca Nienkotter
79ec265a30 fix: save button was enabled even no changes were made to the dashboard (#35817) 2025-11-14 14:24:47 -08:00
Janani Gurram
aab835a096 fix(histogram): add NULL handling for histogram (#35693)
Co-authored-by: Rachel Pan <r.pan@mail.utoronto.ca>
Co-authored-by: Rachel Pan <panrrachel@gmail.com>
Co-authored-by: Janani Gurram <68124448+JG-ctrl@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit c955a5dc08)
2025-11-14 13:58:38 -08:00
Beto Dealmeida
b19372fe16 fix: RLS in virtual datasets (#36061)
(cherry picked from commit f3e620cd0f)
2025-11-14 13:58:26 -08:00
Enzo Martellucci
a083e189e2 fix(ace-editor-popover): main AntD popover closes when clicking autocomplete suggestions in Ace Editor (#35986)
(cherry picked from commit 9ef87e75d5)
2025-11-14 12:51:52 -08:00
Richard Fogaca Nienkotter
0f5918dbd9 fix(chart): align legend with chart grid in List mode for Top/Bottom orientations (#36077)
(cherry picked from commit 37d58a476c)
2025-11-14 12:24:03 -08:00
Richard Fogaca Nienkotter
3a54cade44 fix(dashboard): prevent tab content cutoff and excessive whitespace in empty tabs (#35834)
(cherry picked from commit 78f9debdd4)
2025-11-14 12:13:55 -08:00
Mehmet Salih Yavuz
cbdbc2c295 fix(dashboard): refresh tabs as they load when dashboard is refreshed (#35265)
(cherry picked from commit 74a590cb76)
2025-11-14 12:12:17 -08:00
Richard Fogaca Nienkotter
548480bd8e fix(explore): re-apply filters when 'Group remaining as Others' is enabled (#35937)
(cherry picked from commit 4a04d46118)
2025-11-13 22:12:28 -08:00
Vitor Avila
6179eb9ef4 fix: Use singlestoredb dialect for sqlglot (#36096)
(cherry picked from commit 6701d0ae0c)
2025-11-13 22:10:06 -08:00
Gabriel Torres Ruiz
15c4ee63b2 fix(navbar): Minor fixes in navbar spacings (#36091)
(cherry picked from commit 4515d18ddd)
2025-11-13 22:09:32 -08:00
Mehmet Salih Yavuz
89a36ea131 fix(sql): quote column names with spaces to prevent SQLGlot parsing errors (#35553)
(cherry picked from commit 306f4c14cf)
2025-11-13 22:08:42 -08:00
Levis Mbote
2d0017033c fix: fix tabs overflow in dashboards (#35984)
(cherry picked from commit bb2e2a5ed6)
2025-11-13 21:21:11 -08:00
Richard Fogaca Nienkotter
1a4ae81058 fix(dashboard): dashboard filter was incorrectly showing as out of scope (#35886)
Co-authored-by: Mehmet Salih Yavuz <salih.yavuz@proton.me>
(cherry picked from commit a45c0528da)
2025-11-13 19:41:20 -08:00
Richard Fogaca Nienkotter
c9d8baf9a1 fix(dashboard): align filter bar elements vertically in horizontal mode (#36036)
(cherry picked from commit d123249bd2)
2025-11-12 10:53:18 -08:00
Richard Fogaca Nienkotter
a2fcb64ef3 fix(sqllab): prevent unwanted tab switching when autocompleting table names on SQL Lab (#35992)
(cherry picked from commit 9fbfcf0ccd)
2025-11-12 10:42:01 -08:00
Richard Fogaca Nienkotter
8a84b17270 fix: saved query preview modal not highlighting active rows (#35866)
(cherry picked from commit 4376476ec4)
2025-11-12 10:41:06 -08:00
Mehmet Salih Yavuz
992cb83088 fix(permalink): exclude edit mode from dashboard permalink (#35889)
(cherry picked from commit e2e831e322)
2025-11-12 10:40:15 -08:00
Joe Li
8c43578b70 fix(explore): show validation errors in View Query modal (#35969)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 21d585d586)
2025-11-11 17:19:26 -08:00
Kamil Gabryjelski
933ec0a918 fix: Flakiness around scrolling during taking tiled screenshots with Playwright (#36051)
(cherry picked from commit 63dfd95aa2)
2025-11-10 11:56:32 -08:00
Mehmet Salih Yavuz
70117eb55f fix(date_parser): add check for time range timeshifts (#36039)
(cherry picked from commit c9f65cf1c2)
2025-11-10 10:08:45 -08:00
Elizabeth Thompson
8c22e61ef1 fix(reports): improve error handling for report schedule execution (#35800)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit c42e3c6837)
2025-11-10 10:08:39 -08:00
Elizabeth Thompson
bed186b32f fix(filters): preserve backend metric-based sorting (#35152)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 909bd877c9)
2025-11-07 12:06:02 -08:00
Vedant Prajapati
a52cfef8b1 fix(echarts): Series style hidden for line charts (#33677)
Co-authored-by: Vedant Prajapati <vedantprajapati@geotab.com>
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 258512fef2)
2025-11-07 12:04:11 -08:00
Kamil Gabryjelski
3b7a52d1eb fix: Ensure that Playwright tile height is always positive (#36027)
(cherry picked from commit 728bc2c632)
2025-11-07 12:03:10 -08:00
amaannawab923
d8c8430ed7 fix(Context-Menu): Fixing Context Menu for Table Chart with Html Content (#33791)
(cherry picked from commit 0307c71945)
2025-11-07 12:02:20 -08:00
Gabriel Torres Ruiz
bc3f146eaf fix(UI): spacings + UI fixes (#36010)
(cherry picked from commit c11be72ead)
2025-11-07 11:18:29 -08:00
Mehmet Salih Yavuz
1245a1e26a fix(SelectFilterPlugin): clear all clears all filters including dependent ones (#35303)
(cherry picked from commit af37e12de4)
2025-11-06 19:42:21 -08:00
Enzo Martellucci
446136b46c fix(view-in-sqllab): unable to open virtual dataset after discarding chart edits (#35931)
(cherry picked from commit 392b880b52)
2025-11-06 18:05:12 -08:00
ethan-l-geotab
33e53143e6 fix(chart list): Facepile shows correct users when saving chart properties (#33392)
(cherry picked from commit 14f20e644e)
2025-11-06 17:23:56 -08:00
Enzo Martellucci
706a04be7f fix(DatabaseModal): prevent errors when pasting text into supported database select (#35916)
(cherry picked from commit 1f960d5761)
2025-11-06 17:23:23 -08:00
Mehmet Salih Yavuz
2c86d1ae9c fix(explore): Overwriting a chart updates the form_data_key (#35888)
(cherry picked from commit 3f49938b79)
2025-11-06 16:04:45 -08:00
Mehmet Salih Yavuz
8bc1f98033 fix(TimeTable): Match calculations between filtered and non filtered states (#35619)
(cherry picked from commit 04231c86db)
2025-11-06 16:00:21 -08:00
Rafael Benitez
f7ebdd71e7 fix(dashboard): fix dataset search in filter config modal (#35488)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 53687ae659)
2025-11-06 14:23:45 -08:00
Mehmet Salih Yavuz
c48b5ad65e fix(DatasourceEditor): preserve calculated column order when editing sql (#35790)
(cherry picked from commit 7265567561)
2025-11-04 11:59:56 -08:00
Joe Li
8e4efe2cc2 test(useThemeMenuItems): fix race conditions by awaiting all userEvent calls (#35918)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 5224347c39)
2025-11-03 10:42:29 -08:00
Richard Fogaca Nienkotter
e818d0b11f fix(sqllab): align refresh buttons with select input fields (#35917)
(cherry picked from commit 27011d0239)
2025-11-03 10:42:03 -08:00
Joe Li
e0a4b98351 fix(explore): formatting the SQL in "View Query" pop-up doesn't format (#35898)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit be3690c22b)
2025-11-03 10:41:36 -08:00
Yuvraj Singh Chauhan
131359c78f fix(db2): update time grain expressions for DAY to use DATE function (#35848)
(cherry picked from commit 30d584afd1)
2025-10-31 09:52:37 -07:00
Ville Brofeldt
6267856b0d fix: set pandas 2.1 as requirement (#35912)
(cherry picked from commit f6f15f58ee)
2025-10-31 09:48:04 -07:00
Beto Dealmeida
ce21b04621 chore: bump shillelagh to 1.4.3 (#35895)
(cherry picked from commit 5fc934d859)
2025-10-30 12:30:15 -07:00
SBIN2010
1fdb3210f9 fix: displaying cell bars in table (#35885)
(cherry picked from commit dd857a2c7a)
2025-10-30 11:55:11 -07:00
Amin Ghadersohi
e21cb9a6d9 fix: add utc=True to pd.to_datetime for timezone-aware datetimes (#35587)
(cherry picked from commit 5c57c9c0b2)
2025-10-29 10:52:38 -07:00
Elizabeth Thompson
3f6f53569f fix(reports): Add celery task execution ID to email notification logs (#35807)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 61c68f7b8f)
2025-10-29 10:51:43 -07:00
Mehmet Salih Yavuz
87f36d2b2f fix(echarts): fix time shift color matching functionality (#35826)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 5218b4eea2)
2025-10-29 10:51:06 -07:00
innovark
36c14f81f3 fix: update Russian translations (#35750)
(cherry picked from commit 61758c07d2)
2025-10-28 13:34:26 -07:00
Joe Li
e5ee7a0a15 fix(theme): add fontWeightStrong to allowedAntdTokens to fix bold markdown rendering (#35821)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit bf830b2dd5)
2025-10-28 13:33:41 -07:00
Martyn Gigg
78a53484fc fix(sqllab): Fix CSV export button href in SQL Lab when application root is defined (#35118)
(cherry picked from commit 6704c0aaec)
2025-10-28 12:55:36 -07:00
Mehmet Salih Yavuz
5ecd067ed3 fix(SqlLab): South pane visual changes (#35601)
(cherry picked from commit 6e60a00d69)
2025-10-28 11:39:24 -07:00
ngokturkkarli
78983a6f25 fix(native-filters): prevent circular dependencies and improve dependency handling (#35317)
(cherry picked from commit 0bf34d4d6f)
2025-10-28 10:49:54 -07:00
Levis Mbote
4d996cec5e fix(database-modal): fix issue where commas could not be typed into DB configuration. (#35289)
(cherry picked from commit 19473af401)
2025-10-28 10:48:34 -07:00
Daniel Vaz Gaspar
41ac8d8d9c fix: unpin holidays and prophet (#35771)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 51aad52e6c)
2025-10-28 10:47:02 -07:00
Elizabeth Thompson
d1feafb400 fix(dashboard): handle invalid thumbnail BytesIO objects gracefully (#35808)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 7c9720e22b)
2025-10-28 10:45:05 -07:00
Marcos Amorim
877997ceda fix(alerts): improve Slack API rate limiting for large workspaces (#35622)
(cherry picked from commit c3b8c96db6)
2025-10-28 10:44:07 -07:00
Joe Li
26177314db docs(db_engine_specs): restructure feature table for GitHub rendering (#35809)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 93cb60b24e)
2025-10-28 10:42:28 -07:00
Gabriel Torres Ruiz
a3aef76427 fix(ag-grid): fix conditional formatting theme colors and module extensibility (#35605)
(cherry picked from commit 5e4a80e5d0)
2025-10-23 16:26:54 -07:00
Richard Fogaca Nienkotter
fc222eefb7 fix: edit dataset modal visual fixes (#35799)
(cherry picked from commit 1234533c67)
2025-10-23 11:01:48 -07:00
Mehmet Salih Yavuz
36bacf2ae4 fix(ThemeController): replace fetch with SupersetClient for proper auth (#35794)
(cherry picked from commit 7f0c0aea94)
2025-10-22 11:47:27 -07:00
Mehmet Salih Yavuz
bda2d8c145 fix(security): Add active property to guest user (#35454)
(cherry picked from commit 98fba1eefe)
2025-10-22 11:45:44 -07:00
Geidō
a30b212a37 fix(Actions): Improper spacing (#35724)
(cherry picked from commit bad03b1e76)
2025-10-21 14:32:26 -07:00
Erkka Tahvanainen
b07011872b fix(playwright): Download dashboard correctly (#35484)
Co-authored-by: Erkka Tahvanainen <erkka.tahvanainen@confidently.fi>
(cherry picked from commit d089a96163)
2025-10-20 15:52:31 -07:00
yousoph
23b02963b6 fix(charts): update axis title labels to sentence case (#35694)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 9ab0a0179d)
2025-10-17 13:29:02 -07:00
Sam Firke
80fce9a662 fix(auth): redirect anonymous attempts to view dashboard with next (#35345) 2025-10-17 12:53:08 -07:00
Beto Dealmeida
3bfd4efa21 fix(dataset): render default URL description properly in settings (#35669)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit f405174fcf)
2025-10-16 16:50:46 -07:00
Gabriel Torres Ruiz
151633a1fd fix(theme-crud): enable overwrite confirmation UI for theme imports (#35558)
(cherry picked from commit de1dd53186)
2025-10-15 18:23:00 -07:00
Gabriel Torres Ruiz
fe7823cc10 fix(table-chart): fix page size label visibility and improve header control wrapping (#35648)
(cherry picked from commit 58672dfab6)
2025-10-15 18:22:44 -07:00
Rafael Benitez
f7a64f05c5 fix(theme): align "Clear local theme" option with other theme menu items (#35651)
(cherry picked from commit 4b5629d1c8)
2025-10-15 18:22:30 -07:00
Elizabeth Thompson
35861f7ec0 fix: Log Celery task failures with a signal handler (#35595)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit ccc0e3dbb2)
2025-10-15 16:06:57 -07:00
innovark
7abe5c379e fix(d3-format): call setupFormatters synchronously to apply D3 format… (#35529)
(cherry picked from commit c38ba1daa8)
2025-10-14 14:22:24 -07:00
Damian Pendrak
36f23a003f fix(deckgl): scatterplot fix categorical color (#35537) 2025-10-14 14:19:36 -07:00
Luiz Otavio
412d9c8cbc fix(csv upload): Correctly casting to string numbers with floating points (e+) (#35586)
(cherry picked from commit 17ebbdd966)
2025-10-10 14:32:26 -07:00
Elizabeth Thompson
c799f5cedd fix(alerts): log execution_id instead of report schedule name in query timing (#35592)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit e437ae1f2f)
2025-10-10 12:30:56 -07:00
Mehmet Salih Yavuz
1d6d12cfb4 fix(tables): Dark mode scrollbar styles for webkit (#35338)
(cherry picked from commit 412587ad41)
2025-10-10 12:26:03 -07:00
Mehmet Salih Yavuz
b41ad89474 fix(Alerts): Correct icon sizes (#35572)
(cherry picked from commit 5a15c632ad)
2025-10-09 09:38:41 -07:00
Daniel Vaz Gaspar
52993e68e1 fix: dataset update with invalid SQL query (#35543)
(cherry picked from commit 50a5854b25)
2025-10-08 17:13:41 -07:00
Gabriel Torres Ruiz
2a474e017a fix(charts): fix legend theming and hollow symbols in dark mode (#35123)
(cherry picked from commit 7fd5a7668b)
2025-10-08 15:08:16 -07:00
Rafael Benitez
8d4a1cfc05 fix(chart): Fixes BigNumber gradient appearing blackish in light mode (#35527)
(cherry picked from commit f7b9d7a64b)
2025-10-07 10:56:17 -07:00
Mehmet Salih Yavuz
6c82d480a7 fix(explore): Include chart canvases in the screenshot (#35491)
(cherry picked from commit 89932fa0b2)
2025-10-07 10:55:47 -07:00
Daniel Vaz Gaspar
f6b050d270 fix: update chart with dashboards validation (#35523)
(cherry picked from commit 9d50f1b8a2)
2025-10-07 10:35:43 -07:00
Amin Ghadersohi
22c8551d64 fix(webdriver): add missing options object to WebDriver initialization (#35504)
(cherry picked from commit 77c3146829)
2025-10-06 13:43:08 -07:00
Vitor Avila
37e280f5bd fix: Support metric macro for embedded users (#35508)
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
(cherry picked from commit 4545d55d30)
2025-10-06 13:42:40 -07:00
Rafael Benitez
bc1fda5a4a fix(explore): correct search icon in dashboard submenu (#35489)
(cherry picked from commit a7b158c7fa)
2025-10-06 13:42:07 -07:00
Mehmet Salih Yavuz
0a6b3de884 fix(Select): Prevent closing the select when clicking on a tag (#35487)
(cherry picked from commit d39c55e941)
2025-10-06 13:39:57 -07:00
Elizabeth Thompson
012765cd0b fix(loading): improve loading screen theming for dark mode support (#35129)
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-06 11:44:32 -07:00
Tran Ngoc Tuan
b633bc5577 fix(security-manager): switch from deprecated get_session to session attribute (#35290)
(cherry picked from commit 04b1a45416)
2025-10-03 16:33:53 -07:00
Beto Dealmeida
d5fa2d86f0 fix(sqlglot): adhoc expressions (#35482)
(cherry picked from commit 139b5ae20c)
2025-10-03 11:28:20 -07:00
Mehmet Salih Yavuz
8dbbbbf136 fix(dashboard): Navigate to new dashboard when saved as a new one (#35339)
(cherry picked from commit 891f826143)
2025-10-03 11:27:41 -07:00
Mehmet Salih Yavuz
e61a0dd619 fix(theming): CRUD view padding (#35321)
(cherry picked from commit 0e2fb1d1a3)
2025-10-03 11:26:00 -07:00
amaannawab923
24a84a23f2 fix(ag-grid-table): remove enterprise features to use community version (#35453)
(cherry picked from commit 96170e43c0)
2025-10-03 11:25:32 -07:00
Beto Dealmeida
e4cbc5db4c fix(cache): ensure SQL is sanitized before cache key generation (#35419)
(cherry picked from commit 62dc5c0306)
2025-10-02 10:59:44 -07:00
Beto Dealmeida
e0e8d1d177 fix(pinot): more functions (#35451)
(cherry picked from commit 3202ff4b3f)
2025-10-02 10:57:56 -07:00
Gabriel Torres Ruiz
b47dc64cd5 fix(dashboard): exit markdown edit mode when clicking outside of element (#35336)
(cherry picked from commit 553204e613)
2025-10-02 10:57:35 -07:00
Rafael Benitez
61bf39f0d5 fix(dataset): sort by database in Dataset and Saved queries Issue (#35277)
(cherry picked from commit fe8348c03a)
2025-10-02 10:57:19 -07:00
Beto Dealmeida
efbfcd737d fix(pinot): SUBSTR function (#35427)
(cherry picked from commit 30021f8ede)
2025-10-02 10:57:00 -07:00
Beto Dealmeida
4c60bd1392 fix(pinot): DATE_SUB function (#35426)
(cherry picked from commit f3349388d0)
2025-10-02 10:56:46 -07:00
Antonio Rivero
6420d06fc0 fix(slice): Fix using isdigit when id passed as int (#35452)
(cherry picked from commit 449a89c214)
2025-10-02 10:56:23 -07:00
Beto Dealmeida
51396f0b94 fix(pinot): DATE_ADD function (#35424)
(cherry picked from commit 5428376662)
2025-10-02 10:56:08 -07:00
Beto Dealmeida
6bb13ef3b4 fix(pinot): dialect date truncation (#35420)
Co-authored-by: bito-code-review[bot] <188872107+bito-code-review[bot]@users.noreply.github.com>
(cherry picked from commit aa97d2fe03)
2025-10-01 13:15:17 -07:00
Beto Dealmeida
b842eeb893 fix: table quoting in DBs with supports_cross_catalog_queries=True (#35350)
(cherry picked from commit 13a164dd63)
2025-10-01 13:14:35 -07:00
Rafael Benitez
50e2a06306 fix(explore): close unsaved changes modal when discarding changes (#35307)
(cherry picked from commit d8688cf8b1)
2025-10-01 13:14:08 -07:00
Geidō
e80f44716c fix(SqlLab): Hit tableschemaview with a valid queryEditorId (#35341)
(cherry picked from commit a66c230058)
2025-10-01 13:13:29 -07:00
Beto Dealmeida
94d10af733 fix(pinot): restrict types in dialect (#35337)
(cherry picked from commit bf88d9bb1c)
2025-09-30 13:52:42 -07:00
Beto Dealmeida
8d49999af6 fix: adhoc orderby in explore (#35342)
(cherry picked from commit d51b35f61b)
2025-09-30 13:52:30 -07:00
Beto Dealmeida
927c94306e feat: sqlglot dialect for Pinot (#35333)
(cherry picked from commit 4e093a8e2a)
2025-09-30 10:55:26 -07:00
Mehmet Salih Yavuz
5074ee0af8 fix(doris): Don't set supports_cross_catalog_queries to true (#35332)
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
(cherry picked from commit ef78d2af06)
2025-09-30 10:12:35 -07:00
Geidō
7ba76a85f4 fix: AceEditor Autocomplete Highlight (#35316)
(cherry picked from commit 90f281f585)
2025-09-29 16:14:53 -07:00
Elizabeth Thompson
d9646dedd9 fix(DatasourceModal): replace imperative modal updates with declarative state (#35256)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 82e2bc6181)
2025-09-29 14:17:28 -07:00
Gabriel Torres Ruiz
ac582322b8 fix(sqllab): fix blank bottom section in SQL Lab left panel (#35309)
(cherry picked from commit 784ff82847)
2025-09-29 09:45:29 -07:00
Mehmet Salih Yavuz
d2d99d4698 fix(DateFilterControl): remove modal overlay style to fix z-index issues (#35292)
(cherry picked from commit 027b25e6b8)
2025-09-29 09:42:26 -07:00
SBIN2010
76d13176a1 fix(table): New ad-hoc columns retain the name of previous columns (#35274)
(cherry picked from commit b652fab042)
2025-09-29 09:42:01 -07:00
Geidō
f6209e1ca9 fix: Cosmetic issues (#35122) 2025-09-25 16:34:27 -07:00
Mehmet Salih Yavuz
97649d7290 fix(BuilderComponentPane): navigation tabs padding (#35213)
(cherry picked from commit 7a9dbfe879)
2025-09-25 10:38:10 -07:00
Giulio Piccolo
df0f6f6ec3 fix(deck.gl): ensure min/max values are included in polygon map legend breakpoints (#35033)
Co-authored-by: bito-code-review[bot] <188872107+bito-code-review[bot]@users.noreply.github.com>
(cherry picked from commit 0de78d8203)
2025-09-25 10:38:00 -07:00
Beto Dealmeida
0a89b306e5 fix(SQL Lab): syncTable on new tabs (#35216)
(cherry picked from commit 94686ddfbe)
2025-09-24 14:10:52 -07:00
SBIN2010
7263133c52 fix(Mixed Chart): Tooltip incorrectly displays numbers with optional Y-axis format and showQueryIdentifiers set to true (#35224)
(cherry picked from commit ec322dfd8d)
2025-09-24 14:10:37 -07:00
Elizabeth Thompson
a4e3d21176 fix(dashboard): update header border to use colorBorder token (#35199)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit b6f6b75348)
2025-09-24 13:44:06 -07:00
Mehmet Salih Yavuz
485ff97b0f fix(ConditionalFormattingControl): icon color in dark mode (#35243)
(cherry picked from commit c601341520)
2025-09-23 12:01:22 -07:00
Levis Mbote
1621c70b68 fix(table-chart): fix cell bar visibility in dark theme (#35211)
(cherry picked from commit ce55cc7dd7)
2025-09-23 12:00:51 -07:00
Gabriel Torres Ruiz
13b7bbe9a4 feat(bug): defensive code to avoid accesing attribute of a NoneType object (#35219)
(cherry picked from commit 48e1b1ff2c)
2025-09-23 12:00:17 -07:00
Joe Li
886f525545 chore: Adds RC2 data to CHANGELOG.md 2025-09-22 12:30:01 -07:00
Beto Dealmeida
b76a0e1d2d chore: bump sqlglot to 27.15.2 (#35176)
(cherry picked from commit 5ec8f9d886)
2025-09-22 10:23:01 -07:00
Mehmet Salih Yavuz
542efcdb11 fix(SQLPopover): Use correct component (#35212)
(cherry picked from commit 076e477fd4)
2025-09-22 10:22:49 -07:00
SBIN2010
0ac7464649 fix: bug in tooltip timeseries chart in calculated total with annotation layer (#35179)
(cherry picked from commit 1e4bc6ee78)
2025-09-21 18:30:22 -07:00
Pat Buxton
e5bb8bf0ff fix: Bump pandas to 2.1.4 for python 3.12 (#34999)
(cherry picked from commit db178cf527)
2025-09-21 18:30:12 -07:00
SBIN2010
8306b66515 fix(Funnel): onInit overridden row_limit to default value on save chart (#35076)
(cherry picked from commit 23bb4f88c0)
2025-09-21 18:29:59 -07:00
Levis Mbote
9a0dc23755 fix(gantt-chart): fix Y-axis label visibility in dark theme (#35189)
(cherry picked from commit 4130b92966)
2025-09-21 18:29:28 -07:00
marun
5561f529f2 fix(CrudThemeProvider): Optimized theme loading logic (#35155)
(cherry picked from commit 1bf112a57a)
2025-09-21 18:29:03 -07:00
marun
b0ceb2a162 fix(embedded): resolve theme context error in Loading component (#35168)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 1f530d45cb)
2025-09-21 18:28:36 -07:00
Maxime Beauchemin
7fde43b476 fix(viz): resolve dark mode compatibility issues in BigNumber and Heatmap (#35151)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 05c6a1bf20)
2025-09-16 13:49:36 -07:00
SBIN2010
99519cd4ce fix: import bug template params (#35144)
(cherry picked from commit c193d6d6a1)
2025-09-16 13:49:05 -07:00
Joe Li
9525742b56 fix(deck.gl): restore legend display for Polygon charts with linear palette and fixed color schemes (#35142)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit fb840b8e71)
2025-09-16 13:48:25 -07:00
Elizabeth Thompson
ad7acecbf2 fix: Remove emotion-rgba from dependencies and codebase (#35124)
(cherry picked from commit 19ddcb7e5c)
2025-09-15 12:00:14 -07:00
Gabriel Torres Ruiz
a423f8ecda fix(ListView): implement AntD pagination for ListView component (#35057)
(cherry picked from commit 36daa2dc3f)
2025-09-12 18:56:26 -07:00
Mehmet Salih Yavuz
1265b3d3e5 fix(theming): Lighter text colors on dark mode (#35114)
(cherry picked from commit 95333e34b1)
2025-09-12 17:09:19 -07:00
Daniel Vaz Gaspar
b2fd9e2fb1 fix: Bump FAB to 5.X (#33055)
Co-authored-by: Joe Li <joe@preset.io>
(cherry picked from commit a9fb853e3e)
2025-09-12 17:07:53 -07:00
Michael S. Molina
f3163e1c27 fix: SQL Lab tab events (#35105)
(cherry picked from commit e729b2dbb4)
2025-09-12 16:18:10 -07:00
SBIN2010
8c1fdcb179 fix: page size options 'all' correct in table and remove PAGE_SIZE_OPTIONS in handlebars (#35095)
(cherry picked from commit 06261f262b)
2025-09-12 15:43:06 -07:00
Priyanshu Kumar
eb2b4bfc30 fix(pie): fixes pie chart other click error (#35086)
(cherry picked from commit b42060c880)
2025-09-12 15:42:54 -07:00
Gabriel Torres Ruiz
5baee67df7 fix(theming): replace error color with bolt icon for local themes (#35090)
(cherry picked from commit 7bf16d805d)
2025-09-12 15:42:44 -07:00
Rafael Benitez
e8562bc641 fix(templates): Restores templates files accidentally removed (#35094)
(cherry picked from commit 529adebe1b)
2025-09-12 15:41:52 -07:00
Rafael Benitez
dedc10065e fix(settingsMenu): Version (#35096)
(cherry picked from commit 5a2411fa64)
2025-09-12 15:40:53 -07:00
LisaHusband
4dedfac238 fix(drill-to-detail): ensure axis label filters map to original column names (#34694)
Co-authored-by: bito-code-review[bot] <188872107+bito-code-review[bot]@users.noreply.github.com>
(cherry picked from commit a7d349a5c6)
2025-09-10 10:05:24 -07:00
Mehmet Salih Yavuz
2c870e8528 fix(timeshifts): Add missing feature flag to enum (#35072)
(cherry picked from commit 912ed2ba80)
2025-09-10 10:04:45 -07:00
Nicolas
baee1ab82b fix(Table Chart): render null dates properly (#34558)
(cherry picked from commit 65376c7baf)
2025-09-10 10:04:05 -07:00
SBIN2010
a8cf0981fa fix(table): table search input placeholder (#35064)
(cherry picked from commit c5f220a9ff)
2025-09-09 10:08:09 -07:00
catpineapple
8768a3f55a fix(tests): one of integration test in TestSqlaTableModel does not support MySQL "concat" (#35007)
Co-authored-by: Mehmet Salih Yavuz <salih.yavuz@proton.me>
(cherry picked from commit 9efb80dbf4)
2025-09-08 14:12:21 -07:00
Luiz Otavio
cf1902a4cc fix: Upload CSV as Dataset (#34763)
(cherry picked from commit 1c2b9db4f0)
2025-09-08 14:12:10 -07:00
Gabriel Torres Ruiz
d94c92db01 fix(dashboard): normalize spacings and background colors (#35001)
(cherry picked from commit 0fce5ecfa5)
2025-09-08 12:01:18 -07:00
Rafael Benitez
acec8743c0 fix(theming): Icons in ExecutionLogList and Country map chart tooltip theme consistency (#34828)
(cherry picked from commit bef1f4d045)
2025-09-08 12:01:06 -07:00
SBIN2010
9918670315 fix: mixed timeseries chart add legend margin (#35036)
(cherry picked from commit 5a3182ce21)
2025-09-08 11:55:31 -07:00
Damian Pendrak
997e000f6b fix(chart): change "No query." to "Query cannot be loaded" in Multi Layer Deck.gl Chart (#34973)
(cherry picked from commit c65cb284e6)
2025-09-05 11:17:17 -07:00
JUST.in DO IT
428c97a1d6 fix(echarts): rename time series shifted for isTimeComparisonValue (#35022)
(cherry picked from commit bc54b7970a)
2025-09-05 11:15:50 -07:00
SBIN2010
7996359719 fix: display legend mixed timeseries chart (#35005)
(cherry picked from commit 031fb4b5a8)
2025-09-05 11:04:15 -07:00
Evan Rusackas
444b98b95e fix(sql): Add Impala dialect support to sqlglot parser (#34662)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Joe Li <joe@preset.io>
(cherry picked from commit 7fb7ac8bef)
2025-09-04 16:25:30 -07:00
Mehmet Salih Yavuz
b51eda51ce fix(theming): more visual bugs (#34987)
(cherry picked from commit 569a7b33a5)
2025-09-04 16:25:10 -07:00
Mehmet Salih Yavuz
8a3dcadf87 fix(RoleListEditModal): display user's other properties in table (#35017)
(cherry picked from commit 59df0d6f15)
2025-09-04 16:22:36 -07:00
catpineapple
07fd60fe20 fix: doris genericDataType modify (#35011)
(cherry picked from commit 2e51d02806)
2025-09-04 16:20:40 -07:00
sha174n
06ada5472e fix(deps): expand pyarrow version range to <19 (#34870)
(cherry picked from commit 8406a827dd)
2025-09-03 22:39:53 -07:00
Joe Li
22826ba876 fix(tests): resolve AlertReportModal checkmark test failures (#34995) 2025-09-03 22:29:11 -07:00
JUST.in DO IT
dbe0845dc0 fix(ui-core): Invalid postTransform process (#34874)
(cherry picked from commit 448a28545b)
2025-09-03 18:12:41 -07:00
JUST.in DO IT
0c045127e4 fix(sqllab): autocomplete and delete tabs (#34781)
(cherry picked from commit cefd046ea0)
2025-09-03 18:09:12 -07:00
Gabriel Torres Ruiz
f69bdf5475 fix(error-handling): jinja2 error handling improvements (#34803) 2025-09-03 17:52:08 -07:00
Vitor Avila
d5a523db25 fix(databricks): string escaper v2 (#34991)
(cherry picked from commit 0de5b28716)
2025-09-03 11:40:44 -07:00
Evan Rusackas
38b456bc8a fix(charts): Handle virtual dataset names without schema prefix correctly (#34760)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit b5ae402c12)
2025-09-02 13:41:41 -07:00
Evan Rusackas
e1efc87fdc fix(echarts): Display NULL values in categorical x-axis for bar charts (#34761)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 682cdcc3e0)
2025-09-02 13:41:09 -07:00
Mehmet Salih Yavuz
e84bdfaa6d fix(ChartCreation): Translate chart description (#34918)
(cherry picked from commit 5dba59b6a4)
2025-09-02 13:40:35 -07:00
Daniel Vaz Gaspar
930038d763 chore: bump FAB to 4.8.1 (#34838)
(cherry picked from commit 54af1cb2c8)
2025-09-02 13:37:46 -07:00
Daniel Vaz Gaspar
d30cd5dc2a fix: playwright feature flag evaluation (#34978)
(cherry picked from commit b2f8803486)
2025-09-02 11:23:27 -07:00
Gabriel Torres Ruiz
714a03e007 fix(TimeTable): use type-only export for TableChartProps to resolve webpack warnings (#34989)
(cherry picked from commit 744fa1f54c)
2025-09-02 11:22:43 -07:00
Gabriel Torres Ruiz
026e016720 fix(dashboard): table charts render correctly after tab switch and refresh (#34975)
(cherry picked from commit 6a4b1df3a2)
2025-09-02 11:22:01 -07:00
Beto Dealmeida
5442521e18 fix: Athena quoting (#34895)
(cherry picked from commit fad3cb3162)
2025-09-02 10:11:58 -07:00
Maxime Beauchemin
b8426b92c7 fix: revert mistake setting TALISMAN_ENABLED=False (#34909)
(cherry picked from commit bc9ec6ac63)
2025-09-02 10:10:03 -07:00
Gabriel Torres Ruiz
2f086475f8 fix(theming): fix TimeTable chart issues (#34868)
(cherry picked from commit d183969744)
2025-09-02 10:03:36 -07:00
Maxime Beauchemin
1c95ea5ab8 fix: complete theme management system import/export (#34850)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 4695be5cc5)
2025-09-02 10:03:08 -07:00
Kamil Gabryjelski
a3a2c494cc fix: Improve table layout and column sizing (#34887)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 175835138c)
2025-09-02 10:02:35 -07:00
Sam Firke
d6cc324798 fix(drilling): drill by pagination works with MSSQL data source, cont. (#34724)
(cherry picked from commit c5a84c0985)
2025-09-02 10:00:40 -07:00
Kamil Gabryjelski
5756d25a7c fix: Filter bar orientation submenu should not be highlighted (#34900)
(cherry picked from commit e463743fcf)
2025-08-29 10:28:36 -07:00
Joe Li
b16d6ed224 fix(ConfirmStatusChange): remove deprecated event.persist() to fix headless browser crashes (#34864)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit ebfb14c353)
2025-08-28 09:52:25 -07:00
Joe Li
18e8b064de fix(tests): Improve MessageChannel mocking to prevent worker force exits (#34878)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 7946ec003f)
2025-08-28 09:52:03 -07:00
Kamil Gabryjelski
0c0dfc0601 fix: SelectControl default sort numeric choices by value (#34858)
(cherry picked from commit 665a11f821)
2025-08-28 09:51:15 -07:00
Kamil Gabryjelski
c80b8fea85 fix: Undefined error when viewing query in Explore + visual fixes (#34869)
(cherry picked from commit 5566eb8dd6)
2025-08-28 09:50:37 -07:00
Joe Li
160a8fe16c fix(tests): Mock MessageChannel to prevent Jest hanging from rc-overflow (#34871)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 836540e8c9)
2025-08-27 23:19:01 -07:00
Kamil Gabryjelski
fc80861f47 fix: Remove the underline from the right section of main menu (#34855)
(cherry picked from commit b74a244950)
2025-08-27 12:01:38 -07:00
Kamil Gabryjelski
7169d9f2bd fix: DB icon sizes in database add modal (#34854)
(cherry picked from commit ab58b0a8a3)
2025-08-27 12:00:55 -07:00
Kamil Gabryjelski
37347525e7 fix(dashboard): Anchor link positions (#34843)
(cherry picked from commit 97b35a4640)
2025-08-27 12:00:10 -07:00
JUST.in DO IT
b6aa68dbfc fix(sqllab): Missing executed sql value in the result table (#34846)
(cherry picked from commit b89b0bdf5d)
2025-08-27 11:58:49 -07:00
Vitor Avila
e4f371b126 fix: Avoid dataset drill request if no perm (#34665)
(cherry picked from commit 9c9588cce6)
2025-08-27 11:58:18 -07:00
Vitor Avila
d0d816047c fix: Add dataset ID to file name on exports (#34782)
(cherry picked from commit 471d9fe737)
2025-08-27 11:57:07 -07:00
Rafael Benitez
2e28e22596 fix(theming): explore chart type style fixes, nav right menu spacing fixed (#34795)
(cherry picked from commit b381992a75)
2025-08-25 10:24:11 -07:00
Beto Dealmeida
a475d68693 fix: make get_image() always return BytesIO (#34801)
(cherry picked from commit 1204507d68)
2025-08-25 10:23:57 -07:00
Kamil Gabryjelski
dfd36f5a54 chore: Add instruction for LLMs to use antd theme tokens (#34800)
(cherry picked from commit c7779578f9)
2025-08-25 10:23:40 -07:00
Kamil Gabryjelski
ea5ebd2ec9 fix: Unexpected overflow ellipsis dots after status icon in Dashboard list (#34798)
(cherry picked from commit b225432c55)
2025-08-25 10:23:27 -07:00
Kamil Gabryjelski
d454a22f1c fix(echarts): Series labels hard to read in dark mode (#34815)
(cherry picked from commit 547f297171)
2025-08-25 10:23:14 -07:00
Joe Li
d01934d9d8 fix(Icons): Add missing data-test and aria-label attributes to custom icons (#34809)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 5c3c2599db)
2025-08-25 10:22:58 -07:00
Michael S. Molina
25775504b9 fix: User-provided Jinja template parameters causing SQL parsing errors (#34802)
(cherry picked from commit e1234b2264)
2025-08-23 11:17:15 -07:00
JUST.in DO IT
4cc6984ebf fix: customize column description limit size in db_engine_spec (#34808)
(cherry picked from commit 75af53dc3d)
2025-08-23 11:16:43 -07:00
Mehmet Salih Yavuz
548d9e6f7b fix(DetailsPanel): Applied filters colors (#34790)
(cherry picked from commit 2b2cc96f11)
2025-08-23 11:15:57 -07:00
Kamil Gabryjelski
1adaf20ccb fix(native-filters): Low contrast of empty state in dark mode (#34812)
(cherry picked from commit 59c01e016d)
2025-08-23 11:15:20 -07:00
Kamil Gabryjelski
7e9658fad6 fix: Low contrast in viz creator selected tag in dark mode (#34811)
(cherry picked from commit 3895b8b127)
2025-08-23 11:14:53 -07:00
Kamil Gabryjelski
5ff6679804 fix: Remove border around textarea in dashboard edit mode (#34814)
(cherry picked from commit da8c0f94e6)
2025-08-23 11:14:25 -07:00
Kamil Gabryjelski
0899496ca5 fix: Misaligned global controls in Table chart (#34799)
(cherry picked from commit 6908a733a0)
2025-08-23 11:13:35 -07:00
Gabriel Torres Ruiz
e2a469c32d fix(dashboard): enable undo/redo buttons for layout changes (#34777)
(cherry picked from commit ff1f7b64e2)
2025-08-23 11:11:46 -07:00
Maxime Beauchemin
2ffc1b95ba fix: Check migration status before initializing database-dependent features (#34679)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit c568d463b9)
2025-08-21 14:05:27 -07:00
Tomáš Karela Procházka
3b3aa1e302 fix: default value in run-server.sh (#34719)
(cherry picked from commit 179a6f2cfe)
2025-08-21 14:04:59 -07:00
Elizabeth Thompson
958b29acbc fix: catch no table error (#32640)
(cherry picked from commit 695a20d009)
2025-08-21 14:04:08 -07:00
Mehmet Salih Yavuz
f0cfd17dc5 fix(PivotExcelExport): select correct chart for export (#34793)
(cherry picked from commit e908775fb2)
2025-08-21 14:03:38 -07:00
Joe Li
ebfddb2b39 fix(tests): make SingleStore test_adjust_engine_params version-agnostic (#34780)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit af05396227)
2025-08-21 09:43:34 -07:00
amaannawab923
e10b6e8ae9 fix(webpack): Bump webpack dev-server to handle Errors on Firefox where error object is not defined (#34791)
(cherry picked from commit 277f03c207)
2025-08-21 09:42:35 -07:00
Evan Rusackas
18d4acdee9 fix(sqllab): Fix save query modal closing prematurely on new tabs (#34765)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit 48699a7194)
2025-08-21 09:41:48 -07:00
PolinaFam
c199213e8e fix(translations): Fix translation of time-related strings like "7 seconds ago", "a minute ago", etc (#34051)
Co-authored-by: Polina Fam <pfam@ptsecurity.com>
(cherry picked from commit b45141b2a1)
2025-08-21 09:40:38 -07:00
Joe Li
91834bbede fix: Fix TypeError in Slice.get() method when using filter_by() with BinaryExpression (#34769)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit 9de1706baa)
2025-08-20 11:24:12 -07:00
Evan Rusackas
7253c79959 fix(duckdb): Add support for DuckDB-specific numeric types (#34743)
Co-authored-by: Claude <noreply@anthropic.com>
(cherry picked from commit a42185cd3b)
2025-08-20 11:04:06 -07:00
JUST.in DO IT
04738c716c fix(sqllab): Invisible grid table due to the invalid height (#34683)
(cherry picked from commit 89eb7b207c)
2025-08-20 11:03:42 -07:00
Michael S. Molina
928dbe43e0 fix: Users can't skip column sync when saving virtual datasets (#34757)
(cherry picked from commit f99022b242)
2025-08-19 09:51:22 -07:00
JUST.in DO IT
3f597a6551 fix(sqllab): Reduce flushing caused by ID updates (#34720)
(cherry picked from commit f8b9e3ace4)
2025-08-19 09:50:52 -07:00
JUST.in DO IT
3661482eb3 chore(saved_query): Copy link to clipboard before redirect to edit (#34567) (#34758)
(cherry picked from commit 9cbe5a90b8)
2025-08-19 09:50:25 -07:00
Mehmet Salih Yavuz
9443fe8b78 fix(RightMenu): Move RightMenu carets to the right side (#34756)
(cherry picked from commit f7fe617f4c)
2025-08-19 09:50:02 -07:00
Kamil Gabryjelski
453241eb33 fix: Highlight outline of numerical range and time range filters (#34705)
(cherry picked from commit 6969f2cf7a)
2025-08-19 09:49:32 -07:00
Joe Li
a5f7d236ac chore: Adds RC1 data to CHANGELOG.md and UPDATING.md 2025-08-18 14:38:54 -07:00
1694 changed files with 42896 additions and 78964 deletions

View File

@@ -1,10 +0,0 @@
# JavaScript to TypeScript Migration Command
## Usage
```
/js-to-ts <core-filename>
```
- `<core-filename>` - Path to CORE file relative to `superset-frontend/` (e.g., `src/utils/common.js`, `src/middleware/loggerMiddleware.js`)
## Agent Instructions
**See:** [../projects/js-to-ts/AGENT.md](../projects/js-to-ts/AGENT.md) for complete migration guide.

View File

@@ -1,684 +0,0 @@
# JavaScript to TypeScript Migration Agent Guide
**Complete technical reference for converting JavaScript/JSX files to TypeScript/TSX in Apache Superset frontend.**
**Agent Role:** Atomic migration unit - migrate the core file + ALL related tests/mocks as one cohesive unit. Use `git mv` to preserve history, NO `git commit`. NO global import changes. Report results upon completion.
---
## 🎯 Migration Principles
1. **Atomic migration units** - Core file + all related tests/mocks migrate together
2. **Zero `any` types** - Use proper TypeScript throughout
3. **Leverage existing types** - Reuse established definitions
4. **Type inheritance** - Derivatives extend base component types
5. **Strategic placement** - File types for maximum discoverability
6. **Surgical improvements** - Enhance existing types during migration
---
## Step 0: Dependency Check (MANDATORY)
**Command:**
```bash
grep -E "from '\.\./.*\.jsx?'|from '\./.*\.jsx?'|from 'src/.*\.jsx?'" superset-frontend/{filename}
```
**Decision:**
- ✅ No matches → Proceed with atomic migration (core + tests + mocks)
- ❌ Matches found → EXIT with dependency report (see format below)
---
## Step 1: Identify Related Files (REQUIRED)
**Atomic Migration Scope:**
For core file `src/utils/example.js`, also migrate:
- `src/utils/example.test.js` / `src/utils/example.test.jsx`
- `src/utils/example.spec.js` / `src/utils/example.spec.jsx`
- `src/utils/__mocks__/example.js`
- Any other related test/mock files found by pattern matching
**Find all related test and mock files:**
```bash
# Pattern-based search for related files
basename=$(basename {filename} .js)
dirname=$(dirname superset-frontend/{filename})
# Find test files
find "$dirname" -name "${basename}.test.js" -o -name "${basename}.test.jsx"
find "$dirname" -name "${basename}.spec.js" -o -name "${basename}.spec.jsx"
# Find mock files
find "$dirname" -name "__mocks__/${basename}.js"
find "$dirname" -name "${basename}.mock.js"
```
**Migration Requirement:** All discovered related files MUST be migrated together as one atomic unit.
**Test File Creation:** If NO test files exist for the core file, CREATE a minimal test file using the following pattern:
- Location: Same directory as core file
- Name: `{basename}.test.ts` (e.g., `DebouncedMessageQueue.test.ts`)
- Content: Basic test structure importing and testing the main functionality
- Use proper TypeScript types in test file
---
## 🗺️ Type Reference Map
### From `@superset-ui/core`
```typescript
// Data & Query
QueryFormData, QueryData, JsonObject, AnnotationData, AdhocMetric
LatestQueryFormData, GenericDataType, DatasourceType, ExtraFormData
DataMaskStateWithId, NativeFilterScope, NativeFiltersState, NativeFilterTarget
// UI & Theme
FeatureFlagMap, LanguagePack, ColorSchemeConfig, SequentialSchemeConfig
```
### From `@superset-ui/chart-controls`
```typescript
Dataset, ColumnMeta, ControlStateMapping
```
### From Local Types (`src/types/`)
```typescript
// Authentication
User, UserWithPermissionsAndRoles, BootstrapUser, PermissionsAndRoles
// Dashboard
Dashboard, DashboardState, DashboardInfo, DashboardLayout, LayoutItem
ComponentType, ChartConfiguration, ActiveFilters
// Charts
Chart, ChartState, ChartStatus, ChartLinkedDashboard, Slice, SaveActionType
// Data
Datasource, Database, Owner, Role
// UI Components
TagType, FavoriteStatus, Filter, ImportResourceName
```
### From Domain Types
```typescript
// src/dashboard/types.ts
RootState, ChartsState, DatasourcesState, FilterBarOrientation
ChartCrossFiltersConfig, ActiveTabs, MenuKeys
// src/explore/types.ts
ExplorePageInitialData, ExplorePageState, ExploreResponsePayload, OptionSortType
// src/SqlLab/types.ts
[SQL Lab specific types]
```
---
## 🏗️ Type Organization Strategy
### Type Placement Hierarchy
1. **Component-Colocated** (90% of cases)
```typescript
// Same file as component
interface MyComponentProps {
title: string;
onClick: () => void;
}
```
2. **Feature-Shared**
```typescript
// src/[domain]/components/[Feature]/types.ts
export interface FilterConfiguration {
filterId: string;
targets: NativeFilterTarget[];
}
```
3. **Domain-Wide**
```typescript
// src/[domain]/types.ts
export interface ExploreFormData extends QueryFormData {
viz_type: string;
}
```
4. **Global**
```typescript
// src/types/[TypeName].ts
export interface ApiResponse<T> {
result: T;
count?: number;
}
```
### Type Discovery Commands
```bash
# Search existing types before creating
find superset-frontend/src -name "types.ts" -exec grep -l "[TypeConcept]" {} \;
grep -r "interface.*Props\|type.*Props" superset-frontend/src/
```
### Derivative Component Patterns
**Rule:** Components that extend others should extend their type interfaces.
```typescript
// ✅ Base component type
interface SelectProps {
value: string | number;
options: SelectOption[];
onChange: (value: string | number) => void;
disabled?: boolean;
}
// ✅ Derivative extends base
interface ChartSelectProps extends SelectProps {
charts: Chart[];
onChartSelect: (chart: Chart) => void;
}
// ✅ Derivative with modified props
interface DatabaseSelectProps extends Omit<SelectProps, 'value' | 'onChange'> {
value: number; // Narrowed type
onChange: (databaseId: number) => void; // Specific signature
}
```
**Common Patterns:**
- **Extension:** `extends BaseProps` - adds new props
- **Omission:** `Omit<BaseProps, 'prop'>` - removes props
- **Modification:** `Omit<BaseProps, 'prop'> & { prop: NewType }` - changes prop type
- **Restriction:** Override with narrower types (union → specific)
---
## 📋 Migration Recipe
### Step 2: File Conversion
```bash
# Use git mv to preserve history
git mv component.js component.ts
git mv Component.jsx Component.tsx
```
### Step 3: Import & Type Setup
```typescript
// Import order (enforced by linting)
import { FC, ReactNode } from 'react';
import { JsonObject, QueryFormData } from '@superset-ui/core';
import { Dataset } from '@superset-ui/chart-controls';
import type { Dashboard } from 'src/types/Dashboard';
```
### Step 4: Function & Component Typing
```typescript
// Functions with proper parameter/return types
export function processData(
data: Dataset[],
config: JsonObject
): ProcessedData[] {
// implementation
}
// Component props with inheritance
interface ComponentProps extends BaseProps {
data: Chart[];
onSelect: (id: number) => void;
}
const Component: FC<ComponentProps> = ({ data, onSelect }) => {
// implementation
};
```
### Step 5: State & Redux Typing
```typescript
// Hooks with specific types
const [data, setData] = useState<Chart[]>([]);
const [selected, setSelected] = useState<number | null>(null);
// Redux with existing RootState
const mapStateToProps = (state: RootState) => ({
charts: state.charts,
user: state.user,
});
```
---
## 🧠 Type Debugging Strategies (Real-World Learnings)
### The Evolution of Type Approaches
When you hit type errors, follow this debugging evolution:
#### 1. ❌ Idealized Union Types (First Attempt)
```typescript
// Looks clean but doesn't match reality
type DatasourceInput = Datasource | QueryEditor;
```
**Problem**: Real calling sites pass variations, not exact types.
#### 2. ❌ Overly Precise Types (Second Attempt)
```typescript
// Tried to match exact calling signatures
type DatasourceInput =
| IDatasource // From DatasourcePanel
| (QueryEditor & { columns: ColumnMeta[] }); // From SaveQuery
```
**Problem**: Too rigid, doesn't handle legacy variations.
#### 3. ✅ Flexible Interface (Final Solution)
```typescript
// Captures what the function actually needs
interface DatasourceInput {
name?: string | null; // Allow null for compatibility
datasource_name?: string | null; // Legacy variations
columns?: any[]; // Multiple column types accepted
database?: { id?: number };
// ... other optional properties
}
```
**Success**: Works with all calling sites, focuses on function needs.
### Type Debugging Process
1. **Start with compilation errors** - they show exact mismatches
2. **Examine actual usage** - look at calling sites, not idealized types
3. **Build flexible interfaces** - capture what functions need, not rigid contracts
4. **Iterate based on downstream validation** - let calling sites guide your types
---
## 🚨 Anti-Patterns to Avoid
```typescript
// ❌ Never use any
const obj: any = {};
// ✅ Use proper types
const obj: Record<string, JsonObject> = {};
// ❌ Don't recreate base component props
interface ChartSelectProps {
value: string; // Duplicated from SelectProps
onChange: () => void; // Duplicated from SelectProps
charts: Chart[]; // New prop
}
// ✅ Inherit and extend
interface ChartSelectProps extends SelectProps {
charts: Chart[]; // Only new props
}
// ❌ Don't create ad-hoc type variations
interface UserInfo {
name: string;
email: string;
}
// ✅ Extend existing types (DRY principle)
import { User } from 'src/types/bootstrapTypes';
type UserDisplayInfo = Pick<User, 'firstName' | 'lastName' | 'email'>;
// ❌ Don't create overly rigid unions
type StrictInput = ExactTypeA | ExactTypeB;
// ✅ Create flexible interfaces for function parameters
interface FlexibleInput {
// Focus on what the function actually needs
commonProperty: string;
optionalVariations?: any; // Allow for legacy variations
}
```
## 📍 DRY Type Guidelines (WHERE TYPES BELONG)
### Type Placement Rules
**CRITICAL**: Type variations must live close to where they belong, not scattered across files.
#### ✅ Proper Type Organization
```typescript
// ❌ Don't create one-off interfaces in utility files
// src/utils/datasourceUtils.ts
interface DatasourceInput { /* custom interface */ } // Wrong!
// ✅ Use existing types or extend them in their proper domain
// src/utils/datasourceUtils.ts
import { IDatasource } from 'src/explore/components/DatasourcePanel';
import { QueryEditor } from 'src/SqlLab/types';
// Create flexible interface that references existing types
interface FlexibleDatasourceInput {
// Properties that actually exist across variations
}
```
#### Type Location Hierarchy
1. **Domain Types**: `src/{domain}/types.ts` (dashboard, explore, SqlLab)
2. **Component Types**: Co-located with components
3. **Global Types**: `src/types/` directory
4. **Utility Types**: Only when they truly don't belong elsewhere
#### ✅ DRY Type Patterns
```typescript
// ✅ Extend existing domain types
interface SaveQueryData extends Pick<QueryEditor, 'sql' | 'dbId' | 'catalog'> {
columns: ColumnMeta[]; // Add what's needed
}
// ✅ Create flexible interfaces for cross-domain utilities
interface CrossDomainInput {
// Common properties that exist across different source types
name?: string | null; // Accommodate legacy null values
// Only include properties the function actually uses
}
```
---
## 🎯 PropTypes Auto-Generation (Elegant Approach)
**IMPORTANT**: Superset has `babel-plugin-typescript-to-proptypes` configured to automatically generate PropTypes from TypeScript interfaces. Use this instead of manual PropTypes duplication!
### ❌ Manual PropTypes Duplication (Avoid This)
```typescript
export interface MyComponentProps {
title: string;
count?: number;
}
// 8+ lines of manual PropTypes duplication 😱
const propTypes = PropTypes.shape({
title: PropTypes.string.isRequired,
count: PropTypes.number,
});
export default propTypes;
```
### ✅ Auto-Generated PropTypes (Use This)
```typescript
import { InferProps } from 'prop-types';
export interface MyComponentProps {
title: string;
count?: number;
}
// Single validator function - babel plugin auto-generates PropTypes! ✨
export default function MyComponentValidator(props: MyComponentProps) {
return null; // PropTypes auto-assigned by babel-plugin-typescript-to-proptypes
}
// Optional: For consumers needing PropTypes type inference
export type MyComponentPropsInferred = InferProps<typeof MyComponentValidator>;
```
### Migration Pattern for Type-Only Files
**When migrating type-only files with manual PropTypes:**
1. **Keep the TypeScript interfaces** (single source of truth)
2. **Replace manual PropTypes** with validator function
3. **Remove PropTypes imports** and manual shape definitions
4. **Add InferProps import** if type inference needed
**Example Migration:**
```typescript
// Before: 25+ lines with manual PropTypes duplication
export interface AdhocFilterType { /* ... */ }
const adhocFilterTypePropTypes = PropTypes.oneOfType([...]);
// After: 3 lines with auto-generation
export interface AdhocFilterType { /* ... */ }
export default function AdhocFilterValidator(props: { filter: AdhocFilterType }) {
return null; // Auto-generated PropTypes by babel plugin
}
```
### Component PropTypes Pattern
**For React components, the babel plugin works automatically:**
```typescript
interface ComponentProps {
title: string;
onClick: () => void;
}
const MyComponent: FC<ComponentProps> = ({ title, onClick }) => {
// Component implementation
};
// PropTypes automatically generated by babel plugin - no manual work needed!
export default MyComponent;
```
### Auto-Generation Benefits
- ✅ **Single source of truth**: TypeScript interfaces drive PropTypes
- ✅ **No duplication**: Eliminate 15-20 lines of manual PropTypes code
- ✅ **Automatic updates**: Changes to TypeScript automatically update PropTypes
- ✅ **Type safety**: Compile-time checking ensures PropTypes match interfaces
- ✅ **Backward compatibility**: Existing JavaScript components continue working
### Babel Plugin Configuration
The plugin is already configured in `babel.config.js`:
```javascript
['babel-plugin-typescript-to-proptypes', { loose: true }]
```
**No additional setup required** - just use TypeScript interfaces and the plugin handles the rest!
---
## 🧪 Test File Migration Patterns
### Test File Priority
- **Always migrate test files** alongside production files
- **Test files are often leaf nodes** - good starting candidates
- **Create tests if missing** - Leverage new TypeScript types for better test coverage
### Test-Specific Type Patterns
```typescript
// Mock interfaces for testing
interface MockStore {
getState: () => Partial<RootState>; // Partial allows minimal mocking
}
// Type-safe mocking for complex objects
const mockDashboardInfo: Partial<DashboardInfo> as DashboardInfo = {
id: 123,
json_metadata: '{}',
};
// Sinon stub typing
let postStub: sinon.SinonStub;
beforeEach(() => {
postStub = sinon.stub(SupersetClient, 'post');
});
// Use stub reference instead of original method
expect(postStub.callCount).toBe(1);
expect(postStub.getCall(0).args[0].endpoint).toMatch('/api/');
```
### Test Migration Recipe
1. **Migrate production file first** (if both need migration)
2. **Update test imports** to point to `.ts/.tsx` files
3. **Add proper mock typing** using `Partial<T> as T` pattern
4. **Fix stub typing** - Use stub references, not original methods
5. **Verify all tests pass** with TypeScript compilation
---
## 🔧 Type Conflict Resolution
### Multiple Type Definitions Issue
**Problem**: Same type name defined in multiple files causes compilation errors.
**Example**: `DashboardInfo` defined in both:
- `src/dashboard/reducers/types.ts` (minimal)
- `src/dashboard/components/Header/types.ts` (different shape)
- `src/dashboard/types.ts` (complete - used by RootState)
### Resolution Strategy
1. **Identify the authoritative type**:
```bash
# Find which type is used by RootState/main interfaces
grep -r "DashboardInfo" src/dashboard/types.ts
```
2. **Use import from authoritative source**:
```typescript
// ✅ Import from main domain types
import { RootState, DashboardInfo } from 'src/dashboard/types';
// ❌ Don't import from component-specific files
import { DashboardInfo } from 'src/dashboard/components/Header/types';
```
3. **Mock complex types in tests**:
```typescript
// For testing - provide minimal required fields
const mockInfo: Partial<DashboardInfo> as DashboardInfo = {
id: 123,
json_metadata: '{}',
// Only provide fields actually used in test
};
```
### Type Hierarchy Discovery Commands
```bash
# Find all definitions of a type
grep -r "interface.*TypeName\|type.*TypeName" src/
# Find import usage patterns
grep -r "import.*TypeName" src/
# Check what RootState uses
grep -A 10 -B 10 "TypeName" src/*/types.ts
```
---
## Agent Constraints (CRITICAL)
1. **Use git mv** - Run `git mv file.js file.ts` to preserve git history, but NO `git commit`
2. **NO global import changes** - Don't update imports across codebase
3. **Type files OK** - Can modify existing type files to improve/align types
4. **Single-File TypeScript Validation** (CRITICAL) - tsc has known issues with multi-file compilation:
- **Core Issue**: TypeScript's `tsc` has documented problems validating multiple files simultaneously in complex projects
- **Solution**: ALWAYS validate files one at a time using individual `tsc` calls
- **Command Pattern**: `cd superset-frontend && npx tscw --noEmit --allowJs --composite false --project tsconfig.json {single-file-path}`
- **Why**: Multi-file validation can produce false positives, miss real errors, and conflict during parallel agent execution
5. **Downstream Impact Validation** (CRITICAL) - Your migration affects calling sites:
- **Find downstream files**: `find superset-frontend/src -name "*.tsx" -o -name "*.ts" | xargs grep -l "your-core-filename" 2>/dev/null || echo "No files found"`
- **Validate each downstream file individually**: `cd superset-frontend && npx tscw --noEmit --allowJs --composite false --project tsconfig.json {each-downstream-file}`
- **Fix type mismatches** you introduced in calling sites
- **NEVER ignore downstream errors** - they indicate your types don't match reality
6. **Avoid Project-Wide Validation During Migration**:
- **NEVER use `npm run type`** during parallel agent execution - produces unreliable results
- **Single-file validation is authoritative** - trust individual file checks over project-wide scans
6. **ESLint validation** - Run `npm run eslint -- --fix {file}` for each migrated file to auto-fix formatting/linting issues
6. Zero `any` types - use proper TypeScript types
7. Search existing types before creating new ones
8. Follow patterns from this guide
---
## Success Report Format
```
SUCCESS: Atomic Migration of {core-filename}
## Files Migrated (Atomic Unit)
- Core: {core-filename} → {core-filename.ts/tsx}
- Tests: {list-of-test-files} → {list-of-test-files.ts/tsx} OR "CREATED: {basename}.test.ts"
- Mocks: {list-of-mock-files} → {list-of-mock-files.ts}
- Type files modified: {list-of-type-files}
## Types Created/Improved
- {TypeName}: {location} ({scope}) - {rationale}
- {ExistingType}: enhanced in {location} - {improvement-description}
## Documentation Recommendations
- ADD_TO_DIRECTORY: {TypeName} - {reason}
- NO_DOCUMENTATION: {TypeName} - {reason}
## Quality Validation
- **Single-File TypeScript Validation**: ✅ PASS - Core files individually validated
- Core file: `npx tscw --noEmit --allowJs --composite false --project tsconfig.json {core-file}`
- Test files: `npx tscw --noEmit --allowJs --composite false --project tsconfig.json {test-file}` (if exists)
- **Downstream Impact Check**: ✅ PASS - Found {N} files importing this module, all validate individually
- Downstream files: {list-of-files-that-import-your-module}
- Individual validation: `npx tscw --noEmit --allowJs --composite false --project tsconfig.json {each-downstream-file}`
- **ESLint validation**: ✅ PASS (using `npm run eslint -- --fix {files}` to auto-fix formatting)
- **Zero any types**: ✅ PASS
- **Local imports resolved**: ✅ PASS
- **Functionality preserved**: ✅ PASS
- **Tests pass** (if test file): ✅ PASS
- **Follow-up action required**: {YES/NO}
## Validation Strategy Notes
- **Single-file approach used**: Avoided multi-file tsc validation due to known TypeScript compilation issues
- **Project-wide validation skipped**: `npm run type` not used during parallel migration to prevent false positives
## Migration Learnings
- Type conflicts encountered: {describe any multiple type definitions}
- Mock patterns used: {describe test mocking approaches}
- Import hierarchy decisions: {note authoritative type sources used}
- PropTypes strategy: {AUTO_GENERATED via babel plugin | MANUAL_DUPLICATION_REMOVED | N/A}
## Improvement Suggestions for Documentation
- AGENT.md enhancement: {suggest additions to migration guide}
- Common pattern identified: {note reusable patterns for future migrations}
```
---
## Dependency Block Report Format
```
DEPENDENCY_BLOCK: Cannot migrate {filename}
## Blocking Dependencies
- {path}: {type} - {usage} - {priority}
## Impact Analysis
- Estimated types: {number}
- Expected locations: {list}
- Cross-domain: {YES/NO}
## Recommended Order
{ordered-list}
```
---
## 📚 Quick Reference
**Type Utilities:**
- `Record<K, V>` - Object with specific key/value types
- `Partial<T>` - All properties optional
- `Pick<T, K>` - Subset of properties
- `Omit<T, K>` - Exclude specific properties
- `NonNullable<T>` - Exclude null/undefined
**Event Types:**
- `MouseEvent<HTMLButtonElement>`
- `ChangeEvent<HTMLInputElement>`
- `FormEvent<HTMLFormElement>`
**React Types:**
- `FC<Props>` - Functional component
- `ReactNode` - Any renderable content
- `CSSProperties` - Style objects
---
**Remember:** Every type should add value and clarity. The goal is meaningful type safety that catches bugs and improves developer experience.

View File

@@ -1,199 +0,0 @@
# JS-to-TS Coordinator Workflow
**Role:** Strategic migration coordination - select leaf-node files, trigger agents, review results, handle integration, manage dependencies.
---
## 1. Core File Selection Strategy
**Target ONLY Core Files**: Coordinators identify core files (production code), agents handle related tests/mocks atomically.
**File Analysis Commands**:
```bash
# Find CORE files with no JS/JSX dependencies (exclude tests/mocks) - SIZE PRIORITIZED
find superset-frontend/src -name "*.js" -o -name "*.jsx" | grep -v "test\|spec\|mock" | xargs wc -l | sort -n | head -20
# Alternative: Get file sizes in lines with paths
find superset-frontend/src -name "*.js" -o -name "*.jsx" | grep -v "test\|spec\|mock" | while read file; do
lines=$(wc -l < "$file")
echo "$lines $file"
done | sort -n | head -20
# Check dependencies for core files only (start with smallest)
for file in <core-files-sorted-by-size>; do
echo "=== $file ($(wc -l < "$file") lines) ==="
grep -E "from '\.\./.*\.jsx?'|from '\./.*\.jsx?'|from 'src/.*\.jsx?'" "$file" || echo "✅ LEAF CANDIDATE"
done
# Identify heavily imported files (migrate last)
grep -r "from.*utils/common" superset-frontend/src/ | wc -l
# Quick leaf analysis with size priority
find superset-frontend/src -name "*.js" -o -name "*.jsx" | grep -v "test\|spec\|mock" | head -30 | while read file; do
deps=$(grep -E "from '\.\./.*\.jsx?'|from '\./.*\.jsx?'|from 'src/.*\.jsx?'" "$file" | wc -l)
lines=$(wc -l < "$file")
if [ "$deps" -eq 0 ]; then
echo "✅ LEAF: $lines lines - $file"
fi
done | sort -n
```
**Priority Order** (Smallest files first for easier wins):
1. **Small leaf files** (<50 lines) - No JS/JSX imports, quick TypeScript conversion
2. **Medium leaf files** (50-200 lines) - Self-contained utilities and helpers
3. **Small dependency files** (<100 lines) - Import only already-migrated files
4. **Larger components** (200+ lines) - Complex but well-contained functionality
5. **Core foundational files** (utils/common.js, controls.jsx) - migrate last regardless of size
**Size-First Benefits**:
- Faster completion builds momentum
- Earlier validation of migration patterns
- Easier rollback if issues arise
- Better success rate for agent learning
**Migration Unit**: Each agent call migrates:
- 1 core file (primary target)
- All related `*.test.js/jsx` files
- All related `*.mock.js` files
- All related `__mocks__/` files
---
## 2. Task Creation & Agent Control
### Task Triggering
When triggering the `/js-to-ts` command:
- **Task Title**: Use the core filename as the task title (e.g., "DebouncedMessageQueue.js migration", "hostNamesConfig.js migration")
- **Task Description**: Include the full relative path to help agent locate the file
- **Reference**: Point agent to [AGENT.md](./AGENT.md) for technical instructions
### Post-Processing Workflow
After each agent completes:
1. **Review Agent Report**: Always read and analyze the complete agent report
2. **Share Summary**: Provide user with key highlights from agent's work:
- Files migrated (core + tests/mocks)
- Types created or improved
- Any validation issues or coordinator actions needed
3. **Quality Assessment**: Evaluate agent's TypeScript implementation against criteria:
-**Type Usage**: Proper types used, no `any` types
-**Type Filing**: Types placed in correct hierarchy (component → feature → domain → global)
-**Side Effects**: No unintended changes to other files
-**Import Alignment**: Proper .ts/.tsx import extensions
4. **Integration Decision**:
- **COMMIT**: If agent work is complete and high quality
- **FIX & COMMIT**: If minor issues need coordinator fixes
- **ROLLBACK**: If major issues require complete rework
5. **Next Action**: Ask user preference - commit this work or trigger next migration
---
## 3. Integration Decision Framework
**Automatic Integration** ✅:
- `npm run type` passes without errors
- Agent created clean TypeScript with proper types
- Types appropriately filed in hierarchy
**Coordinator Integration** (Fix Side-Effects) 🔧:
- `npm run type` fails BUT agent's work is high quality
- Good type usage, proper patterns, well-organized
- Side-effects are manageable TypeScript compilation errors
- **Coordinator Action**: Integrate the change, then fix global compilation issues
**Rollback Only** ❌:
- Agent introduced `any` types or poor type choices
- Types poorly organized or conflicting with existing patterns
- Fundamental approach issues requiring complete rework
**Integration Process**:
1. **Review**: Agent already used `git mv` to preserve history
2. **Fix Side-Effects**: Update dependent files with proper import extensions
3. **Resolve Types**: Fix any cascading type issues across codebase
4. **Validate**: Ensure `npm run type` passes after fixes
---
## 4. Common Integration Patterns
**Common Side-Effects (Expect These)**:
- **Type import conflicts**: Multiple definitions of same type name
- **Mock object typing**: Tests need complete type satisfaction
- **Stub method references**: Use stub vars instead of original methods
**Coordinator Fixes (Standard Process)**:
1. **Import Resolution**:
```bash
# Find authoritative type source
grep -r "TypeName" src/*/types.ts
# Import from domain types (src/dashboard/types.ts) not component types
```
2. **Test Mock Completion**:
```typescript
// Use Partial<T> as T pattern for minimal mocking
const mockDashboard: Partial<DashboardInfo> as DashboardInfo = {
id: 123,
json_metadata: '{}',
};
```
3. **Stub Reference Fixes**:
```typescript
// ✅ Use stub variable
expect(postStub.callCount).toBe(1);
// ❌ Don't use original method
expect(SupersetClient.post.callCount).toBe(1);
```
4. **Validation Commands**:
```bash
npm run type # TypeScript compilation
npm test -- filename # Test functionality
git status # Should show rename, not add/delete
```
---
## 5. File Categories for Planning
### Leaf Files (Start Here)
**Self-contained files with minimal JS/JSX dependencies**:
- Test files (80 files) - Usually only import the file being tested
- Utility files without internal dependencies
- Components importing only external libraries
### Heavily Imported Files (Migrate Last)
**Core files that many others depend on**:
- `utils/common.js` - Core utility functions
- `utils/reducerUtils.js` - Redux helpers
- `@superset-ui/core` equivalent files
- Major state management files (`explore/store.js`, `dashboard/actions/`)
### Complex Components (Middle Priority)
**Large files requiring careful type analysis**:
- `components/Datasource/DatasourceEditor.jsx` (1,809 lines)
- `explore/components/controls/AnnotationLayerControl/AnnotationLayer.jsx` (1,031 lines)
- `explore/components/ExploreViewContainer/index.jsx` (911 lines)
---
## 6. Success Metrics & Continuous Improvement
**Per-File Gates**:
- ✅ `npm run type` passes after each migration
- ✅ Zero `any` types introduced
- ✅ All imports properly typed
- ✅ Types filed in correct hierarchy
**Linear Scheduling**:
When agents report `DEPENDENCY_BLOCK`:
- Queue dependencies in linear order
- Process one file at a time to avoid conflicts
- Handle cascading type changes between files
**After Each Migration**:
1. **Update guides** with new patterns discovered
2. **Document coordinator fixes** that become common
3. **Enhance agent instructions** based on recurring issues
4. **Track success metrics** - automatic vs coordinator integration rates

View File

@@ -1,76 +0,0 @@
# JavaScript to TypeScript Migration Project
Progressive migration of 219 JS/JSX files to TypeScript in Apache Superset frontend.
## 📁 Project Documentation
- **[AGENT.md](./AGENT.md)** - Complete technical migration guide for agents (includes type reference, patterns, validation)
- **[COORDINATOR.md](./COORDINATOR.md)** - Strategic workflow for coordinators (file selection, task management, integration)
## 🎯 Quick Start
**For Agents:** Read [AGENT.md](./AGENT.md) for complete migration instructions
**For Coordinators:** Read [COORDINATOR.md](./COORDINATOR.md) for workflow and [AGENT.md](./AGENT.md) for supervision
**Command:** `/js-to-ts <filename>` - See [../../commands/js-to-ts.md](../../commands/js-to-ts.md)
## 📊 Migration Progress
**Scope**: 219 files total (112 JS + 107 JSX)
- Production files: 139 (63%)
- Test files: 80 (37%)
**Strategy**: Leaf-first migration with dependency-aware coordination
### Completed Migrations ✅
1. **roundDecimal** - `plugins/legacy-plugin-chart-map-box/src/utils/roundDecimal.js`
- Migrated core + test files
- Added proper TypeScript function signature with optional precision parameter
- All tests pass
2. **timeGrainSqlaAnimationOverrides** - `src/explore/controlPanels/timeGrainSqlaAnimationOverrides.js`
- Migrated to TypeScript with ControlPanelState and Dataset types
- Added TimeGrainOverrideState interface for return type
- Used type guards for safe property access
3. **DebouncedMessageQueue** - `src/utils/DebouncedMessageQueue.js`
- Migrated to TypeScript with proper generics
- Created DebouncedMessageQueueOptions interface
- **CREATED test file** with 4 comprehensive test cases
- Excellent class property typing with private/readonly modifiers
**Files Migrated**: 3/219 (1.4%)
**Tests Created**: 2 (roundDecimal had existing, DebouncedMessageQueue created)
### Next Candidates (Leaf Nodes) 🎯
**Identified leaf files with no JS/JSX dependencies:**
- `src/utils/hostNamesConfig.js` - Domain configuration utility
- `src/explore/controlPanels/Separator.js` - Control panel configuration
- `src/middleware/loggerMiddleware.js` - Logging middleware
**Migration Quality**: All completed migrations have:
- ✅ Zero `any` types
- ✅ Proper TypeScript compilation
- ✅ ESLint validation passed
- ✅ Test coverage (created where missing)
---
## 📈 Success Metrics
**Per-File Gates**:
-`npm run type` passes after each migration
- ✅ Zero `any` types introduced
- ✅ All imports properly typed
- ✅ Types filed in correct hierarchy
**Overall Progress**:
- **Automatic Integration Rate**: 100% (3/3 migrations required no coordinator fixes)
- **Test Coverage**: Improved (1 new test file created)
- **Type Safety**: Enhanced with proper interfaces and generics
---
*This is a claudette-managed progressive refactor. All documentation and coordination resources are organized under `.claude/projects/js-to-ts/`*

View File

@@ -1,5 +1,5 @@
# Keep this in sync with the base image in the main Dockerfile (ARG PY_VER)
FROM python:3.11.13-trixie AS base
FROM python:3.11.13-bookworm AS base
# Install system dependencies that Superset needs
# This layer will be cached across Codespace sessions

10
.github/CODEOWNERS vendored
View File

@@ -30,13 +30,3 @@
**/*.geojson @villebro @rusackas
/superset-frontend/plugins/legacy-plugin-chart-country-map/ @villebro @rusackas
# Notify PMC members of changes to extension-related files
/superset-core/ @michael-s-molina @villebro @geido @eschutho @rusackas @kgabryje
/superset-extensions-cli/ @michael-s-molina @villebro @geido @eschutho @rusackas @kgabryje
/superset/core/ @michael-s-molina @villebro @geido @eschutho @rusackas @kgabryje
/superset/extensions/ @michael-s-molina @villebro @geido @eschutho @rusackas @kgabryje
/superset-frontend/src/packages/superset-core/ @michael-s-molina @villebro @geido @eschutho @rusackas @kgabryje
/superset-frontend/src/core/ @michael-s-molina @villebro @geido @eschutho @rusackas @kgabryje
/superset-frontend/src/extensions/ @michael-s-molina @villebro @geido @eschutho @rusackas @kgabryje

View File

@@ -1,27 +1,24 @@
name: Change Detector
description: Detects file changes for pull request and push events
name: 'Change Detector'
description: 'Detects file changes for pull request and push events'
inputs:
token:
description: GitHub token for authentication
description: 'GitHub token for authentication'
required: true
outputs:
python:
description: Whether Python-related files were changed
description: 'Whether Python-related files were changed'
value: ${{ steps.change-detector.outputs.python }}
frontend:
description: Whether frontend-related files were changed
description: 'Whether frontend-related files were changed'
value: ${{ steps.change-detector.outputs.frontend }}
docker:
description: Whether docker-related files were changed
description: 'Whether docker-related files were changed'
value: ${{ steps.change-detector.outputs.docker }}
docs:
description: Whether docs-related files were changed
description: 'Whether docs-related files were changed'
value: ${{ steps.change-detector.outputs.docs }}
superset-extensions-cli:
description: Whether superset-extensions-cli package-related files were changed
value: ${{ steps.change-detector.outputs.superset-extensions-cli }}
runs:
using: composite
using: 'composite'
steps:
- name: Detect file changes
id: change-detector

View File

@@ -1 +1 @@
../AGENTS.md
../LLMS.md

View File

@@ -12,6 +12,9 @@ updates:
# not until React >= 18.0.0
- dependency-name: "storybook"
- dependency-name: "@storybook*"
# remark-gfm v4+ requires react-markdown v9+, which needs React 18
- dependency-name: "remark-gfm"
- dependency-name: "react-markdown"
# JSDOM v30 doesn't play well with Jest v30
# Source: https://jestjs.io/blog#known-issues
# GH thread: https://github.com/jsdom/jsdom/issues/3492

View File

@@ -182,76 +182,6 @@ cypress-run-all() {
kill $flaskProcessId
}
playwright-install() {
cd "$GITHUB_WORKSPACE/superset-frontend"
say "::group::Install Playwright browsers"
npx playwright install --with-deps chromium
# Create output directories for test results and debugging
mkdir -p playwright-results
mkdir -p test-results
say "::endgroup::"
}
playwright-run() {
local APP_ROOT=$1
# Start Flask from the project root (same as Cypress)
cd "$GITHUB_WORKSPACE"
local flasklog="${HOME}/flask-playwright.log"
local port=8081
PLAYWRIGHT_BASE_URL="http://localhost:${port}"
if [ -n "$APP_ROOT" ]; then
export SUPERSET_APP_ROOT=$APP_ROOT
PLAYWRIGHT_BASE_URL=${PLAYWRIGHT_BASE_URL}${APP_ROOT}/
fi
export PLAYWRIGHT_BASE_URL
nohup flask run --no-debugger -p $port >"$flasklog" 2>&1 </dev/null &
local flaskProcessId=$!
# Ensure cleanup on exit
trap "kill $flaskProcessId 2>/dev/null || true" EXIT
# Wait for server to be ready with health check
local timeout=60
say "Waiting for Flask server to start on port $port..."
while [ $timeout -gt 0 ]; do
if curl -f ${PLAYWRIGHT_BASE_URL}/health >/dev/null 2>&1; then
say "Flask server is ready"
break
fi
sleep 1
timeout=$((timeout - 1))
done
if [ $timeout -eq 0 ]; then
echo "::error::Flask server failed to start within 60 seconds"
echo "::group::Flask startup log"
cat "$flasklog"
echo "::endgroup::"
return 1
fi
# Change to frontend directory for Playwright execution
cd "$GITHUB_WORKSPACE/superset-frontend"
say "::group::Run Playwright tests"
echo "Running Playwright with baseURL: ${PLAYWRIGHT_BASE_URL}"
npx playwright test auth/login --reporter=github --output=playwright-results
local status=$?
say "::endgroup::"
# After job is done, print out Flask log for debugging
echo "::group::Flask log for Playwright run"
cat "$flasklog"
echo "::endgroup::"
# make sure the program exits
kill $flaskProcessId
return $status
}
eyes-storybook-dependencies() {
say "::group::install eyes-storyook dependencies"
sudo apt-get update -y && sudo apt-get -y install gconf-service ca-certificates libxshmfence-dev fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libglib2.0-0 libgdk-pixbuf2.0-0 libgtk-3-0 libnspr4 libnss3 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release xdg-utils libappindicator1

View File

@@ -32,7 +32,7 @@ jobs:
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: true
ref: master

View File

@@ -31,7 +31,7 @@ jobs:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
if: steps.check_queued.outputs.count >= 20
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Cancel duplicate workflow runs
if: steps.check_queued.outputs.count >= 20

View File

@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive

View File

@@ -25,7 +25,7 @@ jobs:
pull-requests: write
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Check and notify
uses: actions/github-script@v7
with:

View File

@@ -71,7 +71,7 @@ jobs:
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
fetch-depth: 1

View File

@@ -31,7 +31,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Check for file changes
id: check

View File

@@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: "Checkout Repository"
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: "Dependency Review"
uses: actions/dependency-review-action@v4
continue-on-error: true
@@ -53,7 +53,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: "Checkout Repository"
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Setup Python
uses: ./.github/actions/setup-backend/

View File

@@ -22,7 +22,7 @@ jobs:
steps:
- id: set_matrix
run: |
MATRIX_CONFIG=$(if [ "${{ github.event_name }}" == "pull_request" ]; then echo '["dev", "lean"]'; else echo '["dev", "lean", "py310", "websocket", "dockerize", "py311", "py312"]'; fi)
MATRIX_CONFIG=$(if [ "${{ github.event_name }}" == "pull_request" ]; then echo '["dev", "lean"]'; else echo '["dev", "lean", "py310", "websocket", "dockerize", "py311"]'; fi)
echo "matrix_config=${MATRIX_CONFIG}" >> $GITHUB_OUTPUT
echo $GITHUB_OUTPUT
@@ -42,7 +42,7 @@ jobs:
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
@@ -102,7 +102,7 @@ jobs:
docker history $IMAGE_TAG
- name: docker-compose sanity check
if: (steps.check.outputs.python || steps.check.outputs.frontend || steps.check.outputs.docker) && matrix.build_preset == 'dev'
if: (steps.check.outputs.python || steps.check.outputs.frontend || steps.check.outputs.docker) && (matrix.build_preset == 'dev' || matrix.build_preset == 'lean')
shell: bash
run: |
export SUPERSET_BUILD_TARGET=${{ matrix.build_preset }}
@@ -117,7 +117,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Check for file changes

View File

@@ -28,7 +28,7 @@ jobs:
run:
working-directory: superset-embedded-sdk
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: './superset-embedded-sdk/.nvmrc'

View File

@@ -18,7 +18,7 @@ jobs:
run:
working-directory: superset-embedded-sdk
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: './superset-embedded-sdk/.nvmrc'

View File

@@ -1,10 +1,4 @@
name: Cleanup ephemeral envs (PR close) [DEPRECATED]
# ⚠️ DEPRECATION NOTICE ⚠️
# This workflow is deprecated and will be removed in a future version.
# The new Superset Showtime workflow handles cleanup automatically.
# See .github/workflows/showtime.yml and showtime-cleanup.yml for replacements.
# Migration guide: https://github.com/mistercrunch/superset-showtime
name: Cleanup ephemeral envs (PR close)
on:
pull_request_target:
@@ -77,5 +71,5 @@ jobs:
issue_number: ${{ github.event.number }},
owner: context.repo.owner,
repo: context.repo.repo,
body: '⚠️ **DEPRECATED WORKFLOW** - Ephemeral environment shutdown and build artifacts deleted. Please migrate to the new Superset Showtime system for future PRs.'
body: 'Ephemeral environment shutdown and build artifacts deleted.'
})

View File

@@ -1,12 +1,4 @@
name: Ephemeral env workflow [DEPRECATED]
# ⚠️ DEPRECATION NOTICE ⚠️
# This workflow is deprecated and will be removed in a future version.
# Please use the new Superset Showtime workflow instead:
# - Use label "🎪 trigger-start" instead of "testenv-up"
# - Showtime provides better reliability and easier management
# - See .github/workflows/showtime.yml for the replacement
# - Migration guide: https://github.com/mistercrunch/superset-showtime
name: Ephemeral env workflow
# Example manual trigger:
# gh workflow run ephemeral-env.yml --ref fix_ephemerals --field label_name="testenv-up" --field issue_number=666
@@ -134,11 +126,8 @@ jobs:
throw new Error("Issue number is not available.");
}
const body = `⚠️ **DEPRECATED WORKFLOW** ⚠️\n\n@${user} This workflow is deprecated! Please use the new **Superset Showtime** system instead:\n\n` +
`- Replace "testenv-up" label with "🎪 trigger-start"\n` +
`- Better reliability and easier management\n` +
`- See https://github.com/mistercrunch/superset-showtime for details\n\n` +
`Processing your ephemeral environment request [here](${workflowUrl}). Action: **${action}**.` +
const body = `@${user} Processing your ephemeral environment request [here](${workflowUrl}).` +
` Action: **${action}**.` +
` More information on [how to use or configure ephemeral environments]` +
`(https://superset.apache.org/docs/contributing/howtos/#github-ephemeral-environments)`;
@@ -160,7 +149,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: "Checkout ${{ github.ref }} ( ${{ needs.ephemeral-env-label.outputs.sha }} : ${{steps.get-sha.outputs.sha}} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
ref: ${{ needs.ephemeral-env-label.outputs.sha }}
persist-credentials: false
@@ -220,7 +209,7 @@ jobs:
pull-requests: write
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
with:
persist-credentials: false

View File

@@ -27,12 +27,12 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive
- name: Setup Java
uses: actions/setup-java@v5
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "11"

View File

@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4

View File

@@ -17,7 +17,7 @@ jobs:
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false

View File

@@ -12,7 +12,7 @@ jobs:
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive

View File

@@ -15,12 +15,12 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive
- name: Setup Java
uses: actions/setup-java@v5
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'

View File

@@ -16,7 +16,7 @@ jobs:
pull-requests: write
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive

View File

@@ -21,7 +21,7 @@ jobs:
python-version: ["current", "previous", "next"]
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive

View File

@@ -27,7 +27,7 @@ jobs:
pull-requests: write
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive

View File

@@ -26,7 +26,7 @@ jobs:
name: Bump version and publish package(s)
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
with:
# pulls all commits (needed for lerna / semantic release to correctly version)
fetch-depth: 0

View File

@@ -1,50 +0,0 @@
name: 🎪 Showtime Cleanup
# Scheduled cleanup of expired environments
on:
schedule:
- cron: '0 */6 * * *' # Every 6 hours
# Manual trigger for testing
workflow_dispatch:
inputs:
max_age_hours:
description: 'Maximum age in hours before cleanup'
required: false
default: '48'
type: string
# Common environment variables
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ vars.AWS_REGION || 'us-west-2' }}
GITHUB_ORG: ${{ github.repository_owner }}
GITHUB_REPO: ${{ github.event.repository.name }}
jobs:
cleanup-expired:
name: Clean up expired showtime environments
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Install Superset Showtime
run: pip install superset-showtime
- name: Cleanup expired environments
run: |
MAX_AGE="${{ github.event.inputs.max_age_hours || '48' }}"
# Validate max_age is numeric
if [[ ! "$MAX_AGE" =~ ^[0-9]+$ ]]; then
echo "❌ Invalid max_age_hours format: $MAX_AGE (must be numeric)"
exit 1
fi
echo "Cleaning up environments older than ${MAX_AGE}h"
python -m showtime cleanup --older-than "${MAX_AGE}h"

View File

@@ -1,179 +0,0 @@
name: 🎪 Superset Showtime
# Ultra-simple: just sync on any PR state change
on:
pull_request_target:
types: [labeled, unlabeled, synchronize, closed]
# Manual testing
workflow_dispatch:
inputs:
pr_number:
description: 'PR number to sync'
required: true
type: number
sha:
description: 'Specific SHA to deploy (optional, defaults to latest)'
required: false
type: string
# Common environment variables for all jobs (non-sensitive only)
env:
AWS_REGION: us-west-2
GITHUB_ORG: ${{ github.repository_owner }}
GITHUB_REPO: ${{ github.event.repository.name }}
GITHUB_ACTOR: ${{ github.actor }}
jobs:
sync:
name: 🎪 Sync PR to desired state
runs-on: ubuntu-latest
timeout-minutes: 90
permissions:
contents: read
pull-requests: write
steps:
- name: Security Check - Authorize Maintainers Only
id: auth
uses: actions/github-script@v7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
script: |
const actor = context.actor;
console.log(`🔍 Checking authorization for ${actor}`);
// Early exit for workflow_dispatch - assume authorized since it's manually triggered
if (context.eventName === 'workflow_dispatch') {
console.log(`✅ Workflow dispatch event - assuming authorized for ${actor}`);
core.setOutput('authorized', 'true');
return;
}
const { data: permission } = await github.rest.repos.getCollaboratorPermissionLevel({
owner: context.repo.owner,
repo: context.repo.repo,
username: actor
});
console.log(`📊 Permission level for ${actor}: ${permission.permission}`);
const authorized = ['write', 'admin'].includes(permission.permission);
// If this is a synchronize event from unauthorized user, check if Showtime is active and set blocked label
if (!authorized && context.eventName === 'pull_request_target' && context.payload.action === 'synchronize') {
console.log(`🔒 Synchronize event detected - checking if Showtime is active`);
// Check if PR has any circus tent labels (Showtime is in use)
const { data: issue } = await github.rest.issues.get({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number
});
const hasCircusLabels = issue.labels.some(label => label.name.startsWith('🎪 '));
if (hasCircusLabels) {
console.log(`🎪 Circus labels found - setting blocked label to prevent auto-deployment`);
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: ['🎪 🔒 showtime-blocked']
});
console.log(`✅ Blocked label set - Showtime will detect and skip operations`);
} else {
console.log(` No circus labels found - Showtime not in use, skipping block`);
}
}
if (!authorized) {
console.log(`🚨 Unauthorized user ${actor} - skipping all operations`);
core.setOutput('authorized', 'false');
return;
}
console.log(`✅ Authorized maintainer: ${actor}`);
core.setOutput('authorized', 'true');
- name: Install Superset Showtime
if: steps.auth.outputs.authorized == 'true'
run: |
echo "::notice::Maintainer ${{ github.actor }} triggered deploy for PR ${{ github.event.pull_request.number || github.event.inputs.pr_number }}"
pip install --upgrade superset-showtime
showtime version
- name: Check what actions are needed
if: steps.auth.outputs.authorized == 'true'
id: check
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Bulletproof PR number extraction
if [[ -n "${{ github.event.pull_request.number }}" ]]; then
PR_NUM="${{ github.event.pull_request.number }}"
elif [[ -n "${{ github.event.inputs.pr_number }}" ]]; then
PR_NUM="${{ github.event.inputs.pr_number }}"
else
echo "❌ No PR number found in event or inputs"
exit 1
fi
echo "Using PR number: $PR_NUM"
# Run sync check-only with optional SHA override
if [[ -n "${{ github.event.inputs.sha }}" ]]; then
OUTPUT=$(python -m showtime sync $PR_NUM --check-only --sha "${{ github.event.inputs.sha }}")
else
OUTPUT=$(python -m showtime sync $PR_NUM --check-only)
fi
echo "$OUTPUT"
# Extract the outputs we need for conditional steps
BUILD=$(echo "$OUTPUT" | grep "build_needed=" | cut -d'=' -f2)
SYNC=$(echo "$OUTPUT" | grep "sync_needed=" | cut -d'=' -f2)
PR_NUM_OUT=$(echo "$OUTPUT" | grep "pr_number=" | cut -d'=' -f2)
TARGET_SHA=$(echo "$OUTPUT" | grep "target_sha=" | cut -d'=' -f2)
echo "build_needed=$BUILD" >> $GITHUB_OUTPUT
echo "sync_needed=$SYNC" >> $GITHUB_OUTPUT
echo "pr_number=$PR_NUM_OUT" >> $GITHUB_OUTPUT
echo "target_sha=$TARGET_SHA" >> $GITHUB_OUTPUT
- name: Checkout PR code (only if build needed)
if: steps.auth.outputs.authorized == 'true' && steps.check.outputs.build_needed == 'true'
uses: actions/checkout@v5
with:
ref: ${{ steps.check.outputs.target_sha }}
persist-credentials: false
- name: Setup Docker Environment (only if build needed)
if: steps.auth.outputs.authorized == 'true' && steps.check.outputs.build_needed == 'true'
uses: ./.github/actions/setup-docker
with:
dockerhub-user: ${{ secrets.DOCKERHUB_USER }}
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
build: "true"
install-docker-compose: "false"
- name: Execute sync (handles everything)
if: steps.auth.outputs.authorized == 'true' && steps.check.outputs.sync_needed == 'true'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
run: |
PR_NUM="${{ steps.check.outputs.pr_number }}"
TARGET_SHA="${{ steps.check.outputs.target_sha }}"
if [[ -n "$TARGET_SHA" ]]; then
python -m showtime sync $PR_NUM --sha "$TARGET_SHA"
else
python -m showtime sync $PR_NUM
fi

View File

@@ -51,7 +51,7 @@ jobs:
- 16379:6379
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive

View File

@@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive

View File

@@ -1,4 +1,4 @@
name: Superset App CLI tests
name: Superset CLI tests
on:
push:
@@ -37,7 +37,7 @@ jobs:
- 16379:6379
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive

View File

@@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive
@@ -41,7 +41,7 @@ jobs:
node-version-file: './docs/.nvmrc'
- name: Setup Python
uses: ./.github/actions/setup-backend/
- uses: actions/setup-java@v5
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'

View File

@@ -18,7 +18,7 @@ jobs:
name: Link Checking
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
# Do not bump this linkinator-action version without opening
# an ASF Infra ticket to allow the new version first!
- uses: JustinBeckwith/linkinator-action@v1.11.0
@@ -56,7 +56,7 @@ jobs:
working-directory: docs
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive

View File

@@ -69,21 +69,21 @@ jobs:
# Conditional checkout based on context
- name: Checkout for push or pull_request event
if: github.event_name == 'push' || github.event_name == 'pull_request'
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
- name: Checkout using ref (workflow_dispatch)
if: github.event_name == 'workflow_dispatch' && github.event.inputs.ref != ''
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
ref: ${{ github.event.inputs.ref }}
submodules: recursive
- name: Checkout using PR ID (workflow_dispatch)
if: github.event_name == 'workflow_dispatch' && github.event.inputs.pr_id != ''
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
ref: refs/pull/${{ github.event.inputs.pr_id }}/merge

View File

@@ -1,64 +0,0 @@
name: Superset Extensions CLI Package Tests
on:
push:
branches:
- "master"
- "[0-9].[0-9]*"
pull_request:
types: [synchronize, opened, reopened, ready_for_review]
# cancel previous workflow jobs for PRs
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
test-superset-extensions-cli-package:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["previous", "current", "next"]
defaults:
run:
working-directory: superset-extensions-cli
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
with:
persist-credentials: false
submodules: recursive
- name: Check for file changes
id: check
uses: ./.github/actions/change-detector/
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Python
if: steps.check.outputs.superset-extensions-cli
uses: ./.github/actions/setup-backend/
with:
python-version: ${{ matrix.python-version }}
requirements-type: dev
- name: Run pytest with coverage
if: steps.check.outputs.superset-extensions-cli
run: |
pytest --cov=superset_extensions_cli --cov-report=xml --cov-report=term-missing --cov-report=html -v --tb=short
- name: Upload coverage reports to Codecov
if: steps.check.outputs.superset-extensions-cli
uses: codecov/codecov-action@v5
with:
file: ./coverage.xml
flags: superset-extensions-cli
name: superset-extensions-cli-coverage
fail_ci_if_error: false
- name: Upload HTML coverage report
if: steps.check.outputs.superset-extensions-cli
uses: actions/upload-artifact@v4
with:
name: superset-extensions-cli-coverage-html
path: htmlcov/

View File

@@ -23,7 +23,7 @@ jobs:
should-run: ${{ steps.check.outputs.frontend }}
steps:
- name: Checkout Code
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
@@ -47,7 +47,7 @@ jobs:
git show -s --format=raw HEAD
docker buildx build \
-t $TAG \
--cache-from=type=registry,ref=apache/superset-cache:3.10-slim-trixie \
--cache-from=type=registry,ref=apache/superset-cache:3.10-slim-bookworm \
--target superset-node-ci \
.
@@ -73,7 +73,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Download Docker Image Artifact
uses: actions/download-artifact@v5
uses: actions/download-artifact@v4
with:
name: docker-image
@@ -101,7 +101,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Download Coverage Artifacts
uses: actions/download-artifact@v5
uses: actions/download-artifact@v4
with:
pattern: coverage-artifacts-*
path: coverage/
@@ -127,7 +127,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Download Docker Image Artifact
uses: actions/download-artifact@v5
uses: actions/download-artifact@v4
with:
name: docker-image
@@ -143,7 +143,7 @@ jobs:
- name: tsc
run: |
docker run --rm $TAG bash -c \
"npm run plugins:build && npm run type"
"npm run type"
validate-frontend:
needs: frontend-build
@@ -151,7 +151,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Download Docker Image Artifact
uses: actions/download-artifact@v5
uses: actions/download-artifact@v4
with:
name: docker-image

View File

@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive

View File

@@ -29,7 +29,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref_name }}
persist-credentials: true

View File

@@ -1,141 +0,0 @@
name: Playwright E2E Tests
on:
push:
branches:
- "master"
- "[0-9].[0-9]*"
pull_request:
types: [synchronize, opened, reopened, ready_for_review]
workflow_dispatch:
inputs:
ref:
description: 'The branch or tag to checkout'
required: false
default: ''
pr_id:
description: 'The pull request ID to checkout'
required: false
default: ''
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
playwright-tests:
runs-on: ubuntu-22.04
# Allow workflow to succeed even if tests fail during shadow mode
continue-on-error: true
permissions:
contents: read
pull-requests: read
strategy:
fail-fast: false
matrix:
browser: ["chromium"]
app_root: ["", "/app/prefix"]
env:
SUPERSET_ENV: development
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
SUPERSET__SQLALCHEMY_DATABASE_URI: postgresql+psycopg2://superset:superset@127.0.0.1:15432/superset
PYTHONPATH: ${{ github.workspace }}
REDIS_PORT: 16379
GITHUB_TOKEN: ${{ github.token }}
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: superset
POSTGRES_PASSWORD: superset
ports:
- 15432:5432
redis:
image: redis:7-alpine
ports:
- 16379:6379
steps:
# -------------------------------------------------------
# Conditional checkout based on context (same as Cypress workflow)
- name: Checkout for push or pull_request event
if: github.event_name == 'push' || github.event_name == 'pull_request'
uses: actions/checkout@v5
with:
persist-credentials: false
submodules: recursive
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
- name: Checkout using ref (workflow_dispatch)
if: github.event_name == 'workflow_dispatch' && github.event.inputs.ref != ''
uses: actions/checkout@v5
with:
persist-credentials: false
ref: ${{ github.event.inputs.ref }}
submodules: recursive
- name: Checkout using PR ID (workflow_dispatch)
if: github.event_name == 'workflow_dispatch' && github.event.inputs.pr_id != ''
uses: actions/checkout@v5
with:
persist-credentials: false
ref: refs/pull/${{ github.event.inputs.pr_id }}/merge
submodules: recursive
# -------------------------------------------------------
- name: Check for file changes
id: check
uses: ./.github/actions/change-detector/
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Python
uses: ./.github/actions/setup-backend/
if: steps.check.outputs.python || steps.check.outputs.frontend
- name: Setup postgres
if: steps.check.outputs.python || steps.check.outputs.frontend
uses: ./.github/actions/cached-dependencies
with:
run: setup-postgres
- name: Import test data
if: steps.check.outputs.python || steps.check.outputs.frontend
uses: ./.github/actions/cached-dependencies
with:
run: testdata
- name: Setup Node.js
if: steps.check.outputs.python || steps.check.outputs.frontend
uses: actions/setup-node@v4
with:
node-version-file: './superset-frontend/.nvmrc'
- name: Install npm dependencies
if: steps.check.outputs.python || steps.check.outputs.frontend
uses: ./.github/actions/cached-dependencies
with:
run: npm-install
- name: Build javascript packages
if: steps.check.outputs.python || steps.check.outputs.frontend
uses: ./.github/actions/cached-dependencies
with:
run: build-instrumented-assets
- name: Install Playwright
if: steps.check.outputs.python || steps.check.outputs.frontend
uses: ./.github/actions/cached-dependencies
with:
run: playwright-install
- name: Run Playwright
if: steps.check.outputs.python || steps.check.outputs.frontend
uses: ./.github/actions/cached-dependencies
env:
NODE_OPTIONS: "--max-old-space-size=4096"
with:
run: playwright-run ${{ matrix.app_root }}
- name: Set safe app root
if: failure()
id: set-safe-app-root
run: |
APP_ROOT="${{ matrix.app_root }}"
SAFE_APP_ROOT=${APP_ROOT//\//_}
echo "safe_app_root=$SAFE_APP_ROOT" >> $GITHUB_OUTPUT
- name: Upload Playwright Artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
path: |
${{ github.workspace }}/superset-frontend/playwright-results/
${{ github.workspace }}/superset-frontend/test-results/
name: playwright-artifact-${{ github.run_id }}-${{ github.job }}-${{ matrix.browser }}--${{ steps.set-safe-app-root.outputs.safe_app_root }}

View File

@@ -41,7 +41,7 @@ jobs:
- 16379:6379
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive
@@ -99,7 +99,7 @@ jobs:
- 16379:6379
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive
@@ -152,7 +152,7 @@ jobs:
- 16379:6379
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive

View File

@@ -48,7 +48,7 @@ jobs:
- 16379:6379
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive
@@ -108,7 +108,7 @@ jobs:
- 16379:6379
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive

View File

@@ -24,7 +24,7 @@ jobs:
PYTHONPATH: ${{ github.workspace }}
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive

View File

@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive
@@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
submodules: recursive

View File

@@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install dependencies

View File

@@ -38,7 +38,7 @@ jobs:
});
- name: "Checkout ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
persist-credentials: false

View File

@@ -42,12 +42,12 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
build_preset: ["dev", "lean", "py310", "websocket", "dockerize", "py311", "py312"]
build_preset: ["dev", "lean", "py310", "websocket", "dockerize", "py311"]
fail-fast: false
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
fetch-depth: 0
@@ -107,7 +107,7 @@ jobs:
steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v5
uses: actions/checkout@v4
with:
fetch-depth: 0

View File

@@ -27,7 +27,7 @@ jobs:
name: Generate Reports
steps:
- name: Checkout Repository
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4

View File

@@ -12,7 +12,7 @@ jobs:
steps:
- name: Welcome Message
uses: actions/first-interaction@v3
uses: actions/first-interaction@v2
continue-on-error: true
with:
repo-token: ${{ github.token }}

5
.gitignore vendored
View File

@@ -43,7 +43,7 @@ _modules
_static
build
app.db
*.egg-info/
apache_superset.egg-info/
changelog.sh
dist
dump.rdb
@@ -130,7 +130,8 @@ superset/static/stats/statistics.html
# LLM-related
CLAUDE.local.md
PROJECT.md
.aider*
.claude_rc*
.env.local
PROJECT.md
*.code-workspace

View File

@@ -23,9 +23,7 @@ repos:
rev: v1.15.0
hooks:
- id: mypy
name: mypy (main)
args: [--check-untyped-defs]
exclude: ^superset-extensions-cli/
additional_dependencies: [
types-simplejson,
types-python-dateutil,
@@ -40,10 +38,6 @@ repos:
types-paramiko,
types-Markdown,
]
- id: mypy
name: mypy (superset-extensions-cli)
args: [--check-untyped-defs]
files: ^superset-extensions-cli/
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
@@ -60,25 +54,25 @@ repos:
args: ["--markdown-linebreak-ext=md"]
- repo: local
hooks:
- id: eslint-frontend
name: eslint (frontend)
entry: ./scripts/eslint.sh
language: system
pass_filenames: true
files: ^superset-frontend/.*\.(js|jsx|ts|tsx)$
- id: eslint-docs
name: eslint (docs)
entry: bash -c 'cd docs && FILES=$(echo "$@" | sed "s|docs/||g") && yarn eslint --fix --ext .js,.jsx,.ts,.tsx --quiet $FILES'
language: system
pass_filenames: true
files: ^docs/.*\.(js|jsx|ts|tsx)$
- id: type-checking-frontend
name: Type-Checking (Frontend)
entry: ./scripts/check-type.js package=superset-frontend excludeDeclarationDir=cypress-base
language: system
files: ^superset-frontend\/.*\.(js|jsx|ts|tsx)$
exclude: ^superset-frontend/cypress-base\/
require_serial: true
- id: eslint-frontend
name: eslint (frontend)
entry: ./scripts/eslint.sh
language: system
pass_filenames: true
files: ^superset-frontend/.*\.(js|jsx|ts|tsx)$
- id: eslint-docs
name: eslint (docs)
entry: bash -c 'cd docs && FILES=$(echo "$@" | sed "s|docs/||g") && yarn eslint --fix --ext .js,.jsx,.ts,.tsx --quiet $FILES'
language: system
pass_filenames: true
files: ^docs/.*\.(js|jsx|ts|tsx)$
- id: type-checking-frontend
name: Type-Checking (Frontend)
entry: ./scripts/check-type.js package=superset-frontend excludeDeclarationDir=cypress-base
language: system
files: ^superset-frontend\/.*\.(js|jsx|ts|tsx)$
exclude: ^superset-frontend/cypress-base\/
require_serial: true
# blacklist unsafe functions like make_url (see #19526)
- repo: https://github.com/skorokithakis/blacklist-pre-commit-hook
rev: e2f070289d8eddcaec0b580d3bde29437e7c8221
@@ -100,21 +94,21 @@ repos:
args: [--fix]
- repo: local
hooks:
- id: pylint
name: pylint with custom Superset plugins
entry: bash
language: system
types: [python]
exclude: ^(tests/|superset/migrations/|scripts/|RELEASING/|docker/)
args:
- -c
- |
TARGET_BRANCH=${GITHUB_BASE_REF:-master}
git fetch origin "$TARGET_BRANCH"
BASE=$(git merge-base origin/"$TARGET_BRANCH" HEAD)
files=$(git diff --name-only --diff-filter=ACM "$BASE"..HEAD | grep '^superset/.*\.py$' || true)
if [ -n "$files" ]; then
pylint --rcfile=.pylintrc --load-plugins=superset.extensions.pylint --reports=no $files
else
echo "No Python files to lint."
fi
- id: pylint
name: pylint with custom Superset plugins
entry: bash
language: system
types: [python]
exclude: ^(tests/|superset/migrations/|scripts/|RELEASING/|docker/)
args:
- -c
- |
TARGET_BRANCH=${GITHUB_BASE_REF:-master}
git fetch origin "$TARGET_BRANCH"
BASE=$(git merge-base origin/"$TARGET_BRANCH" HEAD)
files=$(git diff --name-only --diff-filter=ACM "$BASE"..HEAD | grep '^superset/.*\.py$' || true)
if [ -n "$files" ]; then
pylint --rcfile=.pylintrc --load-plugins=superset.extensions.pylint --reports=no $files
else
echo "No Python files to lint."
fi

View File

@@ -53,7 +53,7 @@ extension-pkg-whitelist=pyarrow
[MESSAGES CONTROL]
disable=all
enable=disallowed-json-import,disallowed-sql-import,consider-using-transaction
enable=disallowed-sql-import,consider-using-transaction
[REPORTS]

View File

@@ -32,8 +32,6 @@ apache_superset.egg-info
# json and csv in general cannot have comments
.*json
.*csv
# jinja templates often need to be as-is
.*j2
# Generated doc files
env/*
docs/.htaccess*
@@ -73,7 +71,6 @@ ibm-db2.svg
postgresql.svg
snowflake.svg
ydb.svg
loading.svg
# docs-related
erd.puml
@@ -82,7 +79,6 @@ intro_header.txt
# for LLMs
llm-context.md
AGENTS.md
LLMS.md
CLAUDE.md
CURSOR.md

View File

@@ -47,5 +47,5 @@ under the License.
- [4.1.1](./CHANGELOG/4.1.1.md)
- [4.1.2](./CHANGELOG/4.1.2.md)
- [4.1.3](./CHANGELOG/4.1.3.md)
- [4.1.4](./CHANGELOG/4.1.4.md)
- [5.0.0](./CHANGELOG/5.0.0.md)
- [6.0.0](./CHANGELOG/6.0.0.md)

View File

@@ -1,33 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
## Change Log
### 4.1.4 (Thu Jul 24 08:30:04 2025 -0300)
**Database Migrations**
**Features**
**Fixes**
- [#34289](https://github.com/apache/superset/pull/34289) fix: Saved queries list break if one query can't be parsed (@michael-s-molina)
- [#33059](https://github.com/apache/superset/pull/33059) fix: Adds missing __init__ file to commands/logs (@michael-s-molina)
**Others**
- [#32236](https://github.com/apache/superset/pull/32236) chore(deps): bump cryptography from 43.0.3 to 44.0.1 (@dependabot[bot])

1062
CHANGELOG/6.0.0.md Normal file

File diff suppressed because it is too large Load Diff

113
CHANGELOG/6.0.1.md Normal file
View File

@@ -0,0 +1,113 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
## Change Log
### 6.0.1 (Thu Feb 5 15:25:51 2026 +0530)
**Fixes**
- [#37403](https://github.com/apache/superset/pull/37403) fix: Rename Truncate Axis to Truncate Y Axis in bar chart controls (@bikashbarua)
- [#37553](https://github.com/apache/superset/pull/37553) fix(security): update jspdf to 4.0.0 to address CVE-2025-68428 (@Nancy-Chauhan)
- [#36985](https://github.com/apache/superset/pull/36985) fix(native-filters): update TEMPORAL_RANGE filter subject when Time Column filter is applied (@JCelento)
- [#37284](https://github.com/apache/superset/pull/37284) fix(timeseries): restore ECharts tooltip after closing drill menu (@VanessaGiannoni)
- [#37112](https://github.com/apache/superset/pull/37112) fix: charts row limit warning is missing for server (@ramiroaquinoromero)
- [#37208](https://github.com/apache/superset/pull/37208) fix: Heatmap does not render correctly on normalization (@qf-jonathan)
- [#37452](https://github.com/apache/superset/pull/37452) fix(dashboard): Avoid calling loadData for invisible charts on virtual rendering (@justinpark)
- [#37407](https://github.com/apache/superset/pull/37407) fix(chart): enable cross-filter on bar charts without dimensions (@rusackas)
- [#37218](https://github.com/apache/superset/pull/37218) fix(charts): Table chart shows an error on row limit (@FelipeGLopez)
- [#37409](https://github.com/apache/superset/pull/37409) fix(themes): correct action icons size and restore missing tooltips (@massucattoj)
- [#37248](https://github.com/apache/superset/pull/37248) fix(deckgl): change deck gl Path default line width unit to meters (@massucattoj)
- [#37495](https://github.com/apache/superset/pull/37495) fix(Multilayer): preserve dashboard context for embedded (@msyavuz)
- [#36962](https://github.com/apache/superset/pull/36962) fix(charts): numerical column for the Point Radius field in mapbox (@FelipeGLopez)
- [#37456](https://github.com/apache/superset/pull/37456) fix(explore): remove extra spacing when Advanced Analytics section is hidden (@VanessaGiannoni)
- [#37503](https://github.com/apache/superset/pull/37503) fix(dashboard): catch DatasourceNotFound in get_datasets to prevent 404 (@gabotorresruiz)
- [#36963](https://github.com/apache/superset/pull/36963) fix(dashboard): resolve dropdown popup positioning (@reynoldmorel)
- [#37253](https://github.com/apache/superset/pull/37253) fix(dashboard-filters): prevent clearing all filters when editing a native filter (@VanessaGiannoni)
- [#37453](https://github.com/apache/superset/pull/37453) fix(select): prevent bulk action buttons from being cut off in filters (@massucattoj)
- [#36990](https://github.com/apache/superset/pull/36990) fix(ag-grid-table): preserve time grain aggregation when temporal column casing changes (@VanessaGiannoni)
- [#36958](https://github.com/apache/superset/pull/36958) fix(database): include `configuration_method` in the DB export/import flow (@isaac-jaynes-imperva)
- [#37168](https://github.com/apache/superset/pull/37168) fix(charts): missing globalOpacity prop with mapbox (@FelipeGLopez)
- [#37244](https://github.com/apache/superset/pull/37244) fix(deckgl-contour): prevent WebGL freeze by clamping and auto-scaling cellSize (@YousufFFFF)
- [#37256](https://github.com/apache/superset/pull/37256) fix: display correct icon for Multi Chart in quick switcher (@ramiroaquinoromero)
- [#36058](https://github.com/apache/superset/pull/36058) fix(superset-frontend): Fixes for broken functionality when an application root is defined (@martyngigg)
- [#36986](https://github.com/apache/superset/pull/36986) fix(datasets): respect application root in database management link (@geier)
- [#36996](https://github.com/apache/superset/pull/36996) fix(time-range-modal): time range modal for out of scope filter is not displayed correctly (@ramiroaquinoromero)
- [#37165](https://github.com/apache/superset/pull/37165) fix(dataset-editor): add missing Data type label in calculated columns tab (@massucattoj)
- [#36932](https://github.com/apache/superset/pull/36932) fix(sqllab): add colorEditorSelection token for visible text selection (@gabotorresruiz)
- [#37071](https://github.com/apache/superset/pull/37071) fix(api): nan is not properly handled for athena connections (@ramiroaquinoromero)
- [#36388](https://github.com/apache/superset/pull/36388) fix: pin remark-gfm to v3.0.1 for compatibility with react-markdown v8 (@rebenitez1802)
- [#36989](https://github.com/apache/superset/pull/36989) fix(chart): Horizontal bar chart value labels cut off (@LuisSanchez)
- [#37012](https://github.com/apache/superset/pull/37012) fix(delete-filter): deleted native filters are still shown until [sc-96553] (@ramiroaquinoromero)
- [#37181](https://github.com/apache/superset/pull/37181) fix(timeseries): x-axis last month was hidden (@LuisSanchez)
- [#37017](https://github.com/apache/superset/pull/37017) fix(native-filters): enable Apply button when selecting Boolean FALSE value (@JCelento)
- [#36927](https://github.com/apache/superset/pull/36927) fix(Dashboard): Auto-apply filters with default values when extraForm… (@geido)
- [#37064](https://github.com/apache/superset/pull/37064) fix(calendar-heatmap): correct month display across timezones (@massucattoj)
- [#37177](https://github.com/apache/superset/pull/37177) fix(sunburst): make Show Total text theme-aware (@tiya-9975)
- [#37217](https://github.com/apache/superset/pull/37217) fix(mixed-timeseries): prevent duplicate legend entries (@YousufFFFF)
- [#36596](https://github.com/apache/superset/pull/36596) fix: Implement SIP-40 error styles for GAQ (@bsovran)
- [#37210](https://github.com/apache/superset/pull/37210) fix: add droppable area to tab empty state (@phmoraesrodrigues)
- [#37171](https://github.com/apache/superset/pull/37171) fix: HTML detection in tables (@kgabryje)
- [#37173](https://github.com/apache/superset/pull/37173) fix: Move head_custom_extra above csrf token input (@kgabryje)
- [#37115](https://github.com/apache/superset/pull/37115) fix(controls): Only initialize categorical control on numeric x axis (@msyavuz)
- [#36991](https://github.com/apache/superset/pull/36991) fix(dashboard): revert cell hover and active colors to grayscale (@reynoldmorel)
- [#37039](https://github.com/apache/superset/pull/37039) fix(table): keep d3-format semantics when applying currency formatting (@qf-jonathan)
- [#37029](https://github.com/apache/superset/pull/37029) fix(deckgl): remove visibility condition in deckgl stroke color (@DamianPendrak)
- [#36747](https://github.com/apache/superset/pull/36747) fix(sqlglot): use Athena dialect for awsathena parsing (@ankitajhanwar2001)
- [#37020](https://github.com/apache/superset/pull/37020) fix(models): prevent SQLAlchemy and_() deprecation warning (@aminghadersohi)
- [#36981](https://github.com/apache/superset/pull/36981) fix(reports): Use authenticated user as recipient for chart/dashboard reports (@msyavuz)
- [#37018](https://github.com/apache/superset/pull/37018) fix(Tabs): prevent infinite rerenders with nested tabs (@msyavuz)
- [#35009](https://github.com/apache/superset/pull/35009) fix: handle undefined template variables safely in query rendering. (@LevisNgigi)
- [#35871](https://github.com/apache/superset/pull/35871) fix(alerts): wrong alert trigger with custom query (@gabotorresruiz)
- [#36550](https://github.com/apache/superset/pull/36550) fix(security): enforce datasource access control in get_samples() (@rusackas)
- [#36270](https://github.com/apache/superset/pull/36270) fix(ag-grid): Ag Grid Date Filter timezone correction (@amaannawab923)
- [#36686](https://github.com/apache/superset/pull/36686) fix(dashboard): prevent table chart infinite reload loop (@ramiroaquinoromero)
- [#36422](https://github.com/apache/superset/pull/36422) fix(SQLLab): remove error icon displayed when writing Jinja SQL even when the script is correct (@FelipeGLopez)
- [#36872](https://github.com/apache/superset/pull/36872) fix(trino): update query progress using cursor stats (@justinpark)
- [#36891](https://github.com/apache/superset/pull/36891) fix(plugin-chart-table): remove column misalignment when no scrollbars are present (@EnxDev)
- [#36532](https://github.com/apache/superset/pull/36532) fix(RightMenu): fix inconsistent icon alignment in RightMenu items (@innovark37)
- [#36671](https://github.com/apache/superset/pull/36671) fix(SavedQueries): unify query card actions styling across all home page cards (@innovark37)
- [#36490](https://github.com/apache/superset/pull/36490) fix(logout): clicking logout displays an error notification "invalid username or password" (@LevisNgigi)
- [#36819](https://github.com/apache/superset/pull/36819) fix(TableChart): render cell bars for columns with NULL values (@LuisSanchez)
- [#36854](https://github.com/apache/superset/pull/36854) fix: Clear database form errors (@msyavuz)
- [#36858](https://github.com/apache/superset/pull/36858) fix: SqlLab error when collapsing the left panel preview (@EnxDev)
- [#36831](https://github.com/apache/superset/pull/36831) fix(chart-creation): use exact match when loading dataset from URL parameter (@EnxDev)
- [#36639](https://github.com/apache/superset/pull/36639) fix: fix error with dashboard filters when global async queries is enabled and user navigates quickly (@LevisNgigi)
- [#36809](https://github.com/apache/superset/pull/36809) fix(TableCollection): only apply highlight class when defined (@msyavuz)
- [#36531](https://github.com/apache/superset/pull/36531) fix: UI cut off (@EnxDev)
- [#36716](https://github.com/apache/superset/pull/36716) fix: Use is_active for guest users (@Vitor-Avila)
- [#36306](https://github.com/apache/superset/pull/36306) fix(echarts): use scroll legend for horizontal layouts to prevent overlap (@YousufFFFF)
- [#35945](https://github.com/apache/superset/pull/35945) fix: removed dashboard from main page in "All" tab, refreshes dashboard list (@SBIN2010)
- [#36551](https://github.com/apache/superset/pull/36551) fix(dashboard): import with overwrite flag replaces charts instead of merging (@rusackas)
- [#36545](https://github.com/apache/superset/pull/36545) fix(sql): handle backtick-quoted identifiers with base dialect (@rusackas)
- [#36528](https://github.com/apache/superset/pull/36528) fix(tab): Fix tabs in column not clickable (@alexandrusoare)
- [#36410](https://github.com/apache/superset/pull/36410) fix(api): Fix JWT authentication for /api/v1/me endpoints (@rusackas)
- [#35098](https://github.com/apache/superset/pull/35098) fix: add subdirectory deployment support for app icon and reports urls (@eschutho)
- [#36277](https://github.com/apache/superset/pull/36277) fix(SqlLab): enhance SQL formatting with Jinja template support. (@LuisSanchez)
- [#36323](https://github.com/apache/superset/pull/36323) fix(chart): Display better hover text for country map charts (@Risheit)
- [#36263](https://github.com/apache/superset/pull/36263) fix(roles): Add missing SQLLab permissions for estimate and format (@shunki-fujita)
- [#36302](https://github.com/apache/superset/pull/36302) fix(heatmap): y-axis sorts in order (@sfirke)
- [#36425](https://github.com/apache/superset/pull/36425) fix(Gauge): clearing previously set min and max values in a gauge chart sets the data labels to 0 (@EnxDev)
- [#36227](https://github.com/apache/superset/pull/36227) fix(reports): simplify logging to focus on timing metrics (@eschutho)
- [#36389](https://github.com/apache/superset/pull/36389) fix(echarts): pass vizType to enable theme overrides in all chart types (@gabotorresruiz)
- [#36444](https://github.com/apache/superset/pull/36444) fix: button text capitalization (@yousoph)
**Others**
- [#37552](https://github.com/apache/superset/pull/37552) chore(deps): bump dependencies to address security vulnerabilities (@ASolarers-Rodriguez)

View File

@@ -1 +1 @@
AGENTS.md
LLMS.md

View File

@@ -18,7 +18,7 @@
######################################################################
# Node stage to deal with static asset construction
######################################################################
ARG PY_VER=3.11.13-slim-trixie
ARG PY_VER=3.11.13-slim-bookworm
# If BUILDPLATFORM is null, set it to 'amd64' (or leave as is otherwise).
ARG BUILDPLATFORM=${BUILDPLATFORM:-amd64}
@@ -29,7 +29,7 @@ ARG BUILD_TRANSLATIONS="false"
######################################################################
# superset-node-ci used as a base for building frontend assets and CI
######################################################################
FROM --platform=${BUILDPLATFORM} node:20-trixie-slim AS superset-node-ci
FROM --platform=${BUILDPLATFORM} node:20-bookworm-slim AS superset-node-ci
ARG BUILD_TRANSLATIONS
ENV BUILD_TRANSLATIONS=${BUILD_TRANSLATIONS}
ARG DEV_MODE="false" # Skip frontend build in dev mode
@@ -64,7 +64,7 @@ RUN --mount=type=bind,source=./superset-frontend/package.json,target=./package.j
--mount=type=bind,source=./superset-frontend/package-lock.json,target=./package-lock.json \
--mount=type=cache,target=/root/.cache \
--mount=type=cache,target=/root/.npm \
if [ "${DEV_MODE}" = "false" ]; then \
if [ "$DEV_MODE" = "false" ]; then \
npm ci; \
else \
echo "Skipping 'npm ci' in dev mode"; \
@@ -80,7 +80,7 @@ FROM superset-node-ci AS superset-node
# Build the frontend if not in dev mode
RUN --mount=type=cache,target=/root/.npm \
if [ "${DEV_MODE}" = "false" ]; then \
if [ "$DEV_MODE" = "false" ]; then \
echo "Running 'npm run ${BUILD_CMD}'"; \
npm run ${BUILD_CMD}; \
else \
@@ -91,10 +91,11 @@ RUN --mount=type=cache,target=/root/.npm \
COPY superset/translations /app/superset/translations
# Build translations if enabled, then cleanup localization files
RUN if [ "${BUILD_TRANSLATIONS}" = "true" ]; then \
RUN if [ "$BUILD_TRANSLATIONS" = "true" ]; then \
npm run build-translation; \
fi; \
rm -rf /app/superset/translations/*/*/*.[po,mo];
rm -rf /app/superset/translations/*/*/*.po; \
rm -rf /app/superset/translations/*/*/*.mo;
######################################################################
@@ -105,10 +106,10 @@ FROM python:${PY_VER} AS python-base
ARG SUPERSET_HOME="/app/superset_home"
ENV SUPERSET_HOME=${SUPERSET_HOME}
RUN mkdir -p ${SUPERSET_HOME}
RUN mkdir -p $SUPERSET_HOME
RUN useradd --user-group -d ${SUPERSET_HOME} -m --no-log-init --shell /bin/bash superset \
&& chmod -R 1777 ${SUPERSET_HOME} \
&& chown -R superset:superset ${SUPERSET_HOME}
&& chmod -R 1777 $SUPERSET_HOME \
&& chown -R superset:superset $SUPERSET_HOME
# Some bash scripts needed throughout the layers
COPY --chmod=755 docker/*.sh /app/docker/
@@ -133,19 +134,17 @@ RUN --mount=type=cache,target=/root/.cache/uv \
. /app/.venv/bin/activate && /app/docker/pip-install.sh --requires-build-essential -r requirements/translations.txt
COPY superset/translations/ /app/translations_mo/
RUN if [ "${BUILD_TRANSLATIONS}" = "true" ]; then \
RUN if [ "$BUILD_TRANSLATIONS" = "true" ]; then \
pybabel compile -d /app/translations_mo | true; \
fi; \
rm -f /app/translations_mo/*/*/*.[po,json]
rm -f /app/translations_mo/*/*/*.po; \
rm -f /app/translations_mo/*/*/*.json;
######################################################################
# Python APP common layer
######################################################################
FROM python-base AS python-common
# Build arg to pre-populate examples DuckDB file
ARG LOAD_EXAMPLES_DUCKDB="false"
ENV SUPERSET_HOME="/app/superset_home" \
HOME="/app/superset_home" \
SUPERSET_ENV="production" \
@@ -171,11 +170,11 @@ RUN mkdir -p \
ARG INCLUDE_CHROMIUM="false"
ARG INCLUDE_FIREFOX="false"
RUN --mount=type=cache,target=${SUPERSET_HOME}/.cache/uv \
if [ "${INCLUDE_CHROMIUM}" = "true" ] || [ "${INCLUDE_FIREFOX}" = "true" ]; then \
if [ "$INCLUDE_CHROMIUM" = "true" ] || [ "$INCLUDE_FIREFOX" = "true" ]; then \
uv pip install playwright && \
playwright install-deps && \
if [ "${INCLUDE_CHROMIUM}" = "true" ]; then playwright install chromium; fi && \
if [ "${INCLUDE_FIREFOX}" = "true" ]; then playwright install firefox; fi; \
if [ "$INCLUDE_CHROMIUM" = "true" ]; then playwright install chromium; fi && \
if [ "$INCLUDE_FIREFOX" = "true" ]; then playwright install firefox; fi; \
else \
echo "Skipping browser installation"; \
fi
@@ -197,18 +196,6 @@ RUN /app/docker/apt-install.sh \
libecpg-dev \
libldap2-dev
# Pre-load examples DuckDB file if requested
RUN if [ "$LOAD_EXAMPLES_DUCKDB" = "true" ]; then \
mkdir -p /app/data && \
echo "Downloading pre-built examples.duckdb..." && \
curl -L -o /app/data/examples.duckdb \
"https://raw.githubusercontent.com/apache-superset/examples-data/master/examples.duckdb" && \
chown -R superset:superset /app/data; \
else \
mkdir -p /app/data && \
chown -R superset:superset /app/data; \
fi
# Copy compiled things from previous stages
COPY --from=superset-node /app/superset/static/assets superset/static/assets
@@ -232,10 +219,6 @@ FROM python-common AS lean
# Install Python dependencies using docker/pip-install.sh
COPY requirements/base.txt requirements/
# Copy superset-core package needed for editable install in base.txt
COPY superset-core superset-core
RUN --mount=type=cache,target=${SUPERSET_HOME}/.cache/uv \
/app/docker/pip-install.sh --requires-build-essential -r requirements/base.txt
# Install the superset package
@@ -258,11 +241,6 @@ RUN /app/docker/apt-install.sh \
# Copy development requirements and install them
COPY requirements/*.txt requirements/
# Copy local packages needed for editable installs in development.txt
COPY superset-core superset-core
COPY superset-extensions-cli superset-extensions-cli
# Install Python dependencies using docker/pip-install.sh
RUN --mount=type=cache,target=${SUPERSET_HOME}/.cache/uv \
/app/docker/pip-install.sh --requires-build-essential -r requirements/development.txt
@@ -280,15 +258,6 @@ USER superset
######################################################################
FROM lean AS ci
USER root
RUN uv pip install .[postgres,duckdb]
USER superset
CMD ["/app/docker/entrypoints/docker-ci.sh"]
######################################################################
# Showtime image - lean + DuckDB for examples database
######################################################################
FROM lean AS showtime
USER root
RUN uv pip install .[duckdb]
RUN uv pip install .[postgres]
USER superset
CMD ["/app/docker/entrypoints/docker-ci.sh"]

View File

@@ -1 +1 @@
AGENTS.md
LLMS.md

2
GPT.md
View File

@@ -1 +1 @@
AGENTS.md
LLMS.md

View File

@@ -15,11 +15,9 @@ Apache Superset is a data visualization platform with Flask/Python backend and R
### Testing Strategy Migration
- **Prefer unit tests** over integration tests
- **Prefer integration tests** over end-to-end tests
- **Use Playwright for E2E tests** - Migrating from Cypress
- **Cypress is deprecated** - Will be removed once migration is completed
- **Prefer integration tests** over Cypress end-to-end tests
- **Cypress is last resort** - Actively moving away from Cypress
- **Use Jest + React Testing Library** for component testing
- **Use `test()` instead of `describe()`** - Follow [avoid nesting when testing](https://kentcdodds.com/blog/avoid-nesting-when-youre-testing) principles
### Backend Type Safety
- **Add type hints** - All new Python code needs proper typing
@@ -68,11 +66,7 @@ superset/
### Apache License Headers
- **New files require ASF license headers** - When creating new code files, include the standard Apache Software Foundation license header
- **LLM instruction files are excluded** - Files like AGENTS.md, CLAUDE.md, etc. are in `.rat-excludes` to avoid header token overhead
### Code Comments
- **Avoid time-specific language** - Don't use words like "now", "currently", "today" in code comments as they become outdated
- **Write timeless comments** - Comments should remain accurate regardless of when they're read
- **LLM instruction files are excluded** - Files like LLMS.md, CLAUDE.md, etc. are in `.rat-excludes` to avoid header token overhead
## Documentation Requirements
@@ -102,17 +96,6 @@ superset/
- **`selectOption()`** - Select component helper
- **React Testing Library** - NO Enzyme (removed)
### Test Structure Guidelines
- **Use `test()` instead of `describe()` and `it()`** - Follow the [avoid nesting when testing](https://kentcdodds.com/blog/avoid-nesting-when-youre-testing) principle
- **Why**: Reduces unnecessary nesting, improves test isolation, and makes tests more readable
- **Pattern**: Write flat test files with descriptive test names that fully describe what's being tested
- **Example**: Instead of nested `describe('Component', () => { it('should render', ...) })`, use `test('Component renders correctly', ...)`
- **Benefits**:
- Each test stands alone with a clear, searchable name
- Easier to run individual tests
- Forces you to write more descriptive test names
- Reduces cognitive overhead from nested context switching
### Test Database Patterns
- **Mock patterns**: Use `MagicMock()` for config objects, avoid `AsyncMock` for synchronous code
- **API tests**: Update expected columns when adding new model fields
@@ -123,18 +106,6 @@ superset/
npm run test # All tests
npm run test -- filename.test.tsx # Single file
# E2E Tests (Playwright - NEW)
npm run playwright:test # All Playwright tests
npm run playwright:ui # Interactive UI mode
npm run playwright:headed # See browser during tests
npx playwright test tests/auth/login.spec.ts # Single file
npm run playwright:debug tests/auth/login.spec.ts # Debug specific file
# E2E Tests (Cypress - DEPRECATED)
cd superset-frontend/cypress-base
npm run cypress-run-chrome # All Cypress tests (headless)
npm run cypress-debug # Interactive Cypress UI
# Backend
pytest # All tests
pytest tests/unit_tests/specific_test.py # Single file
@@ -164,19 +135,6 @@ curl -f http://localhost:8088/health || echo "❌ Setup required - see https://s
- **Use negation operator**: `~Model.field` instead of `== False` to avoid ruff E712 errors
- **Example**: `~Model.is_active` instead of `Model.is_active == False`
## Pull Request Guidelines
**When creating pull requests:**
1. **Read the current PR template**: Always check `.github/PULL_REQUEST_TEMPLATE.md` for the latest format
2. **Use the template sections**: Include all sections from the template (SUMMARY, BEFORE/AFTER, TESTING INSTRUCTIONS, ADDITIONAL INFORMATION)
3. **Follow PR title conventions**: Use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/)
- Format: `type(scope): description`
- Example: `fix(dashboard): load charts correctly`
- Types: `fix`, `feat`, `docs`, `style`, `refactor`, `perf`, `test`, `chore`
**Important**: Always reference the actual template file at `.github/PULL_REQUEST_TEMPLATE.md` instead of using cached content, as the template may be updated over time.
## Pre-commit Validation
**Use pre-commit hooks for quality validation:**

View File

@@ -91,7 +91,7 @@ js-format:
cd superset-frontend; npm run prettier
flask-app:
flask run -p 8088 --reload --debugger
flask run -p 8088 --with-threads --reload --debugger
node-app:
cd superset-frontend; npm run dev-server

View File

@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM python:3.10-slim-trixie
FROM python:3.10-slim-bookworm
RUN useradd --user-group --create-home --no-log-init --shell /bin/bash superset

View File

@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM python:3.10-slim-trixie
FROM python:3.10-slim-bookworm
RUN useradd --user-group --create-home --no-log-init --shell /bin/bash superset

View File

@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM python:3.10-slim-trixie
FROM python:3.10-slim-bookworm
ARG VERSION
RUN git clone --depth 1 --branch ${VERSION} https://github.com/apache/superset.git /superset

View File

@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM python:3.10-slim-trixie
FROM python:3.10-slim-bookworm
RUN apt-get update -y
RUN apt-get install -y \

View File

@@ -469,10 +469,6 @@ an account first if you don't have one, and reference your username
while requesting access to push packages.
```bash
# Run this first to make sure you are uploading the right version.
# Pypi does not allow you to delete or retract once uplaoded.
twine check dist/*
twine upload dist/*
```
@@ -522,8 +518,6 @@ takes the version (ie `3.1.1`), the git reference (any SHA, tag or branch
reference), and whether to force the `latest` Docker tag on the
generated images.
**NOTE:** If the docker image isn't built, you'll need to run this [GH action](https://github.com/apache/superset/actions/workflows/tag-release.yml) where you provide it the tag sha.
### Npm Release
You might want to publish the latest @superset-ui release to npm

View File

@@ -22,9 +22,8 @@ under the License.
This file documents any backwards-incompatible changes in Superset and
assists people when migrating to a new version.
## Next
## 6.0.0
- [33055](https://github.com/apache/superset/pull/33055): Upgrades Flask-AppBuilder to 5.0.0. The AUTH_OID authentication type has been deprecated and is no longer available as an option in Flask-AppBuilder. OpenID (OID) is considered a deprecated authentication protocol - if you are using AUTH_OID, you will need to migrate to an alternative authentication method such as OAuth, LDAP, or database authentication before upgrading.
- [35062](https://github.com/apache/superset/pull/35062): Changed the function signature of `setupExtensions` to `setupCodeOverrides` with options as arguments.
- [34871](https://github.com/apache/superset/pull/34871): Fixed Jest test hanging issue from Ant Design v5 upgrade. MessageChannel is now mocked in test environment to prevent rc-overflow from causing Jest to hang. Test environment only - no production impact.
- [34782](https://github.com/apache/superset/pull/34782): Dataset exports now include the dataset ID in their file name (similar to charts and dashboards). If managing assets as code, make sure to rename existing dataset YAMLs to include the ID (and avoid duplicated files).
- [34536](https://github.com/apache/superset/pull/34536): The `ENVIRONMENT_TAG_CONFIG` color values have changed to support only Ant Design semantic colors. Update your `superset_config.py`:

View File

@@ -28,7 +28,6 @@ x-superset-image: &superset-image apachesuperset.docker.scarf.sh/apache/superset
x-superset-volumes:
&superset-volumes # /app/pythonpath_docker will be appended to the PYTHONPATH in the final container
- ./docker:/app/docker
- ./superset-core:/app/superset-core
- superset_home:/app/superset_home
services:

View File

@@ -71,13 +71,12 @@ x-common-build: &common-build
context: .
target: ${SUPERSET_BUILD_TARGET:-dev} # can use `dev` (default) or `lean`
cache_from:
- apache/superset-cache:3.10-slim-trixie
- apache/superset-cache:3.10-slim-bookworm
args:
DEV_MODE: "true"
INCLUDE_CHROMIUM: ${INCLUDE_CHROMIUM:-false}
INCLUDE_FIREFOX: ${INCLUDE_FIREFOX:-false}
BUILD_TRANSLATIONS: ${BUILD_TRANSLATIONS:-false}
LOAD_EXAMPLES_DUCKDB: ${LOAD_EXAMPLES_DUCKDB:-true}
services:
db-light:
@@ -92,7 +91,9 @@ services:
- db_home_light:/var/lib/postgresql/data
- ./docker/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
environment:
# Override database name to avoid conflicts
POSTGRES_DB: superset_light
# Increase max connections for test runs
command: postgres -c max_connections=200
superset-light:
@@ -105,6 +106,7 @@ services:
<<: *common-build
command: ["/app/docker/docker-bootstrap.sh", "app"]
restart: unless-stopped
# No host port mapping - accessed via webpack dev server proxy
extra_hosts:
- "host.docker.internal:host-gateway"
user: *superset-user
@@ -113,13 +115,16 @@ services:
condition: service_completed_successfully
volumes: *superset-volumes
environment:
# Override DB connection for light service
DATABASE_HOST: db-light
DATABASE_DB: superset_light
POSTGRES_DB: superset_light
SUPERSET__SQLALCHEMY_EXAMPLES_URI: "duckdb:////app/data/examples.duckdb"
EXAMPLES_HOST: db-light
EXAMPLES_DB: superset_light
EXAMPLES_USER: superset
EXAMPLES_PASSWORD: superset
# Use light-specific config that disables Redis
SUPERSET_CONFIG_PATH: /app/docker/pythonpath_dev/superset_config_docker_light.py
GITHUB_HEAD_REF: ${GITHUB_HEAD_REF:-}
GITHUB_SHA: ${GITHUB_SHA:-}
superset-init-light:
build:
@@ -130,16 +135,21 @@ services:
required: true
- path: docker/.env-local # optional override
required: false
user: *superset-user
depends_on:
db-light:
condition: service_started
user: *superset-user
volumes: *superset-volumes
environment:
# Override DB connection for light service
DATABASE_HOST: db-light
DATABASE_DB: superset_light
POSTGRES_DB: superset_light
SUPERSET__SQLALCHEMY_EXAMPLES_URI: "duckdb:////app/data/examples.duckdb"
EXAMPLES_HOST: db-light
EXAMPLES_DB: superset_light
EXAMPLES_USER: superset
EXAMPLES_PASSWORD: superset
# Use light-specific config that disables Redis
SUPERSET_CONFIG_PATH: /app/docker/pythonpath_dev/superset_config_docker_light.py
healthcheck:
disable: true
@@ -162,11 +172,8 @@ services:
SCARF_ANALYTICS: "${SCARF_ANALYTICS:-}"
# configuring the dev-server to use the host.docker.internal to connect to the backend
superset: "http://superset-light:8088"
# Webpack dev server configuration
WEBPACK_DEVSERVER_HOST: "${WEBPACK_DEVSERVER_HOST:-127.0.0.1}"
WEBPACK_DEVSERVER_PORT: "${WEBPACK_DEVSERVER_PORT:-9000}"
ports:
- "${NODE_PORT:-9001}:9000" # Parameterized port, accessible on all interfaces
- "127.0.0.1:${NODE_PORT:-9001}:9000" # Parameterized port
command: ["/app/docker/docker-frontend.sh"]
env_file:
- path: docker/.env # default
@@ -192,12 +199,15 @@ services:
user: *superset-user
volumes: *superset-volumes
environment:
# Test-specific database configuration
DATABASE_HOST: db-light
DATABASE_DB: test
POSTGRES_DB: test
# Point to test database
SUPERSET__SQLALCHEMY_DATABASE_URI: postgresql+psycopg2://superset:superset@db-light:5432/test
SUPERSET__SQLALCHEMY_EXAMPLES_URI: "duckdb:////app/data/examples.duckdb"
# Use the light test config that doesn't require Redis
SUPERSET_CONFIG: superset_test_config_light
# Python path includes test directory
PYTHONPATH: /app/pythonpath:/app/docker/pythonpath_dev:/app
volumes:

View File

@@ -33,7 +33,7 @@ x-common-build: &common-build
context: .
target: dev
cache_from:
- apache/superset-cache:3.10-slim-trixie
- apache/superset-cache:3.10-slim-bookworm
services:
redis:

View File

@@ -29,22 +29,19 @@ x-superset-volumes: &superset-volumes
# /app/pythonpath_docker will be appended to the PYTHONPATH in the final container
- ./docker:/app/docker
- ./superset:/app/superset
- ./superset-core:/app/superset-core
- ./superset-frontend:/app/superset-frontend
- superset_home:/app/superset_home
- ./tests:/app/tests
- superset_data:/app/data
x-common-build: &common-build
context: .
target: ${SUPERSET_BUILD_TARGET:-dev} # can use `dev` (default) or `lean`
cache_from:
- apache/superset-cache:3.10-slim-trixie
- apache/superset-cache:3.10-slim-bookworm
args:
DEV_MODE: "true"
INCLUDE_CHROMIUM: ${INCLUDE_CHROMIUM:-false}
INCLUDE_FIREFOX: ${INCLUDE_FIREFOX:-false}
BUILD_TRANSLATIONS: ${BUILD_TRANSLATIONS:-false}
LOAD_EXAMPLES_DUCKDB: ${LOAD_EXAMPLES_DUCKDB:-true}
services:
nginx:
@@ -110,8 +107,6 @@ services:
superset-init:
condition: service_completed_successfully
volumes: *superset-volumes
environment:
SUPERSET__SQLALCHEMY_EXAMPLES_URI: "duckdb:////app/data/examples.duckdb"
superset-websocket:
container_name: superset_websocket
@@ -163,8 +158,6 @@ services:
condition: service_started
user: *superset-user
volumes: *superset-volumes
environment:
SUPERSET__SQLALCHEMY_EXAMPLES_URI: "duckdb:////app/data/examples.duckdb"
healthcheck:
disable: true
@@ -276,5 +269,3 @@ volumes:
external: false
redis:
external: false
superset_data:
external: false

View File

@@ -18,7 +18,7 @@
set -euo pipefail
# Ensure this script is run as root
if [[ ${EUID} -ne 0 ]]; then
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" >&2
exit 1
fi
@@ -42,7 +42,7 @@ echo -e "${GREEN}Installing packages: $@${RESET}"
apt-get install -yqq --no-install-recommends "$@"
echo -e "${GREEN}Autoremoving unnecessary packages...${RESET}"
apt-get autoremove -yqq --purge
apt-get autoremove -y
echo -e "${GREEN}Cleaning up package cache and metadata...${RESET}"
apt-get clean

View File

@@ -21,15 +21,8 @@ set -eo pipefail
# Make python interactive
if [ "$DEV_MODE" == "true" ]; then
if [ "$(whoami)" = "root" ] && command -v uv > /dev/null 2>&1; then
# Always ensure superset-core is available
echo "Installing superset-core in editable mode"
uv pip install --no-deps -e /app/superset-core
# Only reinstall the main app for non-worker processes
if [ "$1" != "worker" ] && [ "$1" != "beat" ]; then
echo "Reinstalling the app in editable mode"
uv pip install -e .
fi
echo "Reinstalling the app in editable mode"
uv pip install -e .
fi
fi
REQUIREMENTS_LOCAL="/app/docker/requirements-local.txt"
@@ -41,8 +34,7 @@ if [ "$CYPRESS_CONFIG" == "true" ]; then
export SUPERSET__SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://superset:superset@db:5432/superset_cypress
PORT=8081
fi
# Skip postgres requirements installation for workers to avoid conflicts
if [[ "$DATABASE_DIALECT" == postgres* ]] && [ "$(whoami)" = "root" ] && [ "$1" != "worker" ] && [ "$1" != "beat" ]; then
if [[ "$DATABASE_DIALECT" == postgres* ]] && [ "$(whoami)" = "root" ]; then
# older images may not have the postgres dev requirements installed
echo "Installing postgres requirements"
if command -v uv > /dev/null 2>&1; then
@@ -80,7 +72,7 @@ case "${1}" in
;;
app)
echo "Starting web app (using development server)..."
flask run -p $PORT --reload --debugger --without-threads --host=0.0.0.0
flask run -p $PORT --with-threads --reload --debugger --host=0.0.0.0
;;
app-gunicorn)
echo "Starting web app..."

View File

@@ -69,8 +69,6 @@ echo_step "3" "Complete" "Setting up roles and perms"
if [ "$SUPERSET_LOAD_EXAMPLES" = "yes" ]; then
# Load some data to play with
echo_step "4" "Starting" "Loading examples"
# If Cypress run which consumes superset_test_config load required data for tests
if [ "$CYPRESS_CONFIG" == "true" ]; then
superset load_examples --load-test-data

View File

@@ -38,14 +38,14 @@ for arg in "$@"; do
done
# Install build-essential if required
if ${REQUIRES_BUILD_ESSENTIAL}; then
if $REQUIRES_BUILD_ESSENTIAL; then
echo "Installing build-essential for package builds..."
apt-get update -qq \
&& apt-get install -yqq --no-install-recommends build-essential
fi
# Choose whether to use pip cache
if ${USE_CACHE}; then
if $USE_CACHE; then
echo "Using pip cache..."
uv pip install "${ARGS[@]}"
else
@@ -54,7 +54,7 @@ else
fi
# Remove build-essential if it was installed
if ${REQUIRES_BUILD_ESSENTIAL}; then
if $REQUIRES_BUILD_ESSENTIAL; then
echo "Removing build-essential to keep the image lean..."
apt-get autoremove -yqq --purge build-essential \
&& apt-get clean \

View File

@@ -49,18 +49,12 @@ SQLALCHEMY_DATABASE_URI = (
f"{DATABASE_HOST}:{DATABASE_PORT}/{DATABASE_DB}"
)
# Use environment variable if set, otherwise construct from components
# This MUST take precedence over any other configuration
SQLALCHEMY_EXAMPLES_URI = os.getenv(
"SUPERSET__SQLALCHEMY_EXAMPLES_URI",
(
f"{DATABASE_DIALECT}://"
f"{EXAMPLES_USER}:{EXAMPLES_PASSWORD}@"
f"{EXAMPLES_HOST}:{EXAMPLES_PORT}/{EXAMPLES_DB}"
),
SQLALCHEMY_EXAMPLES_URI = (
f"{DATABASE_DIALECT}://"
f"{EXAMPLES_USER}:{EXAMPLES_PASSWORD}@"
f"{EXAMPLES_HOST}:{EXAMPLES_PORT}/{EXAMPLES_DB}"
)
REDIS_HOST = os.getenv("REDIS_HOST", "redis")
REDIS_PORT = os.getenv("REDIS_PORT", "6379")
REDIS_CELERY_DB = os.getenv("REDIS_CELERY_DB", "0")
@@ -138,7 +132,7 @@ try:
from superset_config_docker import * # noqa: F403
logger.info(
"Loaded your Docker configuration at [%s]", superset_config_docker.__file__
f"Loaded your Docker configuration at [{superset_config_docker.__file__}]"
)
except ImportError:
logger.info("Using default Docker config...")

View File

@@ -21,183 +21,3 @@ This is the public documentation site for Superset, built using
[Docusaurus 3](https://docusaurus.io/). See
[CONTRIBUTING.md](../CONTRIBUTING.md#documentation) for documentation on
contributing to documentation.
## Version Management
The Superset documentation site uses Docusaurus versioning with three independent versioned sections:
- **Main Documentation** (`/docs/`) - Core Superset documentation
- **Developer Portal** (`/developer_portal/`) - Developer guides and tutorials
- **Component Playground** (`/components/`) - Interactive component examples (currently disabled)
Each section maintains its own version history and can be versioned independently.
### Creating a New Version
To create a new version for any section, use the Docusaurus version command with the appropriate plugin ID or use our automated scripts:
#### Using Automated Scripts (Required)
**⚠️ Important:** Always use these custom commands instead of the native Docusaurus commands. These scripts ensure that both the Docusaurus versioning system AND the `versions-config.json` file are updated correctly.
```bash
# Main Documentation
yarn version:add:docs 1.2.0
# Developer Portal
yarn version:add:developer_portal 1.2.0
# Component Playground (when enabled)
yarn version:add:components 1.2.0
```
**Do NOT use** the native Docusaurus commands directly (`yarn docusaurus docs:version`), as they will:
- ❌ Create version files but NOT update `versions-config.json`
- ❌ Cause versions to not appear in dropdown menus
- ❌ Require manual fixes to synchronize the configuration
### Managing Versions
#### With Automated Scripts
The automated scripts handle all configuration updates automatically. No manual editing required!
#### Manual Configuration
If creating versions manually, you'll need to:
1. **Update `versions-config.json`** (or `docusaurus.config.ts` if not using dynamic config):
- Add version to `onlyIncludeVersions` array
- Add version metadata to `versions` object
- Update `lastVersion` if needed
2. **Files Created by Versioning**:
When a new version is created, Docusaurus generates:
- **Versioned docs folder**: `[section]_versioned_docs/version-X.X.X/`
- **Versioned sidebars**: `[section]_versioned_sidebars/version-X.X.X-sidebars.json`
- **Versions list**: `[section]_versions.json`
Note: For main docs, the prefix is omitted (e.g., `versioned_docs/` instead of `docs_versioned_docs/`)
3. **Important**: After adding a version, restart the development server to see changes:
```bash
yarn stop
yarn start
```
### Removing a Version
#### Using Automated Scripts (Recommended)
```bash
# Main Documentation
yarn version:remove:docs 1.0.0
# Developer Portal
yarn version:remove:developer_portal 1.0.0
# Component Playground
yarn version:remove:components 1.0.0
```
#### Manual Removal
To manually remove a version:
1. **Delete the version folder** from the appropriate location:
- Main docs: `versioned_docs/version-X.X.X/` (no prefix for main)
- Developer Portal: `developer_portal_versioned_docs/version-X.X.X/`
- Components: `components_versioned_docs/version-X.X.X/`
2. **Delete the version metadata file**:
- Main docs: `versioned_sidebars/version-X.X.X-sidebars.json` (no prefix)
- Developer Portal: `developer_portal_versioned_sidebars/version-X.X.X-sidebars.json`
- Components: `components_versioned_sidebars/version-X.X.X-sidebars.json`
3. **Update the versions list file**:
- Main docs: `versions.json`
- Developer Portal: `developer_portal_versions.json`
- Components: `components_versions.json`
4. **Update configuration**:
- If using dynamic config: Update `versions-config.json`
- If using static config: Update `docusaurus.config.ts`
5. **Restart the server** to see changes
### Version Configuration Examples
#### Main Documentation (default plugin)
```typescript
docs: {
includeCurrentVersion: true,
lastVersion: 'current', // Makes /docs/ show Next version
onlyIncludeVersions: ['current', '1.1.0', '1.0.0'],
versions: {
current: {
label: 'Next',
path: '', // Empty path for default routing
banner: 'unreleased',
},
'1.1.0': {
label: '1.1.0',
path: '1.1.0',
banner: 'none',
},
},
}
```
#### Developer Portal & Components (custom plugins)
```typescript
{
id: 'developer_portal',
path: 'developer_portal',
routeBasePath: 'developer_portal',
includeCurrentVersion: true,
lastVersion: '1.1.0', // Default version
onlyIncludeVersions: ['current', '1.1.0', '1.0.0'],
versions: {
current: {
label: 'Next',
path: 'next',
banner: 'unreleased',
},
'1.1.0': {
label: '1.1.0',
path: '1.1.0',
banner: 'none',
},
},
}
```
### Best Practices
1. **Version naming**: Use semantic versioning (e.g., 1.0.0, 1.1.0, 2.0.0)
2. **Version banners**: Use `'unreleased'` for development versions, `'none'` for stable releases
3. **Limit displayed versions**: Use `onlyIncludeVersions` to show only relevant versions
4. **Test locally**: Always test version changes locally before deploying
5. **Independent versioning**: Each section can have different version numbers and release cycles
### Troubleshooting
#### Version Not Showing After Creation
If you accidentally used `yarn docusaurus docs:version` instead of `yarn version:add`:
1. **Problem**: The version files were created but `versions-config.json` wasn't updated
2. **Solution**: Either:
- Revert the changes: `git restore versions.json && rm -rf versioned_docs/ versioned_sidebars/`
- Then use the correct command: `yarn version:add:docs <version>`
For other issues:
- **Restart the server**: Changes to version configuration require a server restart
- **Check config file**: Ensure `versions-config.json` includes the new version
- **Verify files exist**: Check that versioned docs folder was created
#### Broken Links in Versioned Documentation
When creating a new version, links in the documentation are preserved as-is. Common issues:
- **Cross-section links**: Links between sections (e.g., from developer_portal to docs) need to be version-aware
- **Absolute vs relative paths**: Use relative paths within the same section
- **Version-specific URLs**: Update hardcoded URLs to use version variables
To fix broken links:
1. Use `type: 'doc'` with `docId` for version-aware navigation in navbar
2. Use relative paths within the same documentation section
3. Test all versions after creation to identify broken links

View File

@@ -1,105 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
---
title: Bar Chart
sidebar_position: 1
---
# Bar Chart Component
The Bar Chart component is used to visualize categorical data with rectangular bars.
## Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `data` | `array` | `[]` | Array of data objects to visualize |
| `width` | `number` | `800` | Width of the chart in pixels |
| `height` | `number` | `600` | Height of the chart in pixels |
| `xField` | `string` | - | Field name for x-axis values |
| `yField` | `string` | - | Field name for y-axis values |
| `colorField` | `string` | - | Field name for color encoding |
| `colorScheme` | `string` | `'supersetColors'` | Color scheme to use |
| `showLegend` | `boolean` | `true` | Whether to show the legend |
| `showGrid` | `boolean` | `true` | Whether to show grid lines |
| `labelPosition` | `string` | `'top'` | Position of bar labels: 'top', 'middle', 'bottom' |
## Examples
### Basic Bar Chart
```jsx
import { BarChart } from '@superset-ui/chart-components';
const data = [
{ category: 'A', value: 10 },
{ category: 'B', value: 20 },
{ category: 'C', value: 15 },
{ category: 'D', value: 25 },
];
function Example() {
return (
<BarChart
data={data}
width={800}
height={400}
xField="category"
yField="value"
colorScheme="supersetColors"
/>
);
}
```
### Grouped Bar Chart
```jsx
import { BarChart } from '@superset-ui/chart-components';
const data = [
{ category: 'A', group: 'Group 1', value: 10 },
{ category: 'A', group: 'Group 2', value: 15 },
{ category: 'B', group: 'Group 1', value: 20 },
{ category: 'B', group: 'Group 2', value: 25 },
{ category: 'C', group: 'Group 1', value: 15 },
{ category: 'C', group: 'Group 2', value: 10 },
];
function Example() {
return (
<BarChart
data={data}
width={800}
height={400}
xField="category"
yField="value"
colorField="group"
colorScheme="supersetColors"
/>
);
}
```
## Best Practices
- Use bar charts when comparing quantities across categories
- Sort bars by value for better readability, unless there's a natural order to the categories
- Use consistent colors for the same categories across different charts
- Consider using horizontal bar charts when category labels are long

View File

@@ -1,59 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
---
title: Component Library
sidebar_position: 1
---
# Superset Component Library
Welcome to the Apache Superset Component Library documentation. This section provides comprehensive documentation for all the UI components, chart components, and layout components used in Superset.
## What is the Component Library?
The Component Library is a collection of reusable UI components that are used to build the Superset user interface. These components are designed to be consistent, accessible, and easy to use.
## Component Categories
The Component Library is organized into the following categories:
### UI Components
Basic UI components like buttons, inputs, dropdowns, and other form elements.
### Chart Components
Visualization components used to render different types of charts and graphs.
### Layout Components
Components used for page layout, such as containers, grids, and navigation elements.
## Versioning
The Component Library documentation follows its own versioning scheme, independent from the main Superset documentation. This allows us to update the component documentation as the components evolve, without affecting the main documentation.
## Getting Started
Browse the sidebar to explore the different components available in the library. Each component documentation includes:
- Component description and purpose
- Props and configuration options
- Usage examples
- Best practices

View File

@@ -1,113 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
---
title: Grid
sidebar_position: 1
---
# Grid Component
The Grid component provides a flexible layout system for arranging content in rows and columns.
## Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `gutter` | `number` or `[number, number]` | `0` | Grid spacing between items, can be a single number or [horizontal, vertical] |
| `columns` | `number` | `12` | Number of columns in the grid |
| `justify` | `string` | `'start'` | Horizontal alignment: 'start', 'center', 'end', 'space-between', 'space-around' |
| `align` | `string` | `'top'` | Vertical alignment: 'top', 'middle', 'bottom' |
| `wrap` | `boolean` | `true` | Whether to wrap items when they overflow |
### Row Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `gutter` | `number` or `[number, number]` | `0` | Spacing between items in the row |
| `justify` | `string` | `'start'` | Horizontal alignment for this row |
| `align` | `string` | `'top'` | Vertical alignment for this row |
### Col Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `span` | `number` | - | Number of columns the grid item spans |
| `offset` | `number` | `0` | Number of columns the grid item is offset |
| `xs`, `sm`, `md`, `lg`, `xl` | `number` or `object` | - | Responsive props for different screen sizes |
## Examples
### Basic Grid
```jsx
import { Grid, Row, Col } from '@superset-ui/core';
function Example() {
return (
<Grid>
<Row gutter={16}>
<Col span={8}>
<div>Column 1</div>
</Col>
<Col span={8}>
<div>Column 2</div>
</Col>
<Col span={8}>
<div>Column 3</div>
</Col>
</Row>
</Grid>
);
}
```
### Responsive Grid
```jsx
import { Grid, Row, Col } from '@superset-ui/core';
function Example() {
return (
<Grid>
<Row gutter={[16, 24]}>
<Col xs={24} sm={12} md={8} lg={6}>
<div>Responsive Column 1</div>
</Col>
<Col xs={24} sm={12} md={8} lg={6}>
<div>Responsive Column 2</div>
</Col>
<Col xs={24} sm={12} md={8} lg={6}>
<div>Responsive Column 3</div>
</Col>
<Col xs={24} sm={12} md={8} lg={6}>
<div>Responsive Column 4</div>
</Col>
</Row>
</Grid>
);
}
```
## Best Practices
- Use the Grid system for complex layouts that need to be responsive
- Specify column widths for different screen sizes to ensure proper responsive behavior
- Use gutters to create appropriate spacing between grid items
- Keep the grid structure consistent throughout your application
- Consider using the grid system for dashboard layouts to ensure consistent spacing and alignment

View File

@@ -1,35 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
---
title: Test
---
import { StoryExample } from '../src/components/StorybookWrapper';
# Test
This is a test using our custom StorybookWrapper component.
<StoryExample
component={() => (
<div style={{ padding: '10px', background: '#f0f0f0', borderRadius: '4px' }}>
This is a simple example component
</div>
)}
/>

View File

@@ -1,146 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
---
title: Button Component
sidebar_position: 1
---
import { StoryExample, StoryWithControls } from '../../src/components/StorybookWrapper';
import { Button } from '../../../superset-frontend/packages/superset-ui-core/src/components/Button';
# Button Component
The Button component is a fundamental UI element used throughout Superset for user interactions.
## Basic Usage
The default button with primary styling:
<StoryExample
component={() => (
<Button buttonStyle="primary" onClick={() => console.log('Clicked!')}>
Click Me
</Button>
)}
/>
## Interactive Example
<StoryWithControls
component={({ buttonStyle, buttonSize, label, disabled }) => (
<Button
buttonStyle={buttonStyle}
buttonSize={buttonSize}
disabled={disabled}
onClick={() => console.log('Clicked!')}
>
{label}
</Button>
)}
props={{
buttonStyle: 'primary',
buttonSize: 'default',
label: 'Click Me',
disabled: false
}}
controls={[
{
name: 'buttonStyle',
label: 'Button Style',
type: 'select',
options: ['primary', 'secondary', 'tertiary', 'success', 'warning', 'danger', 'default', 'link', 'dashed']
},
{
name: 'buttonSize',
label: 'Button Size',
type: 'select',
options: ['default', 'small', 'xsmall']
},
{
name: 'label',
label: 'Button Text',
type: 'text'
},
{
name: 'disabled',
label: 'Disabled',
type: 'boolean'
}
]}
/>
## Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `buttonStyle` | `'primary' \| 'secondary' \| 'tertiary' \| 'success' \| 'warning' \| 'danger' \| 'default' \| 'link' \| 'dashed'` | `'default'` | Button style |
| `buttonSize` | `'default' \| 'small' \| 'xsmall'` | `'default'` | Button size |
| `disabled` | `boolean` | `false` | Whether the button is disabled |
| `cta` | `boolean` | `false` | Whether the button is a call-to-action button |
| `tooltip` | `ReactNode` | - | Tooltip content |
| `placement` | `TooltipProps['placement']` | - | Tooltip placement |
| `onClick` | `function` | - | Callback when button is clicked |
| `href` | `string` | - | Turns button into an anchor link |
| `target` | `string` | - | Target attribute for anchor links |
## Usage
```jsx
import Button from 'src/components/Button';
function MyComponent() {
return (
<Button
buttonStyle="primary"
onClick={() => console.log('Button clicked')}
>
Click Me
</Button>
);
}
```
## Button Styles
Superset provides a variety of button styles for different purposes:
- **Primary**: Used for primary actions
- **Secondary**: Used for secondary actions
- **Tertiary**: Used for less important actions
- **Success**: Used for successful or confirming actions
- **Warning**: Used for actions that require caution
- **Danger**: Used for destructive actions
- **Link**: Used for navigation
- **Dashed**: Used for adding new items or features
## Button Sizes
Buttons come in three sizes:
- **Default**: Standard size for most use cases
- **Small**: Compact size for tight spaces
- **XSmall**: Extra small size for very limited spaces
## Best Practices
- Use primary buttons for the main action in a form or page
- Use secondary buttons for alternative actions
- Use danger buttons for destructive actions
- Limit the number of primary buttons on a page to avoid confusion
- Use consistent button styles throughout your application
- Add tooltips to buttons when their purpose might not be immediately clear

View File

@@ -1 +0,0 @@
[]

View File

@@ -1 +0,0 @@
[]

View File

@@ -1,477 +0,0 @@
---
title: Frontend API Reference
sidebar_position: 1
hide_title: true
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Frontend API Reference
The `@apache-superset/core` package provides comprehensive APIs for frontend extension development. All APIs are organized into logical namespaces for easy discovery and use.
## Core API
The core namespace provides fundamental extension functionality.
### registerView
Registers a new view or panel in the specified contribution point.
```typescript
core.registerView(
id: string,
component: React.ComponentType
): Disposable
```
**Example:**
```typescript
const panel = context.core.registerView('my-extension.panel', () => (
<MyPanelComponent />
));
```
### getActiveView
Gets the currently active view in a contribution area.
```typescript
core.getActiveView(area: string): View | undefined
```
## Commands API
Manages command registration and execution.
### registerCommand
Registers a new command that can be triggered by menus, shortcuts, or programmatically.
```typescript
commands.registerCommand(
id: string,
handler: CommandHandler
): Disposable
interface CommandHandler {
title: string;
icon?: string;
execute: (...args: any[]) => any;
isEnabled?: (...args: any[]) => boolean;
}
```
**Example:**
```typescript
const cmd = context.commands.registerCommand('my-extension.analyze', {
title: 'Analyze Query',
icon: 'BarChartOutlined',
execute: () => {
const query = context.sqlLab.getCurrentQuery();
// Perform analysis
},
isEnabled: () => {
return context.sqlLab.hasActiveEditor();
}
});
```
### executeCommand
Executes a registered command by ID.
```typescript
commands.executeCommand(id: string, ...args: any[]): Promise<any>
```
## SQL Lab API
Provides access to SQL Lab functionality and events.
### Query Access
```typescript
// Get current tab
sqlLab.getCurrentTab(): Tab | undefined
// Get all tabs
sqlLab.getTabs(): Tab[]
// Get current query
sqlLab.getCurrentQuery(): string
// Get selected text
sqlLab.getSelectedText(): string | undefined
```
### Database Access
```typescript
// Get available databases
sqlLab.getDatabases(): Database[]
// Get database by ID
sqlLab.getDatabase(id: number): Database | undefined
// Get schemas for database
sqlLab.getSchemas(databaseId: number): Promise<string[]>
// Get tables for schema
sqlLab.getTables(
databaseId: number,
schema: string
): Promise<Table[]>
```
### Events
```typescript
// Query execution events
sqlLab.onDidQueryRun: Event<QueryResult>
sqlLab.onDidQueryStop: Event<QueryResult>
sqlLab.onDidQueryFail: Event<QueryError>
// Editor events
sqlLab.onDidChangeEditorContent: Event<string>
sqlLab.onDidChangeSelection: Event<Selection>
// Tab events
sqlLab.onDidChangeActiveTab: Event<Tab>
sqlLab.onDidCloseTab: Event<Tab>
sqlLab.onDidChangeTabTitle: Event<{tab: Tab, title: string}>
// Panel events
sqlLab.onDidOpenPanel: Event<Panel>
sqlLab.onDidClosePanel: Event<Panel>
sqlLab.onDidChangeActivePanel: Event<Panel>
```
**Event Usage Example:**
```typescript
const disposable = context.sqlLab.onDidQueryRun((result) => {
console.log('Query executed:', result.query);
console.log('Rows returned:', result.rowCount);
console.log('Execution time:', result.executionTime);
});
// Remember to dispose when done
context.subscriptions.push(disposable);
```
## Authentication API
Handles authentication and security tokens.
### getCSRFToken
Gets the current CSRF token for API requests.
```typescript
authentication.getCSRFToken(): Promise<string>
```
### getCurrentUser
Gets information about the current user.
```typescript
authentication.getCurrentUser(): User
interface User {
id: number;
username: string;
email: string;
roles: Role[];
permissions: Permission[];
}
```
### hasPermission
Checks if the current user has a specific permission.
```typescript
authentication.hasPermission(permission: string): boolean
```
## Extensions API
Manages extension lifecycle and inter-extension communication.
### getExtension
Gets information about an installed extension.
```typescript
extensions.getExtension(id: string): Extension | undefined
interface Extension {
id: string;
name: string;
version: string;
isActive: boolean;
metadata: ExtensionMetadata;
}
```
### getActiveExtensions
Gets all currently active extensions.
```typescript
extensions.getActiveExtensions(): Extension[]
```
### Events
```typescript
// Extension lifecycle events
extensions.onDidActivateExtension: Event<Extension>
extensions.onDidDeactivateExtension: Event<Extension>
```
## UI Components
Import pre-built UI components from `@apache-superset/core`:
```typescript
import {
Button,
Select,
Input,
Table,
Modal,
Alert,
Tabs,
Card,
Dropdown,
Menu,
Tooltip,
Icon,
// ... many more
} from '@apache-superset/core';
```
### Example Component Usage
```typescript
import { Button, Alert } from '@apache-superset/core';
function MyExtensionPanel() {
return (
<div>
<Alert
message="Extension Loaded"
description="Your extension is ready to use"
type="success"
/>
<Button
type="primary"
onClick={() => console.log('Clicked!')}
>
Execute Action
</Button>
</div>
);
}
```
## Storage API
Provides persistent storage for extension data.
### Local Storage
```typescript
// Store data
storage.local.set(key: string, value: any): Promise<void>
// Retrieve data
storage.local.get(key: string): Promise<any>
// Remove data
storage.local.remove(key: string): Promise<void>
// Clear all extension data
storage.local.clear(): Promise<void>
```
### Workspace Storage
Workspace storage is shared across all users for collaborative features.
```typescript
storage.workspace.set(key: string, value: any): Promise<void>
storage.workspace.get(key: string): Promise<any>
storage.workspace.remove(key: string): Promise<void>
```
## Network API
Utilities for making API calls to Superset.
### fetch
Enhanced fetch with CSRF token handling.
```typescript
network.fetch(url: string, options?: RequestInit): Promise<Response>
```
### API Client
Type-safe API client for Superset endpoints.
```typescript
// Get chart data
network.api.charts.get(id: number): Promise<Chart>
// Query database
network.api.sqlLab.execute(
databaseId: number,
query: string
): Promise<QueryResult>
// Get datasets
network.api.datasets.list(): Promise<Dataset[]>
```
## Utility Functions
### Formatting
```typescript
// Format numbers
utils.formatNumber(value: number, format?: string): string
// Format dates
utils.formatDate(date: Date, format?: string): string
// Format SQL
utils.formatSQL(sql: string): string
```
### Validation
```typescript
// Validate SQL syntax
utils.validateSQL(sql: string): ValidationResult
// Check if valid database ID
utils.isValidDatabaseId(id: any): boolean
```
## TypeScript Types
Import common types for type safety:
```typescript
import type {
Database,
Dataset,
Chart,
Dashboard,
Query,
QueryResult,
Tab,
Panel,
User,
Role,
Permission,
ExtensionContext,
Disposable,
Event,
// ... more types
} from '@apache-superset/core';
```
## Extension Context
The context object passed to your extension's `activate` function:
```typescript
interface ExtensionContext {
// Subscription management
subscriptions: Disposable[];
// Extension metadata
extensionId: string;
extensionPath: string;
// API namespaces
core: CoreAPI;
commands: CommandsAPI;
sqlLab: SqlLabAPI;
authentication: AuthenticationAPI;
extensions: ExtensionsAPI;
storage: StorageAPI;
network: NetworkAPI;
utils: UtilsAPI;
// Logging
logger: Logger;
}
```
## Event Handling
Events follow the VS Code pattern with subscribe/dispose:
```typescript
// Subscribe to event
const disposable = sqlLab.onDidQueryRun((result) => {
// Handle event
});
// Dispose when done
disposable.dispose();
// Or add to context for automatic cleanup
context.subscriptions.push(disposable);
```
## Best Practices
1. **Always dispose subscriptions** to prevent memory leaks
2. **Use TypeScript** for better IDE support and type safety
3. **Handle errors gracefully** with try-catch blocks
4. **Check permissions** before sensitive operations
5. **Use provided UI components** for consistency
6. **Cache API responses** when appropriate
7. **Validate user input** before processing
## Version Compatibility
The frontend API follows semantic versioning:
- **Major version**: Breaking changes
- **Minor version**: New features, backward compatible
- **Patch version**: Bug fixes
Check compatibility in your `extension.json`:
```json
{
"engines": {
"@apache-superset/core": "^1.0.0"
}
}
```

View File

@@ -1,348 +0,0 @@
---
title: Architecture Overview
sidebar_position: 1
hide_title: true
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Extension Architecture Overview
The Superset extension architecture is designed to be modular, secure, and performant. This document provides a comprehensive overview of how extensions work and interact with the Superset host application.
## Core Principles
### 1. Lean Core
Superset's core remains minimal, with features delegated to extensions wherever possible. Built-in features use the same APIs as external extensions, ensuring API quality through dogfooding.
### 2. Explicit Contribution Points
All extension points are clearly defined and documented. Extensions declare their capabilities in metadata files, enabling predictable lifecycle management.
### 3. Versioned APIs
Public interfaces follow semantic versioning, ensuring backward compatibility and safe evolution of the platform.
### 4. Lazy Loading
Extensions load only when needed, minimizing performance impact and resource consumption.
### 5. Composability
Architecture patterns and APIs are reusable across different Superset modules, promoting consistency.
### 6. Community-Driven
The system evolves based on real-world feedback, with new extension points added as needs emerge.
## System Architecture
```mermaid
graph TB
subgraph "Superset Host Application"
Core[Core Application]
API[Extension APIs]
Loader[Extension Loader]
Manager[Extension Manager]
end
subgraph "Core Packages"
FrontendCore["@apache-superset/core<br/>(Frontend)"]
BackendCore["apache-superset-core<br/>(Backend)"]
CLI["apache-superset-extensions-cli"]
end
subgraph "Extension"
Metadata[extension.json]
Frontend[Frontend Code]
Backend[Backend Code]
Bundle[.supx Bundle]
end
Core --> API
API --> FrontendCore
API --> BackendCore
Loader --> Manager
Manager --> Bundle
Frontend --> FrontendCore
Backend --> BackendCore
CLI --> Bundle
```
## Key Components
### Host Application
The Superset host application provides:
- **Extension APIs**: Well-defined interfaces for extensions to interact with Superset
- **Extension Manager**: Handles lifecycle, activation, and deactivation
- **Module Loader**: Dynamically loads extension code using Webpack Module Federation
- **Security Context**: Manages permissions and sandboxing for extensions
### Core Packages
#### @apache-superset/core (Frontend)
- Shared UI components and utilities
- TypeScript type definitions
- Frontend API implementations
- Event system and command registry
#### apache-superset-core (Backend)
- Python base classes and utilities
- Database access APIs
- Security and permission helpers
- REST API registration
#### apache-superset-extensions-cli
- Project scaffolding
- Build and bundling tools
- Development server
- Package management
### Extension Structure
Each extension consists of:
- **Metadata** (`extension.json`): Declares capabilities and requirements
- **Frontend**: React components and TypeScript code
- **Backend**: Python modules and API endpoints
- **Assets**: Styles, images, and other resources
- **Bundle** (`.supx`): Packaged distribution format
## Module Federation
Extensions use Webpack Module Federation for dynamic loading:
```javascript
// Extension webpack.config.js
new ModuleFederationPlugin({
name: 'my_extension',
filename: 'remoteEntry.[contenthash].js',
exposes: {
'./index': './src/index.tsx',
},
externals: {
'@apache-superset/core': 'superset',
},
shared: {
react: { singleton: true },
'react-dom': { singleton: true },
}
})
```
This allows:
- **Independent builds**: Extensions compile separately from Superset
- **Shared dependencies**: Common libraries like React aren't duplicated
- **Dynamic loading**: Extensions load at runtime without rebuilding Superset
- **Version compatibility**: Extensions declare compatible core versions
## Extension Lifecycle
### 1. Registration
```typescript
// Extension registered with host
extensionManager.register({
name: 'my-extension',
version: '1.0.0',
manifest: manifestData
});
```
### 2. Activation
```typescript
// activate() called when extension loads
export function activate(context: ExtensionContext) {
// Register contributions
const disposables = [];
// Add panel
disposables.push(
context.core.registerView('my-panel', MyPanel)
);
// Register command
disposables.push(
context.commands.registerCommand('my-command', {
execute: () => { /* ... */ }
})
);
// Store for cleanup
context.subscriptions.push(...disposables);
}
```
### 3. Runtime
- Extension responds to events
- Provides UI components when requested
- Executes commands when triggered
- Accesses APIs as needed
### 4. Deactivation
```typescript
// Automatic cleanup of registered items
export function deactivate() {
// context.subscriptions automatically disposed
// Additional cleanup if needed
}
```
## Contribution Types
### Views
Extensions can add panels and UI components:
```json
{
"views": {
"sqllab.panels": [{
"id": "my-panel",
"name": "My Panel",
"icon": "ToolOutlined"
}]
}
}
```
### Commands
Define executable actions:
```json
{
"commands": [{
"command": "my-extension.run",
"title": "Run Analysis",
"icon": "PlayCircleOutlined"
}]
}
```
### Menus
Add items to existing menus:
```json
{
"menus": {
"sqllab.editor": {
"primary": [{
"command": "my-extension.run",
"when": "editorHasSelection"
}]
}
}
}
```
### API Endpoints
Register backend REST endpoints:
```python
from superset_core.api import rest_api
@rest_api.route('/my-endpoint')
def my_endpoint():
return {'data': 'value'}
```
## Security Model
### Permissions
- Extensions run with user's permissions
- No elevation of privileges
- Access controlled by Superset's RBAC
### Sandboxing
- Frontend code runs in browser context
- Backend code runs in Python process
- Future: Optional sandboxed execution
### Validation
- Manifest validation on upload
- Signature verification (future)
- Dependency scanning
## Performance Considerations
### Lazy Loading
- Extensions load only when features are accessed
- Code splitting for large extensions
- Cached after first load
### Bundle Optimization
- Tree shaking removes unused code
- Minification reduces size
- Compression for network transfer
### Resource Management
- Automatic cleanup on deactivation
- Memory leak prevention
- Event listener management
## Development vs Production
### Development Mode
```python
# superset_config.py
ENABLE_EXTENSIONS = True
LOCAL_EXTENSIONS = ['/path/to/extension']
```
- Hot reloading
- Source maps
- Debug logging
### Production Mode
- Optimized bundles
- Cached assets
- Performance monitoring
## Future Enhancements
### Planned Features
- Enhanced sandboxing
- Extension marketplace
- Inter-extension communication
- Theme contributions
- Chart type extensions
### API Expansion
- Dashboard extensions
- Database connector API
- Security provider interface
- Workflow automation
## Best Practices
### Do's
- ✅ Use TypeScript for type safety
- ✅ Follow semantic versioning
- ✅ Handle errors gracefully
- ✅ Clean up resources properly
- ✅ Document your extension
### Don'ts
- ❌ Access private APIs
- ❌ Modify global state directly
- ❌ Block the main thread
- ❌ Store sensitive data insecurely
- ❌ Assume API stability in 0.x versions
## Learn More
- [API Reference](../api/frontend)
- [Development Guide](../getting-started)
- [Security Guidelines](./security)
- [Performance Optimization](./performance)

View File

@@ -1,466 +0,0 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
---
title: CLI Documentation
sidebar_position: 1
hide_title: true
---
# Superset Extensions CLI
The `apache-superset-extensions-cli` provides command-line tools for creating, developing, and packaging Superset extensions.
## Installation
```bash
pip install apache-superset-extensions-cli
```
## Commands
### init
Creates a new extension project with the standard folder structure.
```bash
superset-extensions init <extension-name> [options]
```
**Options:**
- `--template <template>`: Use a specific template (default: basic)
- `--author <name>`: Set the author name
- `--description <text>`: Set the extension description
- `--with-backend`: Include backend code structure
**Example:**
```bash
superset-extensions init my-extension \
--author "John Doe" \
--description "Adds custom analytics to SQL Lab" \
--with-backend
```
**Generated Structure:**
```
my-extension/
├── extension.json
├── frontend/
│ ├── src/
│ │ └── index.tsx
│ ├── package.json
│ ├── tsconfig.json
│ └── webpack.config.js
├── backend/
│ ├── src/
│ │ └── my_extension/
│ │ ├── __init__.py
│ │ └── entrypoint.py
│ ├── tests/
│ ├── pyproject.toml
│ └── requirements.txt
└── README.md
```
### dev
Starts the development server with hot reloading.
```bash
superset-extensions dev [options]
```
**Options:**
- `--port <port>`: Development server port (default: 9001)
- `--host <host>`: Development server host (default: localhost)
- `--no-watch`: Disable file watching
- `--verbose`: Show detailed output
**Example:**
```bash
# Start development server
superset-extensions dev
# Output:
⚙️ Building frontend assets...
✅ Frontend rebuilt
✅ Backend files synced
✅ Manifest updated
👀 Watching for changes...
```
### build
Builds the extension for production.
```bash
superset-extensions build [options]
```
**Options:**
- `--mode <mode>`: Build mode (development | production)
- `--analyze`: Generate bundle analysis
- `--source-maps`: Include source maps
**Example:**
```bash
# Production build
superset-extensions build --mode production
# With analysis
superset-extensions build --analyze
```
### bundle
Creates a `.supx` package for distribution.
```bash
superset-extensions bundle [options]
```
**Options:**
- `--output <path>`: Output directory (default: current)
- `--sign`: Sign the package (requires certificate)
- `--compress`: Compression level (0-9, default: 6)
**Example:**
```bash
# Create bundle
superset-extensions bundle
# Creates: my-extension-1.0.0.supx
```
### validate
Validates extension configuration and structure.
```bash
superset-extensions validate [options]
```
**Options:**
- `--fix`: Auto-fix common issues
- `--strict`: Enable strict validation
**Checks:**
- Valid extension.json syntax
- Required files present
- Dependency versions
- Module exports
- TypeScript configuration
**Example:**
```bash
superset-extensions validate --strict
# Output:
✅ extension.json valid
✅ Frontend structure valid
✅ Backend structure valid
⚠️ Warning: Missing LICENSE file
✅ Validation passed with warnings
```
### test
Runs extension tests.
```bash
superset-extensions test [options]
```
**Options:**
- `--coverage`: Generate coverage report
- `--watch`: Run in watch mode
- `--frontend-only`: Run only frontend tests
- `--backend-only`: Run only backend tests
**Example:**
```bash
# Run all tests
superset-extensions test --coverage
# Watch mode for frontend
superset-extensions test --frontend-only --watch
```
### publish
Publishes extension to a registry (future feature).
```bash
superset-extensions publish [options]
```
**Options:**
- `--registry <url>`: Registry URL
- `--token <token>`: Authentication token
- `--dry-run`: Simulate publish
## Configuration
### Project Configuration
The CLI reads configuration from multiple sources:
1. **extension.json** - Extension metadata
2. **package.json** - Frontend dependencies
3. **pyproject.toml** - Backend configuration
4. **.extensionrc** - CLI-specific settings
### .extensionrc Example
```json
{
"dev": {
"port": 9001,
"host": "localhost",
"autoReload": true
},
"build": {
"mode": "production",
"sourceMaps": false,
"optimization": true
},
"test": {
"coverage": true,
"threshold": {
"statements": 80,
"branches": 70,
"functions": 80,
"lines": 80
}
}
}
```
## Templates
### Available Templates
- **basic**: Simple extension with frontend only
- **full-stack**: Frontend and backend components
- **sql-panel**: SQL Lab panel extension
- **api-only**: Backend API extension
- **chart-plugin**: Custom chart visualization
### Using Templates
```bash
# Use specific template
superset-extensions init my-chart --template chart-plugin
# List available templates
superset-extensions init --list-templates
```
### Custom Templates
Create custom templates in `~/.superset-extensions/templates/`:
```
~/.superset-extensions/templates/
└── my-template/
├── template.json
└── files/
└── ... template files ...
```
## Development Workflow
### 1. Create Extension
```bash
superset-extensions init awesome-feature
cd awesome-feature
```
### 2. Install Dependencies
```bash
# Frontend
cd frontend && npm install
# Backend (if applicable)
cd ../backend && pip install -r requirements.txt
```
### 3. Configure Superset
```python
# superset_config.py
ENABLE_EXTENSIONS = True
LOCAL_EXTENSIONS = [
"/path/to/awesome-feature"
]
```
### 4. Start Development
```bash
# Terminal 1: Extension dev server
superset-extensions dev
# Terminal 2: Superset
superset run -p 8088 --reload
```
### 5. Test Changes
Make changes to your code and see them reflected immediately in Superset.
### 6. Build and Package
```bash
# Validate
superset-extensions validate
# Test
superset-extensions test
# Build
superset-extensions build --mode production
# Bundle
superset-extensions bundle
```
### 7. Deploy
Upload the `.supx` file to your Superset instance.
## Environment Variables
The CLI respects these environment variables:
- `SUPERSET_EXTENSIONS_DEV_PORT`: Development server port
- `SUPERSET_EXTENSIONS_DEV_HOST`: Development server host
- `SUPERSET_BASE_URL`: Superset instance URL
- `NODE_ENV`: Node environment (development/production)
- `PYTHONPATH`: Python module search path
## Troubleshooting
### Common Issues
#### Port Already in Use
```bash
# Use different port
superset-extensions dev --port 9002
```
#### Module Federation Errors
```bash
# Rebuild with clean cache
rm -rf dist/ node_modules/.cache
superset-extensions build
```
#### Python Import Errors
```bash
# Ensure virtual environment is activated
source venv/bin/activate
superset-extensions dev
```
### Debug Mode
Enable verbose output for troubleshooting:
```bash
# Verbose output
superset-extensions dev --verbose
# Debug webpack
DEBUG=webpack:* superset-extensions build
```
## Best Practices
1. **Version Control**: Commit `extension.json` but not `dist/`
2. **Dependencies**: Pin versions in package.json
3. **Testing**: Write tests for critical functionality
4. **Documentation**: Keep README.md updated
5. **Validation**: Run validate before bundling
6. **Semantic Versioning**: Follow semver for releases
## Advanced Usage
### Custom Webpack Configuration
Extend the default webpack config:
```javascript
// webpack.config.js
const baseConfig = require('./webpack.base.config');
module.exports = {
...baseConfig,
// Custom modifications
resolve: {
...baseConfig.resolve,
alias: {
'@': path.resolve(__dirname, 'src'),
},
},
};
```
### CI/CD Integration
```yaml
# .github/workflows/extension.yml
name: Extension CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/setup-python@v2
- name: Install CLI
run: pip install apache-superset-extensions-cli
- name: Validate
run: superset-extensions validate --strict
- name: Test
run: superset-extensions test --coverage
- name: Build
run: superset-extensions build --mode production
- name: Bundle
run: superset-extensions bundle
```
## Getting Help
- **Documentation**: [Developer Portal](../)
- **Examples**: [GitHub Repository](https://github.com/apache/superset/tree/master/extensions)
- **Issues**: [GitHub Issues](https://github.com/apache/superset/issues)
- **Community**: [Slack Channel](https://apache-superset.slack.com)

View File

@@ -1,464 +0,0 @@
---
title: Extension Examples
sidebar_position: 1
hide_title: true
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Extension Examples
Learn from real-world extension implementations that showcase different capabilities of the Superset extension system.
## Dataset References Panel
A SQL Lab panel that analyzes queries and displays information about referenced tables.
### Features
- Parses SQL to extract table references
- Shows table owners and permissions
- Displays last partition information
- Provides row count estimates
### Key Implementation
```typescript
// Parse SQL and extract tables
function extractTables(sql: string): TableReference[] {
const tables = [];
const tableRegex = /FROM\s+(\w+\.?\w+)/gi;
let match;
while ((match = tableRegex.exec(sql)) !== null) {
tables.push({
schema: match[1].split('.')[0],
table: match[1].split('.')[1] || match[1],
});
}
return tables;
}
// Register panel
export function activate(context: ExtensionContext) {
const panel = context.core.registerView('dataset-references.panel', () => (
<DatasetReferencesPanel />
));
// Listen for query changes
const listener = context.sqlLab.onDidChangeEditorContent((content) => {
const tables = extractTables(content);
updatePanelWithTables(tables);
});
context.subscriptions.push(panel, listener);
}
```
### Manifest
```json
{
"name": "dataset-references",
"contributions": {
"views": {
"sqllab.panels": [{
"id": "dataset-references.panel",
"name": "Dataset References",
"icon": "DatabaseOutlined",
"location": "right"
}]
}
}
}
```
## Query Optimizer
Analyzes SQL queries and suggests optimizations.
### Features
- Detects missing indexes
- Suggests query rewrites
- Identifies expensive operations
- Provides execution plan analysis
### Implementation Highlights
```typescript
// Register optimization command
const optimizeCommand = context.commands.registerCommand('query-optimizer.analyze', {
title: 'Analyze Query Performance',
icon: 'ThunderboltOutlined',
execute: async () => {
const query = context.sqlLab.getCurrentQuery();
const database = context.sqlLab.getCurrentDatabase();
// Get execution plan
const plan = await getExecutionPlan(database.id, query);
// Analyze and suggest improvements
const suggestions = analyzeExecutionPlan(plan);
// Show results in panel
showOptimizationResults(suggestions);
}
});
// Add to editor menu
"menus": {
"sqllab.editor": {
"primary": [{
"command": "query-optimizer.analyze",
"when": "editorHasContent"
}]
}
}
```
## Natural Language to SQL
Converts natural language questions to SQL queries using LLM integration.
### Features
- Natural language input
- Context-aware SQL generation
- Query validation
- History tracking
### Key Components
```typescript
// Backend API endpoint
@rest_api.route('/nl2sql/generate')
def generate_sql(prompt: str, context: dict):
# Use LLM to generate SQL
sql = llm_client.generate(
prompt=prompt,
schema=context['schema'],
examples=context['examples']
)
# Validate generated SQL
validation = validate_sql(sql)
return {
'sql': sql,
'valid': validation.is_valid,
'errors': validation.errors
}
```
```typescript
// Frontend integration
function NL2SQLPanel() {
const [prompt, setPrompt] = useState('');
const [loading, setLoading] = useState(false);
const generateSQL = async () => {
setLoading(true);
const response = await context.network.api.post('/extensions/nl2sql/generate', {
prompt,
context: {
database: context.sqlLab.getCurrentDatabase(),
schema: await context.sqlLab.getCurrentSchema(),
}
});
if (response.valid) {
// Insert SQL into editor
context.sqlLab.insertText(response.sql);
}
setLoading(false);
};
return (
<div>
<Input.TextArea
value={prompt}
onChange={(e) => setPrompt(e.target.value)}
placeholder="Describe what data you want..."
/>
<Button onClick={generateSQL} loading={loading}>
Generate SQL
</Button>
</div>
);
}
```
## Schema Visualizer
Interactive database schema visualization.
### Features
- Visual ERD diagram
- Table relationships
- Column details on hover
- Export to image
### Implementation
```typescript
import { Graph } from '@antv/g6';
function SchemaVisualizer() {
const containerRef = useRef<HTMLDivElement>(null);
const [graph, setGraph] = useState<Graph>();
useEffect(() => {
if (!containerRef.current) return;
const g = new Graph({
container: containerRef.current,
layout: {
type: 'dagre',
rankdir: 'LR',
},
defaultNode: {
type: 'sql-table-node',
},
defaultEdge: {
type: 'sql-relation-edge',
},
});
setGraph(g);
loadSchemaData(g);
return () => g.destroy();
}, []);
const loadSchemaData = async (g: Graph) => {
const tables = await context.sqlLab.getTables();
const nodes = tables.map(table => ({
id: table.name,
label: table.name,
columns: table.columns,
}));
const edges = extractRelationships(tables);
g.data({ nodes, edges });
g.render();
};
return <div ref={containerRef} style={{ height: '100%' }} />;
}
```
## SQL Formatter
Formats and beautifies SQL code with customizable rules.
### Features
- Multiple formatting styles
- Custom rule configuration
- Batch formatting
- Format on save
### Simple Implementation
```typescript
import { format } from 'sql-formatter';
const formatCommand = context.commands.registerCommand('sql-formatter.format', {
title: 'Format SQL',
execute: () => {
const sql = context.sqlLab.getCurrentQuery();
const formatted = format(sql, {
language: 'sql',
indent: ' ',
uppercase: true,
linesBetweenQueries: 2,
});
context.sqlLab.replaceQuery(formatted);
}
});
// Auto-format on save
context.sqlLab.onWillSaveQuery((event) => {
if (context.storage.local.get('autoFormat')) {
const formatted = format(event.query);
event.waitUntil(Promise.resolve(formatted));
}
});
```
## Query History Search
Enhanced query history with advanced search and filtering.
### Features
- Full-text search
- Filter by date, user, database
- Query statistics
- Export capabilities
### UI Component
```typescript
function QueryHistoryPanel() {
const [queries, setQueries] = useState<Query[]>([]);
const [filters, setFilters] = useState<Filters>({});
useEffect(() => {
loadQueries();
}, [filters]);
const loadQueries = async () => {
const history = await context.network.api.get('/api/v1/query', {
params: {
...filters,
page_size: 100,
}
});
setQueries(history.result);
};
return (
<div>
<SearchFilters onChange={setFilters} />
<Table
dataSource={queries}
columns={[
{ title: 'Query', dataIndex: 'sql', ellipsis: true },
{ title: 'Database', dataIndex: 'database' },
{ title: 'Status', dataIndex: 'status' },
{ title: 'Duration', dataIndex: 'duration' },
{ title: 'User', dataIndex: 'user' },
{
title: 'Actions',
render: (query) => (
<Button
icon={<CopyOutlined />}
onClick={() => context.sqlLab.insertText(query.sql)}
/>
),
},
]}
/>
</div>
);
}
```
## Git Integration
Version control for SQL queries and dashboards.
### Features
- Save queries to Git
- Track changes
- Collaborative editing
- Branch management
### Backend Integration
```python
from git import Repo
class GitExtension:
def __init__(self, repo_path):
self.repo = Repo(repo_path)
def save_query(self, query, message):
# Save query to file
path = f"queries/{query.name}.sql"
with open(path, 'w') as f:
f.write(query.sql)
# Commit to Git
self.repo.index.add([path])
self.repo.index.commit(message)
return {
'status': 'success',
'commit': self.repo.head.commit.hexsha
}
```
## Best Practices from Examples
### 1. User Experience
- Provide clear feedback for async operations
- Handle errors gracefully
- Include loading states
- Add keyboard shortcuts
### 2. Performance
- Debounce expensive operations
- Cache API responses
- Use virtual scrolling for large lists
- Lazy load heavy components
### 3. Integration
- Respect Superset's theme
- Use provided UI components
- Follow existing UX patterns
- Integrate with existing menus
### 4. Code Organization
```
extension/
├── frontend/
│ ├── src/
│ │ ├── components/ # UI components
│ │ ├── hooks/ # Custom hooks
│ │ ├── services/ # API services
│ │ ├── utils/ # Utilities
│ │ └── index.tsx # Entry point
│ └── tests/
├── backend/
│ ├── src/
│ │ ├── api/ # REST endpoints
│ │ ├── models/ # Data models
│ │ ├── services/ # Business logic
│ │ └── entrypoint.py
│ └── tests/
```
### 5. Testing
```typescript
// Test example
describe('DatasetReferences', () => {
it('should extract tables from SQL', () => {
const sql = 'SELECT * FROM users JOIN orders ON users.id = orders.user_id';
const tables = extractTables(sql);
expect(tables).toEqual([
{ schema: 'public', table: 'users' },
{ schema: 'public', table: 'orders' },
]);
});
});
```
## Learn More
- [API Reference](../api/frontend)
- [Architecture Overview](../architecture/overview)
- [Getting Started Guide](../getting-started)
- [CLI Documentation](../cli/overview)

View File

@@ -1,248 +0,0 @@
---
title: Getting Started
sidebar_position: 2
hide_title: true
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Getting Started with Extensions
This guide will walk you through creating, developing, and deploying your first Superset extension.
## Prerequisites
Before you begin, make sure you have:
- **Node.js 16+** and npm/yarn installed
- **Python 3.9+** and pip installed
- **Superset** running locally or access to a Superset instance
- **Git** for version control
- Basic knowledge of React and TypeScript
## Quick Start
### 1. Install the CLI
First, install the Superset Extensions CLI globally:
```bash
pip install apache-superset-extensions-cli
```
### 2. Create Your First Extension
Use the CLI to scaffold a new extension project:
```bash
superset-extensions init my-first-extension
cd my-first-extension
```
This creates the following structure:
```
my-first-extension/
├── extension.json # Extension metadata
├── frontend/ # Frontend code
│ ├── src/
│ │ └── index.tsx # Main entry point
│ ├── package.json
│ └── webpack.config.js
├── backend/ # Backend code (optional)
│ ├── src/
│ └── requirements.txt
└── README.md
```
### 3. Configure Your Extension
Edit `extension.json` to define your extension's capabilities:
```json
{
"name": "my-first-extension",
"version": "1.0.0",
"description": "My first Superset extension",
"author": "Your Name",
"frontend": {
"contributions": {
"views": {
"sqllab.panels": [
{
"id": "my-extension.main",
"name": "My Panel",
"icon": "ToolOutlined"
}
]
}
}
}
}
```
### 4. Develop Your Extension
Edit `frontend/src/index.tsx` to implement your extension:
```typescript
import React from 'react';
import { ExtensionContext } from '@apache-superset/core';
export function activate(context: ExtensionContext) {
// Register your panel component
const panel = context.core.registerView('my-extension.main', () => (
<div style={{ padding: 20 }}>
<h2>Hello from My Extension!</h2>
<p>This is my first Superset extension.</p>
</div>
));
// Clean up on deactivation
context.subscriptions.push(panel);
}
export function deactivate() {
// Cleanup code if needed
}
```
### 5. Test Locally
Enable development mode in your Superset configuration:
```python
# superset_config.py
ENABLE_EXTENSIONS = True
LOCAL_EXTENSIONS = [
"/path/to/my-first-extension"
]
```
Run the development server:
```bash
# In your extension directory
superset-extensions dev
# In a separate terminal, start Superset
superset run -p 8088 --with-threads --reload
```
Your extension will now appear in SQL Lab!
### 6. Build and Package
When ready to distribute your extension:
```bash
superset-extensions build
superset-extensions bundle
```
This creates a `my-first-extension-1.0.0.supx` file that can be uploaded to any Superset instance.
### 7. Deploy
Upload your extension via the Superset UI or API:
```bash
curl -X POST http://localhost:8088/api/v1/extensions/import/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "file=@my-first-extension-1.0.0.supx"
```
## What's Next?
Now that you have a basic extension working, explore:
- [Extension Architecture](../architecture/overview) - Understand how extensions work
- [API Reference](../api/frontend) - Learn about available APIs
- [Examples](../examples) - See more complex extension examples
- [Best Practices](./best-practices) - Learn extension development best practices
## Common Patterns
### Adding a SQL Lab Panel
```typescript
const panel = context.core.registerView('my-extension.panel', () => (
<MyPanelComponent />
));
```
### Registering Commands
```typescript
const command = context.commands.registerCommand('my-extension.run', {
title: 'Run My Command',
execute: () => {
// Command logic
}
});
```
### Listening to Events
```typescript
const listener = context.sqlLab.onDidQueryRun((query) => {
console.log('Query executed:', query);
});
```
### Adding Menu Items
```json
{
"menus": {
"sqllab.editor": {
"primary": [{
"command": "my-extension.run",
"when": "editorHasSelection"
}]
}
}
}
```
## Troubleshooting
### Extension Not Loading
- Ensure `ENABLE_EXTENSIONS = True` in your config
- Check the browser console for errors
- Verify the extension path in `LOCAL_EXTENSIONS`
### Module Not Found Errors
- Run `npm install` in the frontend directory
- Check that `@apache-superset/core` is properly externalized
### Build Failures
- Ensure all dependencies are installed
- Check webpack.config.js for proper Module Federation setup
- Verify extension.json is valid JSON
## Get Help
- Join the [Superset Slack](https://join.slack.com/t/apache-superset/shared_invite/zt-16jvzmoi8-sI1TY1Pm~y_RnSiUAN0jqQ)
- Ask questions on [GitHub Discussions](https://github.com/apache/superset/discussions)
- Report issues on [GitHub Issues](https://github.com/apache/superset/issues)

View File

@@ -1,126 +0,0 @@
---
title: Developer Portal
sidebar_position: 1
hide_title: true
---
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# Superset Developer Portal
Welcome to the Apache Superset Developer Portal! This is your comprehensive guide to extending and customizing Superset through our new extension architecture.
## What are Superset Extensions?
Superset Extensions provide a powerful way to enhance and customize Apache Superset without modifying the core codebase. Following the successful model pioneered by VS Code, our extension architecture enables developers to:
- **Add custom features** to SQL Lab and other Superset modules
- **Create reusable components** that can be shared across organizations
- **Integrate external tools** and services seamlessly
- **Customize workflows** to match your team's specific needs
## Why Extensions?
As Superset has grown, we've recognized the need for a more modular architecture that allows:
- **Innovation without fragmentation** - Build features without forking the codebase
- **Community-driven development** - Share and reuse extensions across organizations
- **Stable APIs** - Develop against versioned, well-documented interfaces
- **Rapid iteration** - Deploy custom features without waiting for core releases
## Key Features
### 🎯 Well-Defined Extension Points
Extensions can contribute to specific areas of Superset:
- SQL Lab panels (left, right, bottom, editor)
- Custom commands and menu items
- Status bar components
- API endpoints and backend functionality
### 🔧 Modern Development Experience
- **CLI tools** for scaffolding, building, and packaging
- **Hot reloading** during development
- **TypeScript support** with full type safety
- **Module Federation** for dynamic loading
### 📦 Simple Distribution
- Package extensions as `.supx` files
- Upload via REST API or UI
- Automatic activation and lifecycle management
- Version compatibility checking
## Getting Started
Ready to build your first extension? Check out our [Getting Started Guide](./getting-started) to:
1. Set up your development environment
2. Create your first extension
3. Test it locally
4. Package and deploy it
## Architecture Overview
Our extension architecture is built on several key principles:
- **Lean Core**: Keep Superset's core minimal and delegate features to extensions
- **Explicit APIs**: Clear, versioned interfaces for extension interactions
- **Lazy Loading**: Extensions load only when needed for optimal performance
- **Security First**: Extensions run with appropriate permissions and sandboxing
Learn more in our [Architecture Documentation](./architecture/overview).
## Current Status
The extension architecture is currently in active development. The initial focus is on SQL Lab extensions, with plans to expand to:
- Dashboard extensions
- Chart plugins (enhanced from current system)
- Database connectors
- Security providers
## Example: Dataset References Extension
See the extension system in action with our Dataset References example, which adds a SQL Lab panel showing:
- Tables referenced in queries
- Table owners for permission requests
- Last available partitions
- Estimated row counts
## Join the Community
- **Contribute**: Help shape the future of Superset extensions
- **Share**: Publish your extensions for others to use
- **Learn**: Explore extensions built by the community
## Quick Links
- [Getting Started Guide](./getting-started)
- [Extension Architecture](./architecture/overview)
- [API Reference](./api/frontend)
- [CLI Documentation](./cli/overview)
- [Examples](./examples)
---
*The Superset extension architecture is inspired by the successful model of VS Code Extensions, bringing similar flexibility and power to the data exploration domain.*

View File

@@ -1,59 +0,0 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
module.exports = {
developerPortalSidebar: [
'index',
{
type: 'category',
label: 'Getting Started',
items: [
'getting-started/index',
],
},
{
type: 'category',
label: 'Architecture',
items: [
'architecture/overview',
],
},
{
type: 'category',
label: 'API Reference',
items: [
'api/frontend',
],
},
{
type: 'category',
label: 'CLI',
items: [
'cli/overview',
],
},
{
type: 'category',
label: 'Examples',
items: [
'examples/index',
],
},
],
};

View File

@@ -1 +0,0 @@
[]

View File

@@ -1 +0,0 @@
[]

View File

@@ -12,7 +12,7 @@ Users can configure automated alerts and reports to send dashboards or charts to
- *Alerts* are sent when a SQL condition is reached
- *Reports* are sent on a schedule
Alerts and reports are disabled by default. To turn them on, you'll need to change configuration settings and install a suitable headless browser in your environment.
Alerts and reports are disabled by default. To turn them on, you need to do some setup, described here.
## Requirements
@@ -35,14 +35,16 @@ Screenshots will be taken but no messages actually sent as long as `ALERT_REPORT
#### In your `Dockerfile`
You'll need to extend the Superset image to include a headless browser. Your options include:
- Use Playwright with Chrome: this is the recommended approach as of version 4.1.x or greater. A working example of a Dockerfile that installs these tools is provided under "Building your own production Docker image" on the [Docker Builds](/docs/installation/docker-builds#building-your-own-production-docker-image) page. Read the code comments there as you'll also need to change a feature flag in your config.
- Use Firefox: you'll need to install geckodriver and Firefox.
- Use Chrome without Playwright: you'll need to install Chrome and set the value of `WEBDRIVER_TYPE` to `"chrome"` in your `superset_config.py`.
- You must install a headless browser, for taking screenshots of the charts and dashboards. Only Firefox and Chrome are currently supported.
> If you choose Chrome, you must also change the value of `WEBDRIVER_TYPE` to `"chrome"` in your `superset_config.py`.
In Superset versions prior to 4.1, users installed Firefox or Chrome and that was documented here.
Note: All the components required (Firefox headless browser, Redis, Postgres db, celery worker and celery beat) are present in the *dev* docker image if you are following [Installing Superset Locally](/docs/installation/docker-compose/).
All you need to do is add the required config variables described in this guide (See `Detailed Config`).
Only the worker container needs the browser.
If you are running a non-dev docker image, e.g., a stable release like `apache/superset:3.1.0`, that image does not include a headless browser. Only the `superset_worker` container needs this headless browser to browse to the target chart or dashboard.
You can either install and configure the headless browser - see "Custom Dockerfile" section below - or when deploying via `docker compose`, modify your `docker-compose.yml` file to use a dev image for the worker container and a stable release image for the `superset_app` container.
*Note*: In this context, a "dev image" is the same application software as its corresponding non-dev image, just bundled with additional tools. So an image like `3.1.0-dev` is identical to `3.1.0` when it comes to stability, functionality, and running in production. The actual "in-development" versions of Superset - cutting-edge and unstable - are not tagged with version numbers on Docker Hub and will display version `0.0.0-dev` within the Superset UI.
### Slack integration
@@ -65,6 +67,22 @@ To send alerts and reports to Slack channels, you need to create a new Slack App
Note: when you configure an alert or a report, the Slack channel list takes channel names without the leading '#' e.g. use `alerts` instead of `#alerts`.
#### Large Slack Workspaces (10k+ channels)
For workspaces with many channels, fetching the complete channel list can take several minutes and may encounter Slack API rate limits. Add the following to your `superset_config.py`:
```python
from datetime import timedelta
# Increase cache timeout to reduce API calls
# Default: 1 day (86400 seconds)
SLACK_CACHE_TIMEOUT = int(timedelta(days=2).total_seconds())
# Increase retry count for rate limit errors
# Default: 2
SLACK_API_RATE_LIMIT_RETRY_COUNT = 5
```
### Kubernetes-specific
- You must have a `celery beat` pod running. If you're using the chart included in the GitHub repository under [helm/superset](https://github.com/apache/superset/tree/master/helm/superset), you need to put `supersetCeleryBeat.enabled = true` in your values override.
@@ -150,8 +168,8 @@ SMTP_MAIL_FROM = "noreply@youremail.com"
EMAIL_REPORTS_SUBJECT_PREFIX = "[Superset] " # optional - overwrites default value in config.py of "[Report] "
# WebDriver configuration
# If you use Firefox or Playwright with Chrome, you can stick with default values
# If you use Chrome and are *not* using Playwright, then add the following WEBDRIVER_TYPE and WEBDRIVER_OPTION_ARGS
# If you use Firefox, you can stick with default values
# If you use Chrome, then add the following WEBDRIVER_TYPE and WEBDRIVER_OPTION_ARGS
WEBDRIVER_TYPE = "chrome"
WEBDRIVER_OPTION_ARGS = [
"--force-device-scale-factor=2.0",
@@ -217,6 +235,62 @@ def alert_dynamic_minimal_interval(**kwargs) -> int:
ALERT_MINIMUM_INTERVAL = alert_dynamic_minimal_interval
```
## Custom Dockerfile
If you're running the dev version of a released Superset image, like `apache/superset:3.1.0-dev`, you should be set with the above.
But if you're building your own image, or starting with a non-dev version, a webdriver (and headless browser) is needed to capture screenshots of the charts and dashboards which are then sent to the recipient.
Here's how you can modify your Dockerfile to take the screenshots either with Firefox or Chrome.
### Using Firefox
```docker
FROM apache/superset:3.1.0
USER root
RUN apt-get update && \
apt-get install --no-install-recommends -y firefox-esr
ENV GECKODRIVER_VERSION=0.29.0
RUN wget -q https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz && \
tar -x geckodriver -zf geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz -O > /usr/bin/geckodriver && \
chmod 755 /usr/bin/geckodriver && \
rm geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz
RUN pip install --no-cache gevent psycopg2 redis
USER superset
```
### Using Chrome
```docker
FROM apache/superset:3.1.0
USER root
RUN apt-get update && \
apt-get install -y wget zip libaio1
RUN export CHROMEDRIVER_VERSION=$(curl --silent https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_116) && \
wget -O google-chrome-stable_current_amd64.deb -q http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROMEDRIVER_VERSION}-1_amd64.deb && \
apt-get install -y --no-install-recommends ./google-chrome-stable_current_amd64.deb && \
rm -f google-chrome-stable_current_amd64.deb
RUN export CHROMEDRIVER_VERSION=$(curl --silent https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_116) && \
wget -q https://storage.googleapis.com/chrome-for-testing-public/${CHROMEDRIVER_VERSION}/linux64/chromedriver-linux64.zip && \
unzip -j chromedriver-linux64.zip -d /usr/bin && \
chmod 755 /usr/bin/chromedriver && \
rm -f chromedriver-linux64.zip
RUN pip install --no-cache gevent psycopg2 redis
USER superset
```
Don't forget to set `WEBDRIVER_TYPE` and `WEBDRIVER_OPTION_ARGS` in your config if you use Chrome.
## Troubleshooting
There are many reasons that reports might not be working. Try these steps to check for specific issues.
@@ -235,7 +309,9 @@ This is the best source of information about the problem. In a docker compose d
To take a screenshot, the worker visits the dashboard or chart using a headless browser, then takes a screenshot. If you are able to send a chart as CSV or text but can't send as PNG, your problem may lie with the browser.
If you are handling the installation of the headless browser on your own, do your own verification to ensure that the headless browser opens successfully in the worker environment.
Superset docker images that have a tag ending with `-dev` have the Firefox headless browser and geckodriver already installed. You can test that these are installed and in the proper path by entering your Superset worker and running `firefox --headless` and then `geckodriver`. Both commands should start those applications.
If you are handling the installation of that software on your own, or wish to use Chromium instead, do your own verification to ensure that the headless browser opens successfully in the worker environment.
### Send a test email

Some files were not shown because too many files have changed in this diff Show More