You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2023/08/23 20:10:33 UTC

[superset] branch fix-count-meta-db updated (e079bfa902 -> de9d86f055)

This is an automated email from the ASF dual-hosted git repository.

beto pushed a change to branch fix-count-meta-db
in repository https://gitbox.apache.org/repos/asf/superset.git


    omit e079bfa902 Fix autoincrement
    omit 2686bfd2f8 fix: count in meta DB
     add 6975084ea5 fix: extend user email size (#25053)
     add 7317d9c0b2 fix: docker-compose non-dev (#25055)
     add 60889d27ed fix: Native filter dashboard RBAC aware dataset permission (#25029)
     add c92a975e4b fix: Error when using the legacy dataset editor (#25057)
     add a9efd4b2e3 fix: dataset safe URL for explore_url (#24686)
     add 0dadf06245 chore: Organizes the files of the ReportModal feature (#25046)
     add adaab3550c fix: Ensure SQLAlchemy sessions are closed (#25031)
     add 80fcbfab7c fix(cli): import-directory is missing the application context (#21255)
     new 7096b457d1 fix: count in meta DB
     new de9d86f055 Fix autoincrement

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (e079bfa902)
            \
             N -- N -- N   refs/heads/fix-count-meta-db (de9d86f055)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .pre-commit-config.yaml                            |   7 +-
 UPDATING.md                                        |   1 +
 docker-compose-non-dev.yml                         |  11 +-
 docker/.env-non-dev                                |  10 +-
 docker/pythonpath_dev/superset_config.py           |  24 ++--
 requirements/base.txt                              |   2 +-
 setup.py                                           |   2 +-
 superset-frontend/spec/helpers/reducerIndex.ts     |   2 +-
 .../dashboard/components/Header/Header.test.tsx    |   1 -
 .../Header/HeaderActionsDropdown/index.jsx         |   2 +-
 .../dashboard/components/nativeFilters/utils.ts    |   2 +
 .../src/dashboard/containers/DashboardHeader.jsx   |   2 -
 .../useExploreAdditionalActionsMenu/index.jsx      |   2 +-
 .../src/features/alerts/AlertReportModal.tsx       |   2 +-
 superset-frontend/src/features/alerts/types.ts     |   2 +-
 .../HeaderReportDropdown/index.test.tsx            |   0
 .../ReportModal/HeaderReportDropdown/index.tsx     |   4 +-
 .../reports}/ReportModal/ReportModal.test.tsx      |   2 +-
 .../reports/ReportModal/actions.js}                |   0
 .../reports}/ReportModal/index.tsx                 |   7 +-
 .../reports/ReportModal/reducer.js}                |   7 +-
 .../reports}/ReportModal/styles.tsx                |   0
 .../src/{ => features}/reports/types.ts            |   0
 .../src/features/rls/RowLevelSecurityModal.tsx     |   2 +-
 .../src/pages/DatasetList/DatasetList.test.tsx     |  60 +++++++++-
 superset-frontend/src/pages/DatasetList/index.tsx  |  27 ++++-
 superset-frontend/src/views/store.ts               |   2 +-
 superset/cli/importexport.py                       |   1 +
 superset/config.py                                 |   2 +-
 superset/connectors/sqla/views.py                  |   1 +
 superset/datasets/commands/exceptions.py           |  17 ---
 superset/datasets/commands/update.py               |  12 --
 ...4aca4c8a2_increase_ab_user_email_field_size.py} |  32 +++---
 superset/models/dashboard.py                       |  48 ++++----
 superset/security/manager.py                       |  35 +++++-
 superset/tags/models.py                            | 126 +++++++++++----------
 superset/tasks/cache.py                            | 106 +++++++++--------
 superset/utils/urls.py                             |  19 +---
 superset/views/base.py                             |   1 +
 superset/views/datasource/views.py                 |  17 +--
 tests/integration_tests/datasets/api_tests.py      |  26 -----
 tests/integration_tests/datasource_tests.py        |  26 -----
 tests/integration_tests/security_tests.py          |  63 ++++++++++-
 tests/unit_tests/utils/urls_tests.py               |  24 ----
 44 files changed, 397 insertions(+), 342 deletions(-)
 rename superset-frontend/src/{components => features/reports}/ReportModal/HeaderReportDropdown/index.test.tsx (100%)
 rename superset-frontend/src/{components => features/reports}/ReportModal/HeaderReportDropdown/index.tsx (98%)
 rename superset-frontend/src/{components => features/reports}/ReportModal/ReportModal.test.tsx (98%)
 rename superset-frontend/src/{reports/actions/reports.js => features/reports/ReportModal/actions.js} (100%)
 rename superset-frontend/src/{components => features/reports}/ReportModal/index.tsx (98%)
 rename superset-frontend/src/{reports/reducers/reports.js => features/reports/ReportModal/reducer.js} (96%)
 rename superset-frontend/src/{components => features/reports}/ReportModal/styles.tsx (100%)
 rename superset-frontend/src/{ => features}/reports/types.ts (100%)
 copy superset/migrations/versions/{2018-12-13_15-38_cefabc8f7d38_increase_size_of_name_column_in_ab_view_.py => 2023-08-22_11-09_ec54aca4c8a2_increase_ab_user_email_field_size.py} (62%)


[superset] 01/02: fix: count in meta DB

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

beto pushed a commit to branch fix-count-meta-db
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 7096b457d144ef328cb3a5b7f0fca4371f9a9165
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Wed Aug 23 10:47:13 2023 -0700

    fix: count in meta DB
---
 superset/extensions/metadb.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/superset/extensions/metadb.py b/superset/extensions/metadb.py
index 79a3c446c4..17e9f2850c 100644
--- a/superset/extensions/metadb.py
+++ b/superset/extensions/metadb.py
@@ -62,7 +62,7 @@ from shillelagh.fields import (
 )
 from shillelagh.filters import Equal, Filter, Range
 from shillelagh.typing import RequestedOrder, Row
-from sqlalchemy import MetaData, Table
+from sqlalchemy import func, MetaData, Table
 from sqlalchemy.engine.url import URL
 from sqlalchemy.exc import NoSuchTableError
 from sqlalchemy.sql import Select, select
@@ -407,7 +407,7 @@ class SupersetShillelaghAdapter(Adapter):
             if self._rowid:
                 return result.inserted_primary_key[0]
 
-            query = self._table.count()
+            query = select([func.count()]).select_from(self._table)
             return connection.execute(query).scalar()
 
     @check_dml


[superset] 02/02: Fix autoincrement

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

beto pushed a commit to branch fix-count-meta-db
in repository https://gitbox.apache.org/repos/asf/superset.git

commit de9d86f055b9d68baab827b88c8b61d09240d371
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Wed Aug 23 12:43:06 2023 -0700

    Fix autoincrement
---
 superset/extensions/metadb.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/superset/extensions/metadb.py b/superset/extensions/metadb.py
index 17e9f2850c..50147a0a8b 100644
--- a/superset/extensions/metadb.py
+++ b/superset/extensions/metadb.py
@@ -397,6 +397,9 @@ class SupersetShillelaghAdapter(Adapter):
                 raise ProgrammingError(f"Invalid rowid specified: {row_id}")
             row[self._rowid] = row_id
 
+        if self._table.c[self._rowid].autoincrement and row[self._rowid] is None:
+            row.pop(self._rowid)
+
         query = self._table.insert().values(**row)
 
         with self.engine_context() as engine: