diff --git a/.github/workflows/bashlib.sh b/.github/workflows/bashlib.sh index baabb1783..8fd66e618 100644 --- a/.github/workflows/bashlib.sh +++ b/.github/workflows/bashlib.sh @@ -59,8 +59,7 @@ npm-install() { say "::group::Install npm packages" echo "npm: $(npm --version)" echo "node: $(node --version)" - rm -rf ./node_modules - npm install + npm ci say "::endgroup::" # cache-save npm diff --git a/.github/workflows/superset-e2e.yml b/.github/workflows/superset-e2e.yml index 78b759c72..e15c7c657 100644 --- a/.github/workflows/superset-e2e.yml +++ b/.github/workflows/superset-e2e.yml @@ -37,17 +37,41 @@ jobs: uses: actions/setup-python@v2.1.1 with: python-version: '3.7' - - name: Install dependencies + - name: OS dependencies uses: apache-superset/cached-dependencies@b90713b with: run: | apt-get-install + - name: Install python dependencies + uses: apache-superset/cached-dependencies@b90713b + with: + run: | pip-upgrade pip install -r requirements/testing.txt + - name: Setup postgres + uses: apache-superset/cached-dependencies@b90713b + with: + run: | setup-postgres + - name: Import test data + uses: apache-superset/cached-dependencies@b90713b + with: + run: | testdata + - name: Install npm dependencies + uses: apache-superset/cached-dependencies@b90713b + with: + run: | npm-install + - name: Build javascript packages + uses: apache-superset/cached-dependencies@b90713b + with: + run: | build-instrumented-assets + - name: Install cypress + uses: apache-superset/cached-dependencies@b90713b + with: + run: | cypress-install - name: Run Cypress uses: apache-superset/cached-dependencies@b90713b diff --git a/superset-frontend/cypress-base/cypress/integration/chart_list/list_view.test.ts b/superset-frontend/cypress-base/cypress/integration/chart_list/list_view.test.ts index 10de8a6d0..3f6815138 100644 --- a/superset-frontend/cypress-base/cypress/integration/chart_list/list_view.test.ts +++ b/superset-frontend/cypress-base/cypress/integration/chart_list/list_view.test.ts @@ -35,7 +35,7 @@ describe('chart list view', () => { cy.get('th[role="columnheader"]:nth-child(3)').contains( 'Visualization Type', ); - cy.get('th[role="columnheader"]:nth-child(4)').contains('Datasource'); + cy.get('th[role="columnheader"]:nth-child(4)').contains('Dataset'); cy.get('th[role="columnheader"]:nth-child(5)').contains('Modified By'); cy.get('th[role="columnheader"]:nth-child(6)').contains('Last Modified'); cy.get('th[role="columnheader"]:nth-child(7)').contains('Actions'); diff --git a/superset-frontend/spec/javascripts/components/Menu_spec.jsx b/superset-frontend/spec/javascripts/components/Menu_spec.jsx index ff6cdb1c1..ab3bdb193 100644 --- a/superset-frontend/spec/javascripts/components/Menu_spec.jsx +++ b/superset-frontend/spec/javascripts/components/Menu_spec.jsx @@ -33,9 +33,9 @@ const defaultProps = { label: 'Sources', childs: [ { - name: 'Tables', + name: 'Datasets', icon: 'fa-table', - label: 'Tables', + label: 'Datasets', url: '/tablemodelview/list/?_flt_1_is_sqllab_view=y', }, '-', diff --git a/superset-frontend/spec/javascripts/explore/components/DatasourceControl_spec.jsx b/superset-frontend/spec/javascripts/explore/components/DatasourceControl_spec.jsx index 7b09c1108..3f7af1506 100644 --- a/superset-frontend/spec/javascripts/explore/components/DatasourceControl_spec.jsx +++ b/superset-frontend/spec/javascripts/explore/components/DatasourceControl_spec.jsx @@ -27,7 +27,7 @@ import DatasourceControl from 'src/explore/components/controls/DatasourceControl const defaultProps = { name: 'datasource', - label: 'Datasource', + label: 'Dataset', value: '1__table', datasource: { name: 'birth_names', diff --git a/superset-frontend/src/datasource/DatasourceEditor.jsx b/superset-frontend/src/datasource/DatasourceEditor.jsx index 4a36b90df..c2c5dd1a7 100644 --- a/superset-frontend/src/datasource/DatasourceEditor.jsx +++ b/superset-frontend/src/datasource/DatasourceEditor.jsx @@ -488,7 +488,7 @@ export class DatasourceEditor extends React.PureComponent { fieldKey="default_endpoint" label={t('Default URL')} description={t( - 'Default URL to redirect to when accessing from the datasource list page', + 'Default URL to redirect to when accessing from the dataset list page', )} control={} /> @@ -547,7 +547,7 @@ export class DatasourceEditor extends React.PureComponent { fieldKey="sql" label={t('SQL')} description={t( - 'When specifying SQL, the datasource acts as a view. ' + + 'When specifying SQL, the dataset acts as a view. ' + 'Superset will use this statement as a subquery while grouping and filtering ' + 'on the generated parent queries.', )} @@ -836,7 +836,7 @@ export class DatasourceEditor extends React.PureComponent { {t('Be careful.')} {t( - 'Changing these settings will affect all charts using this datasource, including charts owned by other people.', + 'Changing these settings will affect all charts using this dataset, including charts owned by other people.', )} diff --git a/superset-frontend/src/datasource/DatasourceModal.tsx b/superset-frontend/src/datasource/DatasourceModal.tsx index 6af23b69d..fec7d4d62 100644 --- a/superset-frontend/src/datasource/DatasourceModal.tsx +++ b/superset-frontend/src/datasource/DatasourceModal.tsx @@ -116,8 +116,8 @@ const DatasourceModal: FunctionComponent = ({ >
{' '} - {t(`The data source configuration exposed here - affects all the charts using this datasource. + {t(`The dataset configuration exposed here + affects all the charts using this dataset. Be mindful that changing settings here may affect other charts in undesirable ways.`)} @@ -142,7 +142,7 @@ const DatasourceModal: FunctionComponent = ({
- {t('Datasource Editor for ')} + {t('Edit Dataset ')} {currentDatasource.table_name}
diff --git a/superset-frontend/src/explore/controls.jsx b/superset-frontend/src/explore/controls.jsx index 07ca75a02..046a6ed2a 100644 --- a/superset-frontend/src/explore/controls.jsx +++ b/superset-frontend/src/explore/controls.jsx @@ -197,7 +197,7 @@ export const controls = { datasource: { type: 'DatasourceControl', - label: t('Datasource'), + label: t('Dataset'), default: null, description: null, mapStateToProps: ({ datasource }) => ({ diff --git a/superset-frontend/src/views/CRUD/chart/ChartList.tsx b/superset-frontend/src/views/CRUD/chart/ChartList.tsx index bf2fded8b..5406cfc29 100644 --- a/superset-frontend/src/views/CRUD/chart/ChartList.tsx +++ b/superset-frontend/src/views/CRUD/chart/ChartList.tsx @@ -220,7 +220,7 @@ function ChartList(props: ChartListProps) { }, }, }: any) => {dsNameTxt}, - Header: t('Datasource'), + Header: t('Dataset'), accessor: 'datasource_name', }, { @@ -345,7 +345,7 @@ function ChartList(props: ChartListProps) { .map(k => ({ label: k, value: k })), }, { - Header: t('Datasource'), + Header: t('Dataset'), id: 'datasource_id', input: 'select', operator: 'eq', diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx b/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx index c11bac5c9..8ef6b7fca 100644 --- a/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx +++ b/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx @@ -370,7 +370,7 @@ const DatasetList: FunctionComponent = ({ paginate: true, }, { - Header: t('Datasource'), + Header: t('Database'), id: 'database', input: 'select', operator: 'rel_o_m', diff --git a/superset/app.py b/superset/app.py index 11cb004da..43089326e 100644 --- a/superset/app.py +++ b/superset/app.py @@ -209,20 +209,20 @@ class SupersetAppInitializer: "Databases", label=__("Databases"), icon="fa-database", - category="Sources", - category_label=__("Sources"), + category="Data", + category_label=__("Data"), category_icon="fa-database", ) appbuilder.add_link( - "Tables", - label=__("Tables"), + "Datasets", + label=__("Datasets"), href="/tablemodelview/list/?_flt_1_is_sqllab_view=y", icon="fa-table", - category="Sources", - category_label=__("Sources"), + category="Data", + category_label=__("Data"), category_icon="fa-table", ) - appbuilder.add_separator("Sources") + appbuilder.add_separator("Data") appbuilder.add_view( SliceModelView, "Charts", @@ -332,8 +332,8 @@ class SupersetAppInitializer: label=__("Upload a CSV"), href="/csvtodatabaseview/form", icon="fa-upload", - category="Sources", - category_label=__("Sources"), + category="Data", + category_label=__("Data"), category_icon="fa-wrench", ) try: @@ -347,8 +347,8 @@ class SupersetAppInitializer: label=__("Upload Excel"), href="/exceltodatabaseview/form", icon="fa-upload", - category="Sources", - category_label=__("Sources"), + category="Data", + category_label=__("Data"), category_icon="fa-wrench", ) except ImportError: @@ -418,13 +418,13 @@ class SupersetAppInitializer: # Conditionally setup Druid Views # if self.config["DRUID_IS_ACTIVE"]: - appbuilder.add_separator("Sources") + appbuilder.add_separator("Data") appbuilder.add_view( DruidDatasourceModelView, "Druid Datasources", label=__("Druid Datasources"), - category="Sources", - category_label=__("Sources"), + category="Data", + category_label=__("Data"), icon="fa-cube", ) appbuilder.add_view( @@ -432,8 +432,8 @@ class SupersetAppInitializer: name="Druid Clusters", label=__("Druid Clusters"), icon="fa-cubes", - category="Sources", - category_label=__("Sources"), + category="Data", + category_label=__("Data"), category_icon="fa-database", ) appbuilder.add_view_no_menu(DruidMetricInlineView) @@ -445,8 +445,8 @@ class SupersetAppInitializer: "Scan New Datasources", label=__("Scan New Datasources"), href="/druid/scan_new_datasources/", - category="Sources", - category_label=__("Sources"), + category="Data", + category_label=__("Data"), category_icon="fa-database", icon="fa-refresh", ) @@ -454,12 +454,12 @@ class SupersetAppInitializer: "Refresh Druid Metadata", label=__("Refresh Druid Metadata"), href="/druid/refresh_datasources/", - category="Sources", - category_label=__("Sources"), + category="Data", + category_label=__("Data"), category_icon="fa-database", icon="fa-cog", ) - appbuilder.add_separator("Sources") + appbuilder.add_separator("Data") def init_app_in_ctx(self) -> None: """ diff --git a/tests/security_tests.py b/tests/security_tests.py index fa8782295..64c6f32cc 100644 --- a/tests/security_tests.py +++ b/tests/security_tests.py @@ -642,8 +642,8 @@ class TestRolePermission(SupersetTestCase): self.assertIn(("can_explore_json", "Superset"), perm_set) self.assertIn(("can_userinfo", "UserDBModelView"), perm_set) self.assert_can_menu("Databases", perm_set) - self.assert_can_menu("Tables", perm_set) - self.assert_can_menu("Sources", perm_set) + self.assert_can_menu("Datasets", perm_set) + self.assert_can_menu("Data", perm_set) self.assert_can_menu("Charts", perm_set) self.assert_can_menu("Dashboards", perm_set)