You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2026/07/24 20:43:19 UTC

[PR] fix(semantic-layers): show a friendly warning when schema enrichment falls back [superset]

rusackas opened a new pull request, #42400:
URL: https://github.com/apache/superset/pull/42400

   ### SUMMARY
   When configuration-schema enrichment fails (connection refused, driver hiccups, etc.), the raw exception text was passed through to the UI as a danger toast. That reads as raw internals, varies wildly by driver, and isn't translatable. This swaps it for a stable, translatable message pointing at the server logs, where the full exception is already recorded via `logger.exception`.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Before: toast shows e.g. `connection failed` (whatever the driver raised).
   After: toast shows "Could not load metadata for this configuration; showing the default form. See the server logs for details."
   
   ### TESTING INSTRUCTIONS
   ```bash
   pytest tests/unit_tests/semantic_layers/api_test.py
   ```
   Or point a semantic layer config at an unreachable host in the modal and confirm the toast shows the new message while the fallback form still renders.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(semantic-layers): show a friendly warning when schema enrichment falls back [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #42400:
URL: https://github.com/apache/superset/pull/42400#discussion_r3651865187


##########
superset/semantic_layers/api.py:
##########
@@ -614,8 +614,15 @@ def configuration_schema(self) -> FlaskResponse:
         warning: str | None = None
         try:
             schema = cls.get_configuration_schema(parsed_config)
-        except Exception as ex:  # pylint: disable=broad-except
-            warning = str(ex)
+        except Exception:  # pylint: disable=broad-except

Review Comment:
   `logger.exception()` already captures the full traceback server-side (it's `exc_info=True` under the hood), so we're not losing context there. Keeping the raw exception text out of the API response is the actual point of this change, don't want to leak internal details to whoever's looking at the form.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(semantic-layers): show a friendly warning when schema enrichment falls back [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42400:
URL: https://github.com/apache/superset/pull/42400#issuecomment-5081916214

   <!-- Bito Reply -->
   The code change already includes `logger.exception(...)` at line 20 of the provided diff hunk (which corresponds to the 62nd line in the original file). This method automatically logs the full exception traceback, providing the necessary context for debugging while keeping the user-facing message clean and secure. Since the exception details are only sent to the server logs and not returned in the API response, this approach avoids exposing sensitive information to the end user.
   
   **superset/semantic_layers/api.py**
   ```
   logger.exception(
                   "Error enriching semantic layer configuration schema for type %s",
                   sl_type,
               )
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(semantic-layers): show a friendly warning when schema enrichment falls back [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #42400:
URL: https://github.com/apache/superset/pull/42400


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(semantic-layers): show a friendly warning when schema enrichment falls back [superset]

Posted by "hainenber (via GitHub)" <gi...@apache.org>.
hainenber commented on code in PR #42400:
URL: https://github.com/apache/superset/pull/42400#discussion_r3651704762


##########
superset/semantic_layers/api.py:
##########
@@ -614,8 +614,15 @@ def configuration_schema(self) -> FlaskResponse:
         warning: str | None = None
         try:
             schema = cls.get_configuration_schema(parsed_config)
-        except Exception as ex:  # pylint: disable=broad-except
-            warning = str(ex)
+        except Exception:  # pylint: disable=broad-except

Review Comment:
   I wonder if we can log out the exception in the 62th-lined logger for better context or could be a security issue in the logged out data?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(semantic-layers): show a friendly warning when schema enrichment falls back [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42400:
URL: https://github.com/apache/superset/pull/42400#issuecomment-5074214284

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(semantic-layers): show a friendly warning when schema enrichment falls back [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #42400:
URL: https://github.com/apache/superset/pull/42400#issuecomment-5074362478

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/42400?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `0%` with `2 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 64.45%. Comparing base ([`5ffdac1`](https://app.codecov.io/gh/apache/superset/commit/5ffdac1871d2b2d5579c13130eecdd499c242c79?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1a16b2a`](https://app.codecov.io/gh/apache/superset/commit/1a16b2acec23fb74ce43d94bb358c036366cbd63?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 3 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/42400?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [superset/semantic\_layers/api.py](https://app.codecov.io/gh/apache/superset/pull/42400?src=pr&el=tree&filepath=superset%2Fsemantic_layers%2Fapi.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvc2VtYW50aWNfbGF5ZXJzL2FwaS5weQ==) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/42400?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #42400      +/-   ##
   ==========================================
   - Coverage   65.27%   64.45%   -0.82%     
   ==========================================
     Files        2795     2795              
     Lines      157549   157549              
     Branches    36039    36039              
   ==========================================
   - Hits       102836   101553    -1283     
   - Misses      52736    54026    +1290     
   + Partials     1977     1970       -7     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/42400/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [hive](https://app.codecov.io/gh/apache/superset/pull/42400/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.43% <0.00%> (ø)` | |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/42400/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [postgres](https://app.codecov.io/gh/apache/superset/pull/42400/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [presto](https://app.codecov.io/gh/apache/superset/pull/42400/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.35% <0.00%> (ø)` | |
   | [python](https://app.codecov.io/gh/apache/superset/pull/42400/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.44% <0.00%> (-1.65%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/42400/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.30% <0.00%> (ø)` | |
   | [unit](https://app.codecov.io/gh/apache/superset/pull/42400/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/42400?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org