Commit Graph

1021 Commits

Author SHA1 Message Date
Elizabeth Thompson
976e0d9d3e fix(reports): fail-loud WARNING diagnostics and log-context tracing for tile readiness
Companion to the previous commit's positive per-tile readiness check,
carrying the rest of PR #42119's changes onto this base:

- Per-tile readiness timeout logs at WARNING (customer chart-loading
  issue, not a system fault -- matching #38130/#38441) with elapsed wait
  time, tile index/total, load_wait, and the identity + stuck-state of
  each unready chart holder (waiting_on_database / spinner_mounted /
  nothing_mounted), then re-raises so the report fails rather than
  shipping a blank or spinner tile. A per-tile DEBUG line logs readiness
  wait time for profiling.
- The deliberate readiness-timeout re-raise is tracked with an explicit
  flag rather than `except PlaywrightTimeout` at the outer level, since
  PlaywrightTimeout is aliased to bare Exception when playwright isn't
  installed and would otherwise swallow-or-propagate the wrong cases.
- Threads an optional log_context (e.g. "execution_id=<uuid>") from
  BaseReportState._get_screenshots through BaseScreenshot.get_screenshot
  and both WebDriverProxy implementations into take_tiled_screenshot,
  so timeout logs correlate back to the report run. Defaults to None
  for callers outside the report pipeline (thumbnails).

Backported from apache/superset#42119 (commits 37da786b52, f6feb70eca,
97d15485ad squashed) onto this branch's base; only the log lines this
change itself adds or touches carry the context suffix -- pre-existing
log lines on this base (f-string style) are left as-is.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-21 18:37:47 +00:00
Elizabeth Thompson
a9ff21b573 fix(reports): positive per-tile chart readiness check for tiled screenshots
`take_tiled_screenshot()` waited for the *absence* of `.loading` elements
visible in the viewport before capturing each tile. With
DashboardVirtualization on (default), a chart holder that has just scrolled
into view but hasn't fired its IntersectionObserver callback yet mounts
neither a spinner nor a chart, so the predicate passed vacuously and the
tile was captured blank. On top of that, a per-tile timeout was caught,
logged as a warning, and the tile was captured anyway -- delivering a
spinner screenshot to report recipients instead of failing the report.

Replace the absence-of-`.loading` predicate with a positive readiness
check: every chart holder (`data-test="dashboard-component-chart-holder"`)
intersecting the viewport must show a terminal state (a rendered chart via
`.slice_container`, or an error/empty state via `[role="alert"]` /
`.ant-empty` / `.missing-chart-container`) before a tile is captured. A
holder with nothing mounted no longer satisfies the wait.

A per-tile timeout is now logged at ERROR with the tile index, the
load_wait, and the identities of the still-unready chart holders, and
re-raises instead of being swallowed -- the report now fails
(ReportScheduleScreenshotFailedError) instead of silently shipping a
degraded screenshot.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-21 18:28:02 +00:00
Peng Ren
aaaa071673 feat(database): SIP-195 Add MongoDB database engine support (#37368)
Co-authored-by: Peng Ren <ia250@cummins.com>
(cherry picked from commit 73d4332b51)
2026-07-20 13:30:17 -07:00
Amin Ghadersohi
4ffffb54e9 docs(mcp): fix instruction/docstring drift and annotation metadata in mcp_service (#41922)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit 73aa8ef280)
2026-07-17 19:20:49 -07:00
Joe Li
151fb74075 fix(charts): render time comparison without a time grain (#42054)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 157ef61fd8)
2026-07-17 11:29:42 -07:00
Mike Bridge
fc6b5c3c49 fix(charts): preserve time filter for expression axes (#42052)
Co-authored-by: Mike Bridge <michael.bridge@ext.preset.io>
(cherry picked from commit 90f9238f8a)
2026-07-17 11:29:42 -07:00
Amin Ghadersohi
4d46307576 fix(mcp): await ctx.info calls in update_dashboard tool (#41920)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit cec9afb165)
2026-07-17 11:29:42 -07:00
Amin Ghadersohi
7bb3a48d26 fix(mcp): add AliasChoices to chart/dashboard/dataset request schemas (#41597)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

(cherry picked from commit bd9ba24266)

[6.0 adaptation] Production schema aliases (chart/dashboard/dataset schemas.py)
applied to the 6.0 baseline. Two files needed adaptation because 6.0 predates
later MCP refactors:

- chart/schemas.py: kept the 6.0 base classes and added only
  `model_config = ConfigDict(populate_by_name=True)` to GenerateExploreLinkRequest
  and UpdateChartPreviewRequest. Dropped upstream's ChartRequestNormalizerMixin
  base (absent on 6.0 — would be F821); the model_config achieves the same
  populate-by-name behavior the aliases require.

- test_dashboard_schemas.py: kept TestRequestSchemaAliasChoices (exercises
  GetDashboardInfoRequest / ListDashboardsRequest / AddChartToDashboardRequest —
  all present on 6.0). Dropped upstream's TestDuplicateDashboardResponse (the
  Duplicate Dashboard feature is absent on 6.0).

dashboard/dataset schemas.py, chart/dataset tests, and the new dataset test
file applied clean. pytest: 184 passed (42 alias/canonical-resolution cases)
across all three schema test files.
2026-07-17 11:29:42 -07:00
Amin Ghadersohi
087648c0e9 fix(mcp): bind Big Number chart to a temporal column for dashboard time filters (#41895)
(cherry picked from commit bd61e09b4e)
2026-07-17 11:29:42 -07:00
Maxime Beauchemin
8f6fa85a7b fix(charts): fix time comparison crash when offsets share a numeric prefix (#39344)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
(cherry picked from commit 0efcd54250)
2026-07-17 11:29:42 -07:00
Mehmet Salih Yavuz
d907259be8 feat(mcp): add update_dataset_metric tool for editing saved dataset metrics (#40975)
(cherry picked from commit 2fac66d1a3)
2026-07-17 11:29:42 -07:00
Amin Ghadersohi
ff2ebcfdfb fix(mcp): make list-item truncation cap configurable in get_dashboard_info (#41698)
(cherry picked from commit 62ccdfacc2)
2026-07-14 11:50:37 -07:00
Amin Ghadersohi
20a6cad0c9 fix(mcp): stop masking dashboard lookup DB errors as not-found (#41919)
(cherry picked from commit 873566c827)
2026-07-14 11:50:37 -07:00
Amin Ghadersohi
a06173b66a feat(mcp): add get_dashboard_datasets tool (#40961)
(cherry picked from commit fd9c84be43)
2026-07-14 11:50:37 -07:00
amaannawab923
0576ac4b57 fix(ag-grid): honor dataset hour offset in time range filters (#41391)
Co-authored-by: Enzo Martellucci <52219496+EnxDev@users.noreply.github.com>
Co-authored-by: Enzo Martellucci <enzomartellucci@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit 9b508ebe0d)
2026-07-13 13:14:19 -07:00
Mike Bridge
fbf3667cfa fix(dao): SQL-faithful NULL and non-string handling in LIKE-family operators (#41653)
Co-authored-by: Mike Bridge <michael.bridge@ext.preset.io>
(cherry picked from commit be46d65e3b)
2026-07-03 14:25:47 -07:00
Joe Li
0cc04ff8a2 fix(mcp): handle SSL connection drop during pre-call session teardown (#39917)
Manual port of apache/superset#39917 (commit 85935b0b) onto 6.0-release.
A clean cherry-pick does not apply because mcp_service/auth.py has diverged
structurally on this branch, but the vulnerable code path is present verbatim:
sync_wrapper calls db.session.remove() before user resolution on reused
thread-pool threads. If the thread-local DBAPI connection died between
requests (RDS SSL idle-timeout / max-connection-age), the implicit rollback
raises a DBAPIError and crashes the tool call.

Wrap the pre-call remove in _remove_session_safe(), which catches DBAPIError,
invalidates the dead connection so the pool discards it, and retries remove()
so the tool proceeds on a fresh connection. Ports the accompanying regression
test byte-for-byte behaviorally.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-02 14:21:40 -07:00
Amin Ghadersohi
c63ada38f2 feat(mcp): add tags + typed metadata fields to update_dashboard (#40957)
(cherry picked from commit c60d8bb656)
2026-07-02 12:25:24 -07:00
Greg Neighbors
9cd2a0d7b8 feat(mcp): dashboard layout, theme, and CSS control + update_dashboard tool (#40399)
Co-authored-by: gkneighb <26003+gkneighb@users.noreply.github.com>
Co-authored-by: Greg Neighbors <gregneighbors@Gregs-MacBook-Air-2.local>
Co-authored-by: Greg Neighbors <gregneighbors@Gregs-Air-2.lan>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Evan Rusackas <evan@rusackas.com>
(cherry picked from commit d8bcc66472)
2026-07-02 12:11:12 -07:00
Mehmet Salih Yavuz
39a5abe515 fix(sqllab): reject blank saved query and dataset names (#41624)
Co-authored-by: Enzo Martellucci <52219496+EnxDev@users.noreply.github.com>
(cherry picked from commit a48ca9ce72)
2026-07-02 11:38:48 -07:00
Amin Ghadersohi
eb8a8aebf5 fix(mcp): escape LIKE wildcards in find_users to prevent user enumeration (#41593)
(cherry picked from commit 7f4cac63c9)
2026-07-02 11:06:44 -07:00
Amin Ghadersohi
aab1c0483e chore(mcp): remove low-value list/info tools that fail agent-native policy (#40690)
(cherry picked from commit ef7379c47e)

Adapted for 6.0-release: on this branch only the css_template and theme MCP
tool groups exist, so this pick removes those two groups (their list/get tools,
schemas, and unit tests) along with their docstring and get_schema references.
The plugin, action_log, and task-management tool groups the upstream change
also touched do not exist on 6.0 and were left untouched.
2026-07-02 10:35:18 -07:00
Elizabeth Thompson
074cafc9dd fix(screenshots): catch empty-bytes tiled result and set ERROR on falsy image (#41097)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit 134919ea36)
2026-06-30 21:41:27 -07:00
yousoph
fdef6d33ee fix(bigquery): quote dotted STRUCT columns per-segment in drill to detail (#41462)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit b8b23d6219)
2026-06-30 16:22:45 -07:00
Maxime Beauchemin
8b6cc68954 feat(mcp): resolve call_tool proxy name and capture error_type in logging (#38915)
Co-authored-by: Amin Ghadersohi <amin.ghadersohi@gmail.com>
(cherry picked from commit b6f545e61e)
2026-06-30 12:25:20 -07:00
Amin Ghadersohi
56b5133721 fix(mcp): make search_tools query optional to fix null content on tool discovery (#40906)
(cherry picked from commit 820e3d18d3)
2026-06-26 20:48:41 -07:00
Alexandru Soare
57948b865d feat(security): Add extension hooks for custom access control, ownership, and asset lifecycle (#40707)
(cherry picked from commit 6d08e79259)
2026-06-26 15:59:54 -07:00
Mehmet Salih Yavuz
d0c3bc89a9 feat(explore): add full-range option for time-shift comparison (#41334)
(cherry picked from commit 9a11c15a33)
2026-06-26 15:59:54 -07:00
yousoph
1bef0b1d31 fix(pandas-postprocessing): handle prophet errors and validate minimum data points for forecast (#41180)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit f6ce105450)
2026-06-26 15:59:54 -07:00
yousoph
605ed6294d fix(sql_lab): serialize dict/list cell values as valid JSON strings (#41099)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit 1d0866556f)
2026-06-26 15:59:54 -07:00
Amin Ghadersohi
cd4f86c82c fix(bigquery): set default dataset from schema in adjust_engine_params (#40776)
(cherry picked from commit c1b5d05f83)
2026-06-25 14:00:02 -07:00
Amin Ghadersohi
62bf3a0c43 feat(mcp): add aggregation field to BigNumberChartConfig for Big Number with Trendline (#40775)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
(cherry picked from commit 4b96b91b53)
2026-06-25 13:58:39 -07:00
Vitor Avila
be41e026f1 fix(chart API): Consider time grain filters with the filters_dashboard_id param (#41290)
(cherry picked from commit 3b46a5f121)
2026-06-22 21:02:01 -07:00
Vitor Avila
a363c81887 fix(chart API): apply dashboard filters by live scope, not stale chartsInScope (#41214)
(cherry picked from commit 334b13c3d9)
2026-06-19 12:33:44 -07:00
Vitor Avila
34ee189094 fix(chart): preserve SQL_QUERY_MUTATOR line comments structure (#41215)
(cherry picked from commit 9e130e5927)
2026-06-19 12:30:00 -07:00
Vitor Avila
57a4fd096f fix(chart API): Do not duplicate Jinja-applied filters with filters_dashboard_id (#41131)
(cherry picked from commit b4e3452bfd)
2026-06-19 12:26:44 -07:00
Evan Rusackas
4fb3c6cc8d fix(dashboard): replace chartsInScope references at import time (#38171)
Co-authored-by: Rémy Dubois <remy.dubois@komodohealth.com>
Co-authored-by: Claude Code <noreply@anthropic.com>
(cherry picked from commit 19d01521bf)
2026-06-19 12:20:52 -07:00
jesperct
bae6e6a646 fix(charts): apply datetime format to unaggregated temporal columns (#41060)
(cherry picked from commit ef82da8458)
2026-06-17 16:36:33 -07:00
Hugh A. Miles II
e6db576381 feat(dashboard): add Rison-encoded URL filter support (#39795)
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
(cherry picked from commit 9a79588d35)
2026-06-12 10:47:55 -07:00
Elizabeth Thompson
226726fbf4 fix: replace deprecated appbuilder.app with current_app (#40876)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit c0e78f39d7)
2026-06-12 09:45:10 -07:00
Daniel Vaz Gaspar
03f350a479 fix(sqllab): prevent corrupted query state from blocking SQL Lab access (#40580)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Joe Li <joe@preset.io>
2026-06-12 09:45:10 -07:00
Amin Ghadersohi
9e45088364 fix(mcp): add select_columns lean defaults to get_dashboard_info, get_chart_info, get_dataset_info (#40473)
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Richard Fogaça <richardfogaca@gmail.com>
(cherry picked from commit aa4092ba68)
2026-06-05 17:50:15 -07:00
Amin Ghadersohi
f7429845d5 fix(mcp): API key authentication for MCP — transport, validation, and RBAC (#39604)
(cherry picked from commit 7d69f76127)
2026-06-05 17:44:00 -07:00
Amin Ghadersohi
9a72a03608 fix(mcp): fall back to form_data spatial query for Deck.gl charts (#40339)
(cherry picked from commit f4dfb7f026)
2026-06-05 17:35:32 -07:00
Amin Ghadersohi
59af59405b chore(deps): migrate MCP service JWT errors from authlib.jose to joserfc (#40582)
(cherry picked from commit a6d2c95480)
2026-06-05 17:27:44 -07:00
Amin Ghadersohi
2ead15894e feat(mcp): add list_reports and get_report_info tools (#40348)
Co-authored-by: Richard Fogaça <richardfogaca@gmail.com>
(cherry picked from commit 5312d0adf8)
2026-06-05 17:24:35 -07:00
Amin Ghadersohi
b84377cdfd feat(mcp): add list_tags and get_tag_info MCP tools (#40349)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit 8d8eeb3505)
2026-06-05 17:12:45 -07:00
Amin Ghadersohi
5f0e9a5377 feat(mcp): add list and get tools for saved queries and query history (#40346)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit a69bbcb044)
2026-06-05 17:10:32 -07:00
Amin Ghadersohi
22327a9a0a feat(mcp): add list and get tools for CSS templates and themes (#40343)
(cherry picked from commit d350792d43)
2026-06-05 17:07:42 -07:00
Amin Ghadersohi
385b84f572 feat(mcp): add list and get tools for annotation layers and annotations (#40342)
(cherry picked from commit f614863ed7)
2026-06-05 17:02:25 -07:00