This is an automated email from the ASF dual-hosted git repository. michaelsmolina pushed a commit to branch 5.0 in repository https://gitbox.apache.org/repos/asf/superset.git
commit 6119d797e45809efdec1e131311935d1ed7c4e12 Author: Paul Rhodes <[email protected]> AuthorDate: Tue Mar 18 19:35:57 2025 +0000 fix(import): Ensure import exceptions are logged (#32410) (cherry picked from commit bc3e19d0a2bbf1d83d6d052507ede757eea960d3) --- superset/commands/importers/v1/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/superset/commands/importers/v1/__init__.py b/superset/commands/importers/v1/__init__.py index 989c494b60..be3bb92d0e 100644 --- a/superset/commands/importers/v1/__init__.py +++ b/superset/commands/importers/v1/__init__.py @@ -14,6 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. +import logging from typing import Any, Optional from marshmallow import Schema, validate # noqa: F401 @@ -34,6 +35,8 @@ from superset.daos.base import BaseDAO from superset.models.core import Database # noqa: F401 from superset.utils.decorators import transaction +logger = logging.getLogger(__name__) + class ImportModelsCommand(BaseCommand): """Import models""" @@ -104,6 +107,8 @@ class ImportModelsCommand(BaseCommand): self._prevent_overwrite_existing_model(exceptions) if exceptions: + for ex in exceptions: + logger.warning("Import Error: %s", ex) raise CommandInvalidError( f"Error importing {self.model_name}", exceptions,
