From 08e44c085014ca258fe0c22886067dc716a910c6 Mon Sep 17 00:00:00 2001 From: "Michael S. Molina" <70410625+michael-s-molina@users.noreply.github.com> Date: Mon, 17 Jun 2024 09:25:20 -0300 Subject: [PATCH 01/34] feat: Improves the Drill By feature (#29242) Co-authored-by: JUST.in DO IT --- .../src/ui-overrides/types.ts | 11 + .../ChartContextMenu/ChartContextMenu.tsx | 12 +- .../Chart/DrillBy/DrillByMenuItems.test.tsx | 9 +- .../Chart/DrillBy/DrillByMenuItems.tsx | 194 ++++++++++++------ .../Chart/MenuItemWithTruncation.tsx | 3 +- 5 files changed, 160 insertions(+), 69 deletions(-) diff --git a/superset-frontend/packages/superset-ui-core/src/ui-overrides/types.ts b/superset-frontend/packages/superset-ui-core/src/ui-overrides/types.ts index bd2fa9047c..775e2c129a 100644 --- a/superset-frontend/packages/superset-ui-core/src/ui-overrides/types.ts +++ b/superset-frontend/packages/superset-ui-core/src/ui-overrides/types.ts @@ -23,6 +23,8 @@ import { ComponentType, } from 'react'; import type { Editor } from 'brace'; +import { BaseFormData } from '../query'; +import { JsonResponse } from '../connection'; /** * A function which returns text (or marked-up text) @@ -30,6 +32,14 @@ import type { Editor } from 'brace'; */ type ReturningDisplayable

= (props: P) => string | ReactElement; +/** + * A function which returns the drill by options for a given dataset and chart's formData. + */ +export type LoadDrillByOptions = ( + datasetId: number, + formData: BaseFormData, +) => Promise; + /** * This type defines all available extensions of Superset's default UI. * Namespace the keys here to follow the form of 'some_domain.functionality.item'. @@ -193,6 +203,7 @@ export interface CustomAutocomplete extends AutocompleteItem { export type Extensions = Partial<{ 'alertsreports.header.icon': ComponentType; + 'load.drillby.options': LoadDrillByOptions; 'embedded.documentation.configuration_details': ComponentType; 'embedded.documentation.description': ReturningDisplayable; 'embedded.documentation.url': string; diff --git a/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx b/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx index b7da3a7382..bf1ea84ff1 100644 --- a/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx +++ b/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.tsx @@ -18,6 +18,7 @@ */ import { forwardRef, + Key, ReactNode, RefObject, useCallback, @@ -104,6 +105,7 @@ const ChartContextMenu = ( const crossFiltersEnabled = useSelector( ({ dashboardInfo }) => dashboardInfo.crossFiltersEnabled, ); + const [openKeys, setOpenKeys] = useState([]); const isDisplayed = (item: ContextMenuItem) => displayedItems === ContextMenuItem.All || @@ -254,6 +256,8 @@ const ChartContextMenu = ( formData={formData} contextMenuY={clientY} submenuIndex={submenuIndex} + open={openKeys.includes('drill-by-submenu')} + key="drill-by-submenu" {...(additionalConfig?.drillBy || {})} />, ); @@ -288,7 +292,13 @@ const ChartContextMenu = ( return ReactDOM.createPortal( +

{ + setOpenKeys(openKeys); + }} + > {menuItems.length ? ( menuItems ) : ( diff --git a/superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.test.tsx b/superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.test.tsx index 0f2dff8bce..8b65d21409 100644 --- a/superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.test.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.test.tsx @@ -31,11 +31,17 @@ import { DrillByMenuItems, DrillByMenuItemsProps } from './DrillByMenuItems'; /* eslint jest/expect-expect: ["warn", { "assertFunctionNames": ["expect*"] }] */ -const DATASET_ENDPOINT = 'glob:*/api/v1/dataset/7'; +const DATASET_ENDPOINT = 'glob:*/api/v1/dataset/7*'; const CHART_DATA_ENDPOINT = 'glob:*/api/v1/chart/data*'; const FORM_DATA_KEY_ENDPOINT = 'glob:*/api/v1/explore/form_data'; const { form_data: defaultFormData } = chartQueries[sliceId]; +jest.mock('lodash/debounce', () => (fn: Function & { debounce: Function }) => { + // eslint-disable-next-line no-param-reassign + fn.debounce = jest.fn(); + return fn; +}); + const defaultColumns = [ { column_name: 'col1', groupby: true }, { column_name: 'col2', groupby: true }, @@ -68,6 +74,7 @@ const renderMenu = ({ , diff --git a/superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.tsx b/superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.tsx index c7b4ec8e45..6df180cb78 100644 --- a/superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.tsx @@ -18,11 +18,12 @@ */ import { - ChangeEvent, + CSSProperties, ReactNode, useCallback, useEffect, useMemo, + useRef, useState, } from 'react'; import { Menu } from 'src/components/Menu'; @@ -31,12 +32,20 @@ import { Behavior, Column, ContextMenuFilters, + FAST_DEBOUNCE, + JsonResponse, css, ensureIsArray, getChartMetadataRegistry, + getExtensionsRegistry, + logging, t, useTheme, } from '@superset-ui/core'; +import rison from 'rison'; +import { debounce } from 'lodash'; +import { FixedSizeList as List } from 'react-window'; +import { AntdInput } from 'src/components'; import Icons from 'src/components/Icons'; import { Input } from 'src/components/Input'; import { useToasts } from 'src/components/MessageToasts/withToasts'; @@ -52,7 +61,7 @@ import { getSubmenuYOffset } from '../utils'; import { MenuItemWithTruncation } from '../MenuItemWithTruncation'; import { Dataset } from '../types'; -const MAX_SUBMENU_HEIGHT = 200; +const SUBMENU_HEIGHT = 200; const SHOW_COLUMNS_SEARCH_THRESHOLD = 10; const SEARCH_INPUT_HEIGHT = 48; @@ -65,8 +74,28 @@ export interface DrillByMenuItemsProps { onClick?: (event: MouseEvent) => void; openNewModal?: boolean; excludedColumns?: Column[]; + open: boolean; } +const loadDrillByOptions = getExtensionsRegistry().get('load.drillby.options'); + +const queryString = rison.encode({ + columns: [ + 'table_name', + 'owners.first_name', + 'owners.last_name', + 'created_by.first_name', + 'created_by.last_name', + 'created_on_humanized', + 'changed_by.first_name', + 'changed_by.last_name', + 'changed_on_humanized', + 'columns.column_name', + 'columns.verbose_name', + 'columns.groupby', + ], +}); + export const DrillByMenuItems = ({ drillByConfig, formData, @@ -76,6 +105,7 @@ export const DrillByMenuItems = ({ onClick = () => {}, excludedColumns, openNewModal = true, + open, ...rest }: DrillByMenuItemsProps) => { const theme = useTheme(); @@ -86,6 +116,9 @@ export const DrillByMenuItems = ({ const [columns, setColumns] = useState([]); const [showModal, setShowModal] = useState(false); const [currentColumn, setCurrentColumn] = useState(); + const ref = useRef(null); + const showSearch = + loadDrillByOptions || columns.length > SHOW_COLUMNS_SEARCH_THRESHOLD; const handleSelection = useCallback( (event, column) => { onClick(event); @@ -102,10 +135,14 @@ export const DrillByMenuItems = ({ }, []); useEffect(() => { - // Input is displayed only when columns.length > SHOW_COLUMNS_SEARCH_THRESHOLD - // Reset search input in case Input gets removed - setSearchInput(''); - }, [columns.length]); + if (open) { + ref.current?.input.focus(); + } else { + // Reset search input when menu is closed + ref.current?.setValue(''); + setSearchInput(''); + } + }, [open]); const hasDrillBy = drillByConfig?.groupbyFieldName; @@ -119,51 +156,59 @@ export const DrillByMenuItems = ({ const verboseMap = useVerboseMap(dataset); useEffect(() => { + async function loadOptions() { + const datasetId = Number(formData.datasource.split('__')[0]); + try { + setIsLoadingColumns(true); + let response: JsonResponse; + if (loadDrillByOptions) { + response = await loadDrillByOptions(datasetId, formData); + } else { + response = await cachedSupersetGet({ + endpoint: `/api/v1/dataset/${datasetId}?q=${queryString}`, + }); + } + const { json } = response; + const { result } = json; + setDataset(result); + setColumns( + ensureIsArray(result.columns) + .filter(column => column.groupby) + .filter( + column => + !ensureIsArray( + formData[drillByConfig?.groupbyFieldName ?? ''], + ).includes(column.column_name) && + column.column_name !== formData.x_axis && + ensureIsArray(excludedColumns)?.every( + excludedCol => excludedCol.column_name !== column.column_name, + ), + ), + ); + } catch (error) { + logging.error(error); + supersetGetCache.delete(`/api/v1/dataset/${datasetId}`); + addDangerToast(t('Failed to load dimensions for drill by')); + } finally { + setIsLoadingColumns(false); + } + } if (handlesDimensionContextMenu && hasDrillBy) { - const datasetId = formData.datasource.split('__')[0]; - cachedSupersetGet({ - endpoint: `/api/v1/dataset/${datasetId}`, - }) - .then(({ json: { result } }) => { - setDataset(result); - setColumns( - ensureIsArray(result.columns) - .filter(column => column.groupby) - .filter( - column => - !ensureIsArray( - formData[drillByConfig.groupbyFieldName ?? ''], - ).includes(column.column_name) && - column.column_name !== formData.x_axis && - ensureIsArray(excludedColumns)?.every( - excludedCol => - excludedCol.column_name !== column.column_name, - ), - ), - ); - }) - .catch(() => { - supersetGetCache.delete(`/api/v1/dataset/${datasetId}`); - addDangerToast(t('Failed to load dimensions for drill by')); - }) - .finally(() => { - setIsLoadingColumns(false); - }); + loadOptions(); } }, [ addDangerToast, + drillByConfig?.groupbyFieldName, excludedColumns, formData, - drillByConfig?.groupbyFieldName, handlesDimensionContextMenu, hasDrillBy, ]); - const handleInput = useCallback((e: ChangeEvent) => { - e.stopPropagation(); - const input = e?.target?.value; - setSearchInput(input); - }, []); + const handleInput = debounce( + (value: string) => setSearchInput(value), + FAST_DEBOUNCE, + ); const filteredColumns = useMemo( () => @@ -181,12 +226,10 @@ export const DrillByMenuItems = ({ contextMenuY, filteredColumns.length || 1, submenuIndex, - MAX_SUBMENU_HEIGHT, - columns.length > SHOW_COLUMNS_SEARCH_THRESHOLD - ? SEARCH_INPUT_HEIGHT - : 0, + SUBMENU_HEIGHT, + showSearch ? SEARCH_INPUT_HEIGHT : 0, ), - [contextMenuY, filteredColumns.length, submenuIndex, columns.length], + [contextMenuY, filteredColumns.length, submenuIndex, showSearch], ); let tooltip: ReactNode; @@ -208,27 +251,53 @@ export const DrillByMenuItems = ({ ); } + const Row = ({ + index, + data, + style, + }: { + index: number; + data: { columns: Column[] }; + style: CSSProperties; + }) => { + const { columns, ...rest } = data; + const column = columns[index]; + return ( + handleSelection(e, column)} + style={style} + > + {column.verbose_name || column.column_name} + + ); + }; + return ( <>
- {columns.length > SHOW_COLUMNS_SEARCH_THRESHOLD && ( + {showSearch && ( } - onChange={handleInput} + onChange={e => { + e.stopPropagation(); + handleInput(e.target.value); + }} placeholder={t('Search columns')} - value={searchInput} onClick={e => { // prevent closing menu when clicking on input e.nativeEvent.stopImmediatePropagation(); @@ -251,23 +320,16 @@ export const DrillByMenuItems = ({
) : filteredColumns.length ? ( -
- {filteredColumns.map(column => ( - handleSelection(e, column)} - > - {column.verbose_name || column.column_name} - - ))} -
+ {Row} + ) : ( {t('No columns found')} diff --git a/superset-frontend/src/components/Chart/MenuItemWithTruncation.tsx b/superset-frontend/src/components/Chart/MenuItemWithTruncation.tsx index fd371fb30a..1ab3daf485 100644 --- a/superset-frontend/src/components/Chart/MenuItemWithTruncation.tsx +++ b/superset-frontend/src/components/Chart/MenuItemWithTruncation.tsx @@ -17,7 +17,7 @@ * under the License. */ -import { ReactNode } from 'react'; +import { ReactNode, CSSProperties } from 'react'; import { css, truncationCSS, useCSSTextTruncation } from '@superset-ui/core'; import { Menu } from 'src/components/Menu'; import { Tooltip } from 'src/components/Tooltip'; @@ -27,6 +27,7 @@ export type MenuItemWithTruncationProps = { tooltipText: ReactNode; children: ReactNode; onClick?: MenuProps['onClick']; + style?: CSSProperties; }; export const MenuItemWithTruncation = ({ From 914ebd9ba39bfcbf8d4a2b91d18eda5d3c7d2c86 Mon Sep 17 00:00:00 2001 From: Jack <41238731+fisjac@users.noreply.github.com> Date: Mon, 17 Jun 2024 10:52:31 -0500 Subject: [PATCH 02/34] fix(permalink): adding anchor to dashboard permalink generation (#28744) --- .../HeaderActionsDropdown.test.tsx | 7 ++++--- .../Header/HeaderActionsDropdown/index.jsx | 14 ++++++++++++-- .../src/dashboard/components/Header/index.jsx | 4 ++-- .../src/dashboard/components/Header/types.ts | 6 ++++++ .../components/RefreshIntervalModal.test.tsx | 2 +- 5 files changed, 25 insertions(+), 8 deletions(-) diff --git a/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/HeaderActionsDropdown.test.tsx b/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/HeaderActionsDropdown.test.tsx index 6b0cbe3a37..3a0d25d600 100644 --- a/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/HeaderActionsDropdown.test.tsx +++ b/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/HeaderActionsDropdown.test.tsx @@ -23,9 +23,9 @@ import userEvent from '@testing-library/user-event'; import fetchMock from 'fetch-mock'; import { HeaderDropdownProps } from 'src/dashboard/components/Header/types'; import injectCustomCss from 'src/dashboard/util/injectCustomCss'; -import HeaderActionsDropdown from '.'; +import { HeaderActionsDropdown } from '.'; -const createProps = () => ({ +const createProps = (): HeaderDropdownProps => ({ addSuccessToast: jest.fn(), addDangerToast: jest.fn(), customCss: '.ant-menu {margin-left: 100px;}', @@ -66,6 +66,7 @@ const createProps = () => ({ userCanCurate: false, lastModifiedTime: 0, isDropdownVisible: true, + manageEmbedded: jest.fn(), dataMask: {}, logEvent: jest.fn(), }); @@ -228,9 +229,9 @@ test('should show the properties modal', async () => { describe('UNSAFE_componentWillReceiveProps', () => { let wrapper: any; + const mockedProps = createProps(); const props = { ...mockedProps, customCss: '' }; - beforeEach(() => { wrapper = shallow(); wrapper.setState({ css: props.customCss }); diff --git a/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/index.jsx b/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/index.jsx index 8008558ded..73d136e81f 100644 --- a/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/index.jsx +++ b/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/index.jsx @@ -19,6 +19,7 @@ import { PureComponent } from 'react'; import PropTypes from 'prop-types'; import { isEmpty } from 'lodash'; +import { connect } from 'react-redux'; import { t } from '@superset-ui/core'; import { Menu } from 'src/components/Menu'; import { URL_PARAMS } from 'src/constants'; @@ -46,6 +47,7 @@ const propTypes = { customCss: PropTypes.string, colorNamespace: PropTypes.string, colorScheme: PropTypes.string, + directPathToChild: PropTypes.array, onChange: PropTypes.func.isRequired, updateCss: PropTypes.func.isRequired, forceRefreshAllCharts: PropTypes.func.isRequired, @@ -77,7 +79,11 @@ const defaultProps = { refreshWarning: null, }; -class HeaderActionsDropdown extends PureComponent { +const mapStateToProps = state => ({ + directPathToChild: state.dashboardState.directPathToChild, +}); + +export class HeaderActionsDropdown extends PureComponent { static discardChanges() { window.location.reload(); } @@ -173,6 +179,7 @@ class HeaderActionsDropdown extends PureComponent { addDangerToast, setIsDropdownVisible, isDropdownVisible, + directPathToChild, ...rest } = this.props; @@ -191,6 +198,8 @@ class HeaderActionsDropdown extends PureComponent { const refreshIntervalOptions = dashboardInfo.common?.conf?.DASHBOARD_AUTO_REFRESH_INTERVALS; + const dashboardComponentId = [...(directPathToChild || [])].pop(); + return ( {!editMode && ( @@ -286,6 +295,7 @@ class HeaderActionsDropdown extends PureComponent { addSuccessToast={addSuccessToast} addDangerToast={addDangerToast} dashboardId={dashboardId} + dashboardComponentId={dashboardComponentId} /> )} @@ -354,4 +364,4 @@ class HeaderActionsDropdown extends PureComponent { HeaderActionsDropdown.propTypes = propTypes; HeaderActionsDropdown.defaultProps = defaultProps; -export default HeaderActionsDropdown; +export default connect(mapStateToProps)(HeaderActionsDropdown); diff --git a/superset-frontend/src/dashboard/components/Header/index.jsx b/superset-frontend/src/dashboard/components/Header/index.jsx index 7cb8ccd2b8..bb0f79d1d4 100644 --- a/superset-frontend/src/dashboard/components/Header/index.jsx +++ b/superset-frontend/src/dashboard/components/Header/index.jsx @@ -41,7 +41,7 @@ import { AntdButton } from 'src/components/'; import { findPermission } from 'src/utils/findPermission'; import { Tooltip } from 'src/components/Tooltip'; import { safeStringify } from 'src/utils/safeStringify'; -import HeaderActionsDropdown from 'src/dashboard/components/Header/HeaderActionsDropdown'; +import ConnectedHeaderActionsDropdown from 'src/dashboard/components/Header/HeaderActionsDropdown'; import PublishedStatus from 'src/dashboard/components/PublishedStatus'; import UndoRedoKeyListeners from 'src/dashboard/components/UndoRedoKeyListeners'; import PropertiesModal from 'src/dashboard/components/PropertiesModal'; @@ -672,7 +672,7 @@ class Header extends PureComponent { onVisibleChange: this.setIsDropdownVisible, }} additionalActionsMenu={ - void; userCanEdit: boolean; userCanSave: boolean; + userCanShare: boolean; + userCanCurate: boolean; + isDropdownVisible: boolean; + manageEmbedded: () => void; + dataMask: any; lastModifiedTime: number; + logEvent: () => void; } export interface HeaderProps { diff --git a/superset-frontend/src/dashboard/components/RefreshIntervalModal.test.tsx b/superset-frontend/src/dashboard/components/RefreshIntervalModal.test.tsx index 471c0ec25b..a8aac270d7 100644 --- a/superset-frontend/src/dashboard/components/RefreshIntervalModal.test.tsx +++ b/superset-frontend/src/dashboard/components/RefreshIntervalModal.test.tsx @@ -22,7 +22,7 @@ import userEvent from '@testing-library/user-event'; import fetchMock from 'fetch-mock'; import RefreshIntervalModal from 'src/dashboard/components/RefreshIntervalModal'; -import HeaderActionsDropdown from 'src/dashboard/components/Header/HeaderActionsDropdown'; +import { HeaderActionsDropdown } from 'src/dashboard/components/Header/HeaderActionsDropdown'; const createProps = () => ({ addSuccessToast: jest.fn(), From ae7c40920e8a8809939cbaea2339983afe0a7c6b Mon Sep 17 00:00:00 2001 From: Elizabeth Thompson Date: Mon, 17 Jun 2024 13:01:04 -0700 Subject: [PATCH 03/34] chore: translate strings to French (#29247) --- superset/translations/fr/LC_MESSAGES/messages.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset/translations/fr/LC_MESSAGES/messages.po b/superset/translations/fr/LC_MESSAGES/messages.po index 62d92b10f7..1ef84114bd 100644 --- a/superset/translations/fr/LC_MESSAGES/messages.po +++ b/superset/translations/fr/LC_MESSAGES/messages.po @@ -325,7 +325,7 @@ msgstr "%s colonne(s)" #: superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.tsx:230 #, python-format msgid "%s ineligible item(s) are hidden" -msgstr "" +msgstr "%s article(s) non éligible(s) sont caché(s)." #: superset-frontend/src/features/tags/BulkTagModal.tsx:74 #, python-format From d49d79121cce113910ca0132fc6b1ad26fa809c8 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Mon, 17 Jun 2024 13:42:58 -0700 Subject: [PATCH 04/34] chore: trigger CI jobs on all release-related branches (#29274) --- .github/workflows/check_db_migration_confict.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/docker.yml | 2 +- .github/workflows/embedded-sdk-release.yml | 2 +- .github/workflows/generate-FOSSA-report.yml | 2 +- .github/workflows/github-action-validator.yml | 2 +- .github/workflows/pre-commit.yml | 2 +- .github/workflows/prefer-typescript.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/superset-cli.yml | 2 +- .github/workflows/superset-e2e.yml | 2 +- .github/workflows/superset-frontend.yml | 2 +- .github/workflows/superset-helm-release.yml | 2 +- .github/workflows/superset-python-integrationtest.yml | 2 +- .github/workflows/superset-python-misc.yml | 2 +- .github/workflows/superset-python-presto-hive.yml | 2 +- .github/workflows/superset-python-unittest.yml | 2 +- .github/workflows/superset-translations.yml | 2 +- .github/workflows/superset-websocket.yml | 2 +- .github/workflows/tech-debt.yml | 2 +- UPDATING.md | 4 ++++ 21 files changed, 24 insertions(+), 20 deletions(-) diff --git a/.github/workflows/check_db_migration_confict.yml b/.github/workflows/check_db_migration_confict.yml index 079ba954ed..e717f41193 100644 --- a/.github/workflows/check_db_migration_confict.yml +++ b/.github/workflows/check_db_migration_confict.yml @@ -5,7 +5,7 @@ on: - "superset/migrations/**" branches: - "master" - - "[0-9].[0-9]" + - "[0-9].[0-9]*" pull_request: paths: - "superset/migrations/**" diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 15395bbfde..d9d5abdbdb 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -2,7 +2,7 @@ name: "CodeQL" on: push: - branches: ["master", "[0-9].[0-9]"] + branches: ["master", "[0-9].[0-9]*"] pull_request: # The branches below must be a subset of the branches above branches: ["master"] diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 849fb7b132..f38cd4fee4 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -4,7 +4,7 @@ on: push: branches: - "master" - - "[0-9].[0-9]" + - "[0-9].[0-9]*" pull_request: branches: - "master" diff --git a/.github/workflows/embedded-sdk-release.yml b/.github/workflows/embedded-sdk-release.yml index ff51d8f97b..323b1a9e99 100644 --- a/.github/workflows/embedded-sdk-release.yml +++ b/.github/workflows/embedded-sdk-release.yml @@ -4,7 +4,7 @@ on: push: branches: - "master" - - "[0-9].[0-9]" + - "[0-9].[0-9]*" jobs: config: diff --git a/.github/workflows/generate-FOSSA-report.yml b/.github/workflows/generate-FOSSA-report.yml index fb30d7dcc5..352ba845d9 100644 --- a/.github/workflows/generate-FOSSA-report.yml +++ b/.github/workflows/generate-FOSSA-report.yml @@ -4,7 +4,7 @@ on: push: branches: - "master" - - "[0-9].[0-9]" + - "[0-9].[0-9]*" jobs: config: diff --git a/.github/workflows/github-action-validator.yml b/.github/workflows/github-action-validator.yml index e6d07b56e9..0dd5015531 100644 --- a/.github/workflows/github-action-validator.yml +++ b/.github/workflows/github-action-validator.yml @@ -4,7 +4,7 @@ on: push: branches: - "master" - - "[0-9].[0-9]" + - "[0-9].[0-9]*" pull_request: types: [synchronize, opened, reopened, ready_for_review] diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 541b4a8bfc..6ccb66df77 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -4,7 +4,7 @@ on: push: branches: - "master" - - "[0-9].[0-9]" + - "[0-9].[0-9]*" pull_request: types: [synchronize, opened, reopened, ready_for_review] diff --git a/.github/workflows/prefer-typescript.yml b/.github/workflows/prefer-typescript.yml index f3179d3bcc..0b34f25bae 100644 --- a/.github/workflows/prefer-typescript.yml +++ b/.github/workflows/prefer-typescript.yml @@ -4,7 +4,7 @@ on: push: branches: - "master" - - "[0-9].[0-9]" + - "[0-9].[0-9]*" paths: - "superset-frontend/src/**" pull_request: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ad1737c477..43862bd50b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,7 @@ on: push: branches: - "master" - - "[0-9].[0-9]" + - "[0-9].[0-9]*" jobs: config: diff --git a/.github/workflows/superset-cli.yml b/.github/workflows/superset-cli.yml index 3c98198c7e..060bae5dff 100644 --- a/.github/workflows/superset-cli.yml +++ b/.github/workflows/superset-cli.yml @@ -4,7 +4,7 @@ on: push: branches: - "master" - - "[0-9].[0-9]" + - "[0-9].[0-9]*" pull_request: types: [synchronize, opened, reopened, ready_for_review] diff --git a/.github/workflows/superset-e2e.yml b/.github/workflows/superset-e2e.yml index f59843c010..51e6548712 100644 --- a/.github/workflows/superset-e2e.yml +++ b/.github/workflows/superset-e2e.yml @@ -4,7 +4,7 @@ on: push: branches: - "master" - - "[0-9].[0-9]" + - "[0-9].[0-9]*" pull_request: types: [synchronize, opened, reopened, ready_for_review] workflow_dispatch: diff --git a/.github/workflows/superset-frontend.yml b/.github/workflows/superset-frontend.yml index f79d70754f..6438c2cc1d 100644 --- a/.github/workflows/superset-frontend.yml +++ b/.github/workflows/superset-frontend.yml @@ -4,7 +4,7 @@ on: push: branches: - "master" - - "[0-9].[0-9]" + - "[0-9].[0-9]*" pull_request: types: [synchronize, opened, reopened, ready_for_review] diff --git a/.github/workflows/superset-helm-release.yml b/.github/workflows/superset-helm-release.yml index 429c6fc255..062e237586 100644 --- a/.github/workflows/superset-helm-release.yml +++ b/.github/workflows/superset-helm-release.yml @@ -4,7 +4,7 @@ on: push: branches: - "master" - - "[0-9].[0-9]" + - "[0-9].[0-9]*" paths: - "helm/**" diff --git a/.github/workflows/superset-python-integrationtest.yml b/.github/workflows/superset-python-integrationtest.yml index fec35ef9db..2569a471b3 100644 --- a/.github/workflows/superset-python-integrationtest.yml +++ b/.github/workflows/superset-python-integrationtest.yml @@ -5,7 +5,7 @@ on: push: branches: - "master" - - "[0-9].[0-9]" + - "[0-9].[0-9]*" pull_request: types: [synchronize, opened, reopened, ready_for_review] diff --git a/.github/workflows/superset-python-misc.yml b/.github/workflows/superset-python-misc.yml index c6b1bebd89..d58226216f 100644 --- a/.github/workflows/superset-python-misc.yml +++ b/.github/workflows/superset-python-misc.yml @@ -5,7 +5,7 @@ on: push: branches: - "master" - - "[0-9].[0-9]" + - "[0-9].[0-9]*" pull_request: types: [synchronize, opened, reopened, ready_for_review] diff --git a/.github/workflows/superset-python-presto-hive.yml b/.github/workflows/superset-python-presto-hive.yml index 87ff06368d..30dbaf7d40 100644 --- a/.github/workflows/superset-python-presto-hive.yml +++ b/.github/workflows/superset-python-presto-hive.yml @@ -5,7 +5,7 @@ on: push: branches: - "master" - - "[0-9].[0-9]" + - "[0-9].[0-9]*" pull_request: types: [synchronize, opened, reopened, ready_for_review] diff --git a/.github/workflows/superset-python-unittest.yml b/.github/workflows/superset-python-unittest.yml index d26f0435ed..454ee0c61e 100644 --- a/.github/workflows/superset-python-unittest.yml +++ b/.github/workflows/superset-python-unittest.yml @@ -5,7 +5,7 @@ on: push: branches: - "master" - - "[0-9].[0-9]" + - "[0-9].[0-9]*" pull_request: types: [synchronize, opened, reopened, ready_for_review] diff --git a/.github/workflows/superset-translations.yml b/.github/workflows/superset-translations.yml index 846c661d32..11dbebb098 100644 --- a/.github/workflows/superset-translations.yml +++ b/.github/workflows/superset-translations.yml @@ -4,7 +4,7 @@ on: push: branches: - "master" - - "[0-9].[0-9]" + - "[0-9].[0-9]*" pull_request: types: [synchronize, opened, reopened, ready_for_review] diff --git a/.github/workflows/superset-websocket.yml b/.github/workflows/superset-websocket.yml index c35573ada1..2d55ceafa0 100644 --- a/.github/workflows/superset-websocket.yml +++ b/.github/workflows/superset-websocket.yml @@ -3,7 +3,7 @@ on: push: branches: - "master" - - "[0-9].[0-9]" + - "[0-9].[0-9]*" paths: - "superset-websocket/**" pull_request: diff --git a/.github/workflows/tech-debt.yml b/.github/workflows/tech-debt.yml index f912ab2068..6f73a3a51b 100644 --- a/.github/workflows/tech-debt.yml +++ b/.github/workflows/tech-debt.yml @@ -4,7 +4,7 @@ on: push: branches: - master - - "[0-9].[0-9]" + - "[0-9].[0-9]*" jobs: config: diff --git a/UPDATING.md b/UPDATING.md index 2327fcfa3f..1d2ffbf0ec 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -24,6 +24,10 @@ assists people when migrating to a new version. ## Next +- [29274](https://github.com/apache/superset/pull/29274): We made it easier to trigger CI on your + forks, whether they are public or private. Simply push to a branch that fits `[0-9].[0-9]*` and + should run on your fork, giving you flexibility on naming your release branches and triggering + CI - [27505](https://github.com/apache/superset/pull/27505): We simplified the files under `requirements/` folder. If you use these files for your builds you may want to double check that your builds are not affected. `base.txt` should be the same as before, though From 358e83a8499ace5a9effb7951740eb7552fe8c50 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 16:20:09 -0600 Subject: [PATCH 05/34] build(deps): bump ws from 8.17.0 to 8.17.1 in /superset-websocket (#29276) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- superset-websocket/package-lock.json | 14 +++++++------- superset-websocket/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/superset-websocket/package-lock.json b/superset-websocket/package-lock.json index 8950ab4581..81d941579f 100644 --- a/superset-websocket/package-lock.json +++ b/superset-websocket/package-lock.json @@ -17,7 +17,7 @@ "lodash": "^4.17.21", "uuid": "^9.0.1", "winston": "^3.13.0", - "ws": "^8.17.0" + "ws": "^8.17.1" }, "devDependencies": { "@types/cookie": "^0.6.0", @@ -6029,9 +6029,9 @@ } }, "node_modules/ws": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz", - "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "engines": { "node": ">=10.0.0" }, @@ -10696,9 +10696,9 @@ } }, "ws": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz", - "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", + "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", "requires": {} }, "xml-name-validator": { diff --git a/superset-websocket/package.json b/superset-websocket/package.json index 74b64ad565..9f919d9ffe 100644 --- a/superset-websocket/package.json +++ b/superset-websocket/package.json @@ -25,7 +25,7 @@ "lodash": "^4.17.21", "uuid": "^9.0.1", "winston": "^3.13.0", - "ws": "^8.17.0" + "ws": "^8.17.1" }, "devDependencies": { "@types/cookie": "^0.6.0", From c7b8ae9013dcbffb3bb0dda4dc1d57cc9c18048c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 16:20:34 -0600 Subject: [PATCH 06/34] build(deps): bump ws from 7.5.9 to 7.5.10 in /docs (#29275) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- docs/yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/yarn.lock b/docs/yarn.lock index b4ce0f7064..c522e53040 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -10350,14 +10350,14 @@ write-file-atomic@^3.0.3: typedarray-to-buffer "^3.1.5" ws@^7.3.1: - version "7.5.9" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" - integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== + version "7.5.10" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" + integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== ws@^8.13.0: - version "8.17.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.0.tgz#d145d18eca2ed25aaf791a183903f7be5e295fea" - integrity sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow== + version "8.17.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" + integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== xdg-basedir@^5.0.1, xdg-basedir@^5.1.0: version "5.1.0" From ab7f8ad1bfb3f65498688e916cf56734f2bda5b5 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Tue, 18 Jun 2024 09:16:14 -0700 Subject: [PATCH 07/34] docs: remove comment header in README.md (#29273) --- .rat-excludes | 1 + README.md | 4 ---- docs/package.json | 4 ++-- docs/src/intro_header.txt | 4 ++++ 4 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 docs/src/intro_header.txt diff --git a/.rat-excludes b/.rat-excludes index 70529a4bd8..7cfb991cc9 100644 --- a/.rat-excludes +++ b/.rat-excludes @@ -71,3 +71,4 @@ snowflake.svg # docs-related erd.puml erd.svg +intro_header.txt diff --git a/README.md b/README.md index aab794ec55..408cad422b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,3 @@ ---- -hide_title: true -sidebar_position: 1 ----