Skip to content
Open
Show file tree
Hide file tree
Changes from 74 commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
c6bf8c4
feat(time-range-limits): add time range limits for chart queries
DamianPendrak Nov 5, 2026
493dfc5
Merge branch 'master' into feat/time-range-limits
DamianPendrak Nov 5, 2026
63ef518
style(time-range-limits): apply oxfmt 0.75 formatting
DamianPendrak Nov 5, 2026
8a83750
Merge branch 'master' into feat/time-range-limits
DamianPendrak Nov 6, 2026
b4077d7
Merge branch 'master' into feat/time-range-limits
DamianPendrak Nov 7, 2026
8fc36be
fix(time-range-limits): skip report charts whose dataset no longer ex…
DamianPendrak Nov 9, 2026
647b508
fix(time-range-limits): load dashboard charts before prefetching thei…
DamianPendrak Nov 9, 2026
0086ab1
fix(time-range-limits): check a dashboard copy against the source's s…
DamianPendrak Nov 9, 2026
2ca3571
refactor(time-range-limits): drop the copy tool's unreachable limits …
DamianPendrak Nov 9, 2026
fd61cfa
fix(time-range-limits): check the policy shape on dashboard writes wi…
DamianPendrak Nov 9, 2026
cc918cc
fix(time-range-limits): require a time range on samples queries
DamianPendrak Nov 9, 2026
7e2caab
fix(time-range-limits): take the time comparison base from the origin…
DamianPendrak Nov 9, 2026
996b3b6
fix(time-range-limits): let column value lists run like native filter…
DamianPendrak Nov 9, 2026
97d8ccf
fix(time-range-limits): leave limited datasets' data out of the examp…
DamianPendrak Nov 9, 2026
4e01ef4
fix(time-range-limits): read the checked query in dataset templates
DamianPendrak Nov 9, 2026
ad9e66f
docs(time-range-limits): say what a rollback means for stored dashboa…
DamianPendrak Nov 9, 2026
fdfa722
docs(time-range-limits): say the limits are a load guard, not a secur…
DamianPendrak Nov 9, 2026
39baff4
fix(time-range-limits): count the longest range back from its end
DamianPendrak Nov 9, 2026
a5a12f1
fix(time-range-limits): give the rest of a too-long range in the next…
DamianPendrak Nov 9, 2026
1982a67
fix(time-range-limits): send the checked query context with Explore's…
DamianPendrak Nov 9, 2026
20ae1ef
fix(time-range-limits): hold a dashboard chart whose refresh could no…
DamianPendrak Nov 9, 2026
76b40bb
fix(time-range-limits): give the checked query only to the Jinja macr…
DamianPendrak Nov 9, 2026
593c074
fix(time-range-limits): check the exported dashboard's limits before …
DamianPendrak Nov 9, 2026
538d57b
refactor(time-range-limits): drop the copy tool's unused limits path …
DamianPendrak Nov 9, 2026
6303d2e
test(time-range-limits): give the time comparison case its expected r…
DamianPendrak Nov 9, 2026
24a3220
fix(time-range-limits): check an AG Grid table with the own state its…
DamianPendrak Nov 9, 2026
f322d11
fix(time-range-limits): carry a rest that rounds up to a whole unit
DamianPendrak Nov 9, 2026
9640eae
docs(time-range-limits): give translators context for the length rema…
DamianPendrak Nov 9, 2026
4cabc93
fix(time-range-limits): give saved query context macros the checked q…
DamianPendrak Nov 9, 2026
3c57633
refactor(time-range-limits): keep the own state helper with the chart…
DamianPendrak Nov 9, 2026
0c8f9c6
test(time-range-limits): share the Explore page reset test between bo…
DamianPendrak Nov 9, 2026
4e33f52
docs(time-range-limits): describe how the length rest carries
DamianPendrak Nov 9, 2026
fa69cea
test(time-range-limits): cover the checked query in the dashboard Exc…
DamianPendrak Nov 9, 2026
e5810c1
fix(time-range-limits): keep the table page reset when several checks…
DamianPendrak Nov 10, 2026
a367406
fix(time-range-limits): read url_params from the query object like th…
DamianPendrak Nov 10, 2026
82ff1b4
docs(time-range-limits): name the export-example CLI and warn when da…
DamianPendrak Nov 10, 2026
6085cb8
fix(time-range-limits): use only the caller's page reset cache in the…
DamianPendrak Nov 10, 2026
e123571
test(time-range-limits): drop the outdated reason in the table query …
DamianPendrak Nov 10, 2026
1c755f1
fix(time-range-limits): refuse a time range filter default outside th…
DamianPendrak Nov 10, 2026
a7ff445
fix(time-range-limits): let a limit use a unit under a day under a da…
DamianPendrak Nov 10, 2026
4a43465
docs(time-range-limits): describe the filters API default check
DamianPendrak Nov 10, 2026
059da45
fix(time-range-limits): keep aria-controls on the time range trigger …
DamianPendrak Nov 10, 2026
0bed36c
docs(time-range-limits): say that an asset bundle import answers 500
DamianPendrak Nov 10, 2026
3306aa8
docs(dashboards): list 503 for the native filters update endpoint
DamianPendrak Nov 10, 2026
3be4dde
docs(time-range-limits): correct the never_longer docstring
DamianPendrak Nov 10, 2026
cfd0bba
test(time-range-limits): remove the dataset versions the restore test…
DamianPendrak Nov 10, 2026
2b0ec30
docs(time-range-limits): say which writes check a Time Range filter d…
DamianPendrak Nov 10, 2026
c6f34fa
docs(time-range-limits): say which charts a bad filter default holds
DamianPendrak Nov 11, 2026
be1e355
docs(time-range-limits): say a chart is held only when its own query …
DamianPendrak Nov 11, 2026
9e27ff0
fix(time-range-limits): keep the unit hint visible to translation ext…
DamianPendrak Nov 11, 2026
b60a1f3
test(time-range-limits): expect no notice when a global span gets lon…
DamianPendrak Nov 11, 2026
1469f2b
fix(time-range-limits): fail reports whose stored time range breaks t…
DamianPendrak Nov 11, 2026
d78a447
docs(time-range-limits): document the stored time range check on reports
DamianPendrak Nov 11, 2026
7401b51
fix(time-range-limits): keep the invalid tab ids error on report saves
DamianPendrak Nov 11, 2026
198fb02
docs(time-range-limits): narrow the report save 503 to new or changed…
DamianPendrak Nov 11, 2026
a2bf624
Merge branch 'master' into feat/time-range-limits
DamianPendrak Nov 11, 2026
79fe144
feat(time-range-limits): bound value lists by the window the limits a…
DamianPendrak Nov 13, 2026
9a1e4e5
Merge branch 'master' into feat/time-range-limits
DamianPendrak Nov 13, 2026
770b27d
chore(translations): add the time range limits help line to messages.pot
DamianPendrak Nov 13, 2026
c2a2120
Merge branch 'master' into feat/time-range-limits
DamianPendrak Nov 13, 2026
df89219
test(time-range-limits): follow master's raw rison report filters
DamianPendrak Nov 13, 2026
a6d922c
fix(time-range-limits): refuse a report whose own filters can't be de…
DamianPendrak Nov 13, 2026
9793a9b
test(time-range-limits): align integration tests with the value-list …
DamianPendrak Nov 13, 2026
d8c905e
fix(explore): keep the source dashboard for chart reports
DamianPendrak Nov 16, 2026
9dc2cdb
Merge branch 'master' into feat/time-range-limits
DamianPendrak Nov 16, 2026
79134c6
test(time-range-limits): leave the Stop button's client_id out of the…
DamianPendrak Nov 16, 2026
08f40be
test(time-range-limits): read a chart report's dashboard from its sav…
DamianPendrak Nov 16, 2026
57ed230
fix(time-range-limits): keep non-temporal charts running when limits …
DamianPendrak Nov 20, 2026
5e4cf09
fix(time-range-limits): show each limit error under its field
DamianPendrak Nov 20, 2026
2ba3440
fix(time-range-limits): state the refused length in the limit's unit
DamianPendrak Nov 20, 2026
29c0758
fix(time-range-limits): clamp inherited stale limits on dashboard copies
DamianPendrak Nov 20, 2026
bdc9014
chore: merge apache master into time-range limits
DamianPendrak Nov 20, 2026
e55ea57
test(time-range-limits): align limit tests with master's validation c…
DamianPendrak Nov 20, 2026
e5ea815
fix(time-range-limits): warn about an empty range in the limits picker
DamianPendrak Nov 20, 2026
33f1ff8
fix(time-range-limits): restore focus after a policy Retry in Explore
DamianPendrak Nov 22, 2026
73160cc
fix(time-range-limits): clamp stale limits on dashboard import
DamianPendrak Nov 23, 2026
093d78e
chore: merge apache master into time-range limits
DamianPendrak Nov 23, 2026
96e9954
fix(time-range-limits): match the report dialog's time range to the d…
DamianPendrak Nov 23, 2026
1ca7808
fix(time-range-limits): say only held charts are paused when the limi…
DamianPendrak Nov 23, 2026
0cd1e17
chore: merge apache master into time-range limits
DamianPendrak Nov 25, 2026
251652d
fix(time-range-limits): tailor dashboard warnings to affected filters…
DamianPendrak Nov 25, 2026
b28625d
feat(time-range-limits): ask before adjusting time ranges on copy and…
DamianPendrak Nov 25, 2026
9546f77
fix(time-range-limits): fit a looser rule on re-import over an existi…
DamianPendrak Nov 25, 2026
43fe71a
fix(time-range-limits): bound a Range filter's min and max like a Sel…
DamianPendrak Nov 25, 2026
e580f24
fix(time-range-limits): limit the pre-filter time range picker
DamianPendrak Nov 25, 2026
c16a937
fix(time-range-limits): check a triggered alert's attachment before i…
DamianPendrak Nov 25, 2026
dbda2f7
test(importexport): expect the time range keywords in the asset impor…
DamianPendrak Nov 25, 2026
ac0432b
docs(api): regenerate the OpenAPI spec for time range confirmation
DamianPendrak Nov 25, 2026
f567288
Merge branch 'master' of https://github.com/apache/superset into avay…
DamianPendrak Nov 26, 2026
cb09363
fix(dashboard): skip the time range default check for cascade parent …
DamianPendrak Nov 26, 2026
f057c49
Merge branch 'master' of https://github.com/apache/superset into avay…
DamianPendrak Nov 26, 2026
599787d
Merge branch 'master' of https://github.com/apache/superset into avay…
DamianPendrak Nov 26, 2026
e5414a2
Merge branch 'master' of https://github.com/apache/superset into avay…
DamianPendrak Nov 26, 2026
2c282c7
test(filters): un-nest the required range cascade clear test
DamianPendrak Nov 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,16 @@ assists people when migrating to a new version.
is not cached. Engines whose cancel id only exists once a query is running,
such as Trino, still cannot cancel chart-data queries: their tasks stay
non-abortable, as before.
- Run `superset init` after upgrading to create the time range limits API and

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe worth a line on rolling back. A build without this PR answers 400 "Unknown field" for json_metadata.time_range_limits, so after a rollback, saving a dashboard that has limits fails with "Invalid input" until the key is removed (tried it on master).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a rollback paragraph to UPDATING in ad9e66f.

admin-page permissions. The `TIME_RANGE_LIMITS` feature flag is off by default.
While it is off, only the shape of a dashboard's `time_range_limits` is checked.
Review stored values before enabling it: an invalid applicable policy makes
queries fail closed with HTTP 503. See the
[time range limits configuration](https://superset.apache.org/admin-docs/configuration/time-range-limits).
A version without time range limits answers 400 "Unknown field" for
`json_metadata.time_range_limits`, so after a rollback a dashboard that has the
key can't be saved until it is removed. Remove the key from the dashboards'
JSON metadata before rolling back, or after.

- **Semantic-layer schema readiness and failures.** Both provider schema hooks
require keyword-only `readiness: SemanticCredentialReadiness` alongside
Expand Down
307 changes: 307 additions & 0 deletions docs/admin_docs/configuration/time-range-limits.mdx

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions docs/docs/using-superset/issue-codes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -332,3 +332,20 @@ The database was deleted.
```

The operation failed because the database referenced no longer exists. Please reach out to your administrator for further assistance.

## Issue 1042

```
The time range is outside the allowed limits, or the limits can't be verified.
```

The chart or query asks for a time range that the time range limits don't allow, or the limits that apply to it can't be read. The error's `reason_code` says which:

- `MAX_SPAN_EXCEEDED`, `MAX_LOOK_BACK_EXCEEDED`, `MAX_LOOK_FORWARD_EXCEEDED`: the range is too long, starts too early or ends too late. Pick a time range inside the limits named in the error message, or ask an editor or admin to change them.
- `UNBOUNDED_RANGE`: the range has no start or no end. Choose both. On a dashboard, ask a dashboard editor to add or scope a time range filter.
- `NO_VALID_RANGE`: the limits leave no valid time range at all. Only an editor or admin can fix them.
- `POLICY_UNAVAILABLE` (HTTP 503): the global, dataset or dashboard setting isn't valid, so the query is blocked until it is fixed. Retry the request, or ask an editor or admin to check the time range limits.

Admins: see [Time range limits](/admin-docs/configuration/time-range-limits) for the setup, the error fields and what fails closed.

The error's `actual` range uses the server's UTC offset, and its `timezone` is the server's `TZ` environment variable, or the local time zone abbreviation (for example `CEST`) when `TZ` isn't set. Set `TZ` to an IANA name (for example `America/Sao_Paulo`) to get that name instead.
7 changes: 7 additions & 0 deletions docs/static/feature-flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@
"default": false,
"lifecycle": "development",
"description": "Enable Table V2 time comparison feature"
},
{
"name": "TIME_RANGE_LIMITS",
"default": false,
"lifecycle": "development",
"description": "Enforce the time range limits (see TIME_RANGE_LIMITS_GLOBAL) on chart data queries",
"docs": "https://superset.apache.org/admin-docs/configuration/time-range-limits"
}
],
"testing": [
Expand Down
Loading
Loading