You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2023/03/11 00:14:09 UTC

[superset] branch 2.1 updated (3dc90561d5 -> 2a5ef50e5d)

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

elizabeth pushed a change to branch 2.1
in repository https://gitbox.apache.org/repos/asf/superset.git


    omit 3dc90561d5 update test mode
     new d19d298d9d chore: use util test env for init check (#23325)
     new 2a5ef50e5d update releasing process for testing

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   (3dc90561d5)
            \
             N -- N -- N   refs/heads/2.1 (2a5ef50e5d)

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:
 .github/workflows/superset-python-unittest.yml | 2 ++
 RELEASING/from_tarball_entrypoint.sh           | 2 +-
 superset/initialization/__init__.py            | 6 ++----
 3 files changed, 5 insertions(+), 5 deletions(-)


[superset] 01/02: chore: use util test env for init check (#23325)

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

elizabeth pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/superset.git

commit d19d298d9d9ea3cd5e72e1436d03cb2ea4bb737e
Author: Elizabeth Thompson <es...@gmail.com>
AuthorDate: Fri Mar 10 16:07:50 2023 -0800

    chore: use util test env for init check (#23325)
---
 .github/workflows/superset-python-unittest.yml | 2 ++
 superset/initialization/__init__.py            | 5 ++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/superset-python-unittest.yml b/.github/workflows/superset-python-unittest.yml
index 1ff07375d4..8c94d0f458 100644
--- a/.github/workflows/superset-python-unittest.yml
+++ b/.github/workflows/superset-python-unittest.yml
@@ -50,6 +50,8 @@ jobs:
             mkdir ${{ github.workspace }}/.temp
       - name: Python unit tests
         if: steps.check.outcome == 'failure'
+        env:
+          SUPERSET_TESTENV: true
         run: |
           pytest --durations-min=0.5 --cov-report= --cov=superset ./tests/common ./tests/unit_tests --cache-clear
       - name: Upload code coverage
diff --git a/superset/initialization/__init__.py b/superset/initialization/__init__.py
index c01ee7ba09..ef332e502d 100644
--- a/superset/initialization/__init__.py
+++ b/superset/initialization/__init__.py
@@ -53,7 +53,7 @@ from superset.extensions import (
 from superset.security import SupersetSecurityManager
 from superset.superset_typing import FlaskResponse
 from superset.tags.core import register_sqla_event_listeners
-from superset.utils.core import pessimistic_connection_handling
+from superset.utils.core import is_test, pessimistic_connection_handling
 from superset.utils.log import DBEventLogger, get_event_logger_from_cfg_value
 
 if TYPE_CHECKING:
@@ -457,8 +457,7 @@ class SupersetAppInitializer:  # pylint: disable=too-many-public-methods
             if (
                 self.superset_app.debug
                 or self.superset_app.config["TESTING"]
-                # There must be a better way
-                or "pytest" in sys.modules
+                or is_test()
             ):
                 logger.warning("Debug mode identified with default secret key")
                 log_default_secret_key_warning()


[superset] 02/02: update releasing process for testing

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

elizabeth pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 2a5ef50e5d90a72fe69b00c5af1a30c2ef6f5710
Author: Elizabeth Thompson <es...@gmail.com>
AuthorDate: Fri Mar 10 16:13:46 2023 -0800

    update releasing process for testing
---
 RELEASING/Dockerfile.from_local_tarball | 3 ++-
 RELEASING/from_tarball_entrypoint.sh    | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/RELEASING/Dockerfile.from_local_tarball b/RELEASING/Dockerfile.from_local_tarball
index 4860db6428..b55bbe870b 100644
--- a/RELEASING/Dockerfile.from_local_tarball
+++ b/RELEASING/Dockerfile.from_local_tarball
@@ -61,6 +61,7 @@ RUN pip install --upgrade setuptools pip \
 RUN flask fab babel-compile --target superset/translations
 
 ENV PATH=/home/superset/superset/bin:$PATH \
-    PYTHONPATH=/home/superset/superset/:$PYTHONPATH
+    PYTHONPATH=/home/superset/superset/:$PYTHONPATH \
+    SUPERSET_TESTENV=true
 COPY from_tarball_entrypoint.sh /entrypoint.sh
 ENTRYPOINT ["/entrypoint.sh"]
diff --git a/RELEASING/from_tarball_entrypoint.sh b/RELEASING/from_tarball_entrypoint.sh
index a2ddfb4f89..fcdfe86644 100755
--- a/RELEASING/from_tarball_entrypoint.sh
+++ b/RELEASING/from_tarball_entrypoint.sh
@@ -19,6 +19,7 @@ set -ex
 
 echo "[WARNING] this entrypoint creates an admin/admin user"
 echo "[WARNING] it should only be used for lightweight testing/validation"
+if $SUPERSET_TESTENV then echo "SUPERSET IS RUNNING IN TEST MODE"
 
 # Create an admin user (you will be prompted to set username, first and last name before setting a password)
 superset fab create-admin \