Skip to content

Commit ff323ba

Browse files
authored
Merge branch 'master' into fix-no-top-level-tab
2 parents 78fada7 + 8c80cae commit ff323ba

20 files changed

Lines changed: 580 additions & 56 deletions

File tree

.github/workflows/ephemeral-env-pr-close.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
- name: Login to Amazon ECR
5959
if: steps.describe-services.outputs.active == 'true'
6060
id: login-ecr
61-
uses: aws-actions/amazon-ecr-login@19d944daaa35f0fa1d3f7f8af1d3f2e5de25c5b7 # v2
61+
uses: aws-actions/amazon-ecr-login@fa648b43de3d4d023bcb3f89ed6940096949c419 # v2
6262

6363
- name: Delete ECR image tag
6464
if: steps.describe-services.outputs.active == 'true'

.github/workflows/ephemeral-env.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ jobs:
199199

200200
- name: Login to Amazon ECR
201201
id: login-ecr
202-
uses: aws-actions/amazon-ecr-login@19d944daaa35f0fa1d3f7f8af1d3f2e5de25c5b7 # v2
202+
uses: aws-actions/amazon-ecr-login@fa648b43de3d4d023bcb3f89ed6940096949c419 # v2
203203

204204
- name: Load, tag and push image to ECR
205205
id: push-image
@@ -235,7 +235,7 @@ jobs:
235235

236236
- name: Login to Amazon ECR
237237
id: login-ecr
238-
uses: aws-actions/amazon-ecr-login@19d944daaa35f0fa1d3f7f8af1d3f2e5de25c5b7 # v2
238+
uses: aws-actions/amazon-ecr-login@fa648b43de3d4d023bcb3f89ed6940096949c419 # v2
239239

240240
- name: Check target image exists in ECR
241241
id: check-image

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"@swc/core": "^1.15.33",
7171
"antd": "^6.3.7",
7272
"baseline-browser-mapping": "^2.10.27",
73-
"caniuse-lite": "^1.0.30001791",
73+
"caniuse-lite": "^1.0.30001792",
7474
"docusaurus-plugin-openapi-docs": "^5.0.2",
7575
"docusaurus-theme-openapi-docs": "^5.0.2",
7676
"js-yaml": "^4.1.1",

docs/yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6035,10 +6035,10 @@ caniuse-api@^3.0.0:
60356035
lodash.memoize "^4.1.2"
60366036
lodash.uniq "^4.5.0"
60376037

6038-
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001702, caniuse-lite@^1.0.30001759, caniuse-lite@^1.0.30001791:
6039-
version "1.0.30001791"
6040-
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001791.tgz#dfb93d85c40ad380c57123e72e10f3c575786b51"
6041-
integrity sha512-yk0l/YSrOnFZk3UROpDLQD9+kC1l4meK/wed583AXrzoarMGJcbRi2Q4RaUYbKxYAsZ8sWmaSa/DsLmdBeI1vQ==
6038+
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001702, caniuse-lite@^1.0.30001759, caniuse-lite@^1.0.30001792:
6039+
version "1.0.30001792"
6040+
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001792.tgz#ca8bb9be244835a335e2018272ce7223691873c5"
6041+
integrity sha512-hVLMUZFgR4JJ6ACt1uEESvQN1/dBVqPAKY0hgrV70eN3391K6juAfTjKZLKvOMsx8PxA7gsY1/tLMMTcfFLLpw==
60426042

60436043
ccount@^2.0.0:
60446044
version "2.0.1"

pyproject.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,13 @@ solr = ["sqlalchemy-solr >= 0.2.0"]
145145
elasticsearch = ["elasticsearch-dbapi>=0.2.12, <0.3.0"]
146146
exasol = ["sqlalchemy-exasol >= 2.4.0, <3.0"]
147147
excel = ["xlrd>=1.2.0, <1.3"]
148-
fastmcp = ["fastmcp>=3.2.4,<4.0"]
148+
fastmcp = [
149+
"fastmcp>=3.2.4,<4.0",
150+
# tiktoken backs the response-size-guard token estimator. Without
151+
# it, the middleware falls back to a coarser character-based
152+
# heuristic that under-counts JSON-heavy MCP responses.
153+
"tiktoken>=0.7.0,<1.0",
154+
]
149155
firebird = ["sqlalchemy-firebird>=0.7.0, <0.8"]
150156
firebolt = ["firebolt-sqlalchemy>=1.0.0, <2"]
151157
gevent = ["gevent>=23.9.1"]

requirements/base.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ idna==3.10
183183
# trio
184184
# url-normalize
185185
isodate==0.7.2
186-
# via apache-superset (pyproject.toml)
186+
# via
187+
# apache-superset (pyproject.toml)
188+
# apache-superset-core
187189
itsdangerous==2.2.0
188190
# via
189191
# flask
@@ -296,6 +298,7 @@ pyarrow==20.0.0
296298
# via
297299
# -r requirements/base.in
298300
# apache-superset (pyproject.toml)
301+
# apache-superset-core
299302
pyasn1==0.6.3
300303
# via
301304
# pyasn1-modules

requirements/development.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ isodate==0.7.2
442442
# via
443443
# -c requirements/base-constraint.txt
444444
# apache-superset
445+
# apache-superset-core
445446
isort==6.0.1
446447
# via pylint
447448
itsdangerous==2.2.0
@@ -715,6 +716,7 @@ pyarrow==20.0.0
715716
# via
716717
# -c requirements/base-constraint.txt
717718
# apache-superset
719+
# apache-superset-core
718720
# db-dtypes
719721
# pandas-gbq
720722
pyasn1==0.6.3
@@ -866,6 +868,8 @@ referencing==0.36.2
866868
# jsonschema
867869
# jsonschema-path
868870
# jsonschema-specifications
871+
regex==2026.4.4
872+
# via tiktoken
869873
requests==2.33.0
870874
# via
871875
# -c requirements/base-constraint.txt
@@ -878,6 +882,7 @@ requests==2.33.0
878882
# requests-cache
879883
# requests-oauthlib
880884
# shillelagh
885+
# tiktoken
881886
# trino
882887
requests-cache==1.2.1
883888
# via
@@ -1003,6 +1008,8 @@ tabulate==0.9.0
10031008
# via
10041009
# -c requirements/base-constraint.txt
10051010
# apache-superset
1011+
tiktoken==0.12.0
1012+
# via apache-superset
10061013
tomli-w==1.2.0
10071014
# via apache-superset-extensions-cli
10081015
tomlkit==0.13.3

superset-frontend/src/dashboard/components/AutoRefreshStatus/StatusIndicatorDot.test.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
* under the License.
1818
*/
1919
import { render, screen, act } from 'spec/helpers/testing-library';
20-
import { StatusIndicatorDot } from './StatusIndicatorDot';
20+
import { supersetTheme } from '@apache-superset/core/theme';
21+
import { getStatusConfig, StatusIndicatorDot } from './StatusIndicatorDot';
2122
import { AutoRefreshStatus } from '../../types/autoRefresh';
2223

2324
afterEach(() => {
@@ -62,6 +63,15 @@ test('renders with paused status', () => {
6263
expect(dot).toHaveAttribute('data-status', AutoRefreshStatus.Paused);
6364
});
6465

66+
test('uses the icon color for the paused status outline', () => {
67+
expect(
68+
getStatusConfig(supersetTheme, AutoRefreshStatus.Paused),
69+
).toMatchObject({
70+
needsBorder: true,
71+
outlineColor: 'currentColor',
72+
});
73+
});
74+
6575
test('has correct accessibility attributes', () => {
6676
render(<StatusIndicatorDot status={AutoRefreshStatus.Success} />);
6777
const dot = screen.getByTestId('status-indicator-dot');

superset-frontend/src/dashboard/components/AutoRefreshStatus/StatusIndicatorDot.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ export interface StatusIndicatorDotProps {
3939
interface StatusConfig {
4040
color: string;
4141
needsBorder: boolean;
42+
outlineColor?: string;
4243
}
4344

44-
const getStatusConfig = (
45+
export const getStatusConfig = (
4546
theme: ReturnType<typeof useTheme>,
4647
status: AutoRefreshStatus,
4748
): StatusConfig => {
@@ -75,6 +76,7 @@ const getStatusConfig = (
7576
return {
7677
color: theme.colorBgContainer,
7778
needsBorder: true,
79+
outlineColor: 'currentColor',
7880
};
7981
default:
8082
return {
@@ -136,13 +138,15 @@ export const StatusIndicatorDot: FC<StatusIndicatorDotProps> = ({
136138
width: ${size}px;
137139
height: ${size}px;
138140
border-radius: 50%;
141+
color: ${theme.colorTextSecondary};
139142
background-color: ${statusConfig.color};
140143
transition:
141144
background-color ${theme.motionDurationMid} ease-in-out,
142145
border-color ${theme.motionDurationMid} ease-in-out;
143-
border: ${statusConfig.needsBorder
144-
? `1px solid ${theme.colorBorder}`
145-
: 'none'};
146+
border: ${statusConfig.needsBorder ? '1px solid' : 'none'};
147+
border-color: ${statusConfig.needsBorder
148+
? statusConfig.outlineColor
149+
: 'transparent'};
146150
box-shadow: ${statusConfig.needsBorder
147151
? 'none'
148152
: `0 0 0 2px ${theme.colorBgContainer}`};

superset-frontend/src/explore/actions/hydrateExplore.test.ts

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ import { VizType } from '@superset-ui/core';
2121
import { hydrateExplore, HYDRATE_EXPLORE } from './hydrateExplore';
2222
import { exploreInitialData } from '../fixtures';
2323

24+
afterEach(() => {
25+
window.history.pushState({}, '', '/');
26+
});
27+
2428
test('creates hydrate action from initial data', () => {
2529
const dispatch = jest.fn();
2630
const getState = jest.fn(() => ({
@@ -168,6 +172,84 @@ test('creates hydrate action with existing state', () => {
168172
);
169173
});
170174

175+
test('hydrates sliceName from preview form data before saved slice name', () => {
176+
window.history.pushState({}, '', '/explore/?form_data_key=preview-key');
177+
178+
const dispatch = jest.fn();
179+
const getState = jest.fn(() => ({
180+
user: {},
181+
charts: {},
182+
datasources: {},
183+
common: {},
184+
explore: {},
185+
}));
186+
const previewSliceName = 'RENAMED - Bug Evidence';
187+
const savedSliceName = 'Most Populated Countries';
188+
const previewInitialData = {
189+
...exploreInitialData,
190+
form_data: {
191+
...exploreInitialData.form_data,
192+
slice_name: previewSliceName,
193+
},
194+
slice: {
195+
...exploreInitialData.slice!,
196+
slice_name: savedSliceName,
197+
},
198+
};
199+
200+
// @ts-expect-error we only need the fields consumed by hydrateExplore
201+
hydrateExplore(previewInitialData)(dispatch, getState);
202+
203+
expect(dispatch).toHaveBeenCalledWith(
204+
expect.objectContaining({
205+
type: HYDRATE_EXPLORE,
206+
data: expect.objectContaining({
207+
explore: expect.objectContaining({
208+
sliceName: previewSliceName,
209+
}),
210+
}),
211+
}),
212+
);
213+
});
214+
215+
test('hydrates sliceName from saved slice when regular form data has stale name', () => {
216+
const dispatch = jest.fn();
217+
const getState = jest.fn(() => ({
218+
user: {},
219+
charts: {},
220+
datasources: {},
221+
common: {},
222+
explore: {},
223+
}));
224+
const staleFormDataSliceName = 'Stale Params Name';
225+
const savedSliceName = 'Current Saved Name';
226+
const savedChartInitialData = {
227+
...exploreInitialData,
228+
form_data: {
229+
...exploreInitialData.form_data,
230+
slice_name: staleFormDataSliceName,
231+
},
232+
slice: {
233+
...exploreInitialData.slice!,
234+
slice_name: savedSliceName,
235+
},
236+
};
237+
238+
// @ts-expect-error we only need the fields consumed by hydrateExplore
239+
hydrateExplore(savedChartInitialData)(dispatch, getState);
240+
241+
expect(dispatch).toHaveBeenCalledWith(
242+
expect.objectContaining({
243+
type: HYDRATE_EXPLORE,
244+
data: expect.objectContaining({
245+
explore: expect.objectContaining({
246+
sliceName: savedSliceName,
247+
}),
248+
}),
249+
}),
250+
);
251+
});
252+
171253
test('uses configured default time range if not set', () => {
172254
const dispatch = jest.fn();
173255
const getState = jest.fn(() => ({

0 commit comments

Comments
 (0)