mikebridge opened a new pull request, #45554:
URL: https://github.com/apache/superset/pull/45554
### SUMMARY
Builds on #45553; review that first. This PR includes its commits until it
merges.
**TL;DR:** Give providers explicit credential readiness and a typed
backend-failure contract.
**Background and problem:** Semantic providers currently have to recognize
the host's secret placeholder to decide whether schema discovery is safe, and
lack an SDK error for backend execution faults. This change adds a required
`SemanticCredentialReadiness` enum to both schema hooks and a fixed-message
`SemanticBackendError`.
**What this changes:** The host derives readiness from raw configuration
before partial validation can discard unresolved fields. Preview payloads
cannot assert readiness or recover saved credentials. Transport errors are
reconstructed from validated failure/status fields and a freshly sanitized
label; subclass formatters cannot supply public text. Typed backend failures
return generic guidance without logging their causes or tracebacks. Unknown
exceptions retain their type at ERROR and full diagnostic chain at DEBUG in
server logs only.
Host and provider schema overrides must upgrade together. `UPDATING.md` and
the provider author guide describe the required arguments and error contract.
The translation template also includes two strings already introduced by the
transport prerequisite.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Not applicable: SDK and backend boundary changes only.
### TESTING INSTRUCTIONS
With the repository Python environment and local `superset-core/src` on
`PYTHONPATH`:
```bash
CI=1 PYTHONPATH=.:superset-core/src python -m pytest -q -o addopts= \
tests/unit_tests/semantic_layers superset-core/tests \
tests/unit_tests/mcp_service/test_tool_inventory.py \
tests/unit_tests/mcp_service/test_chart_tool_inventory.py \
tests/unit_tests/mcp_service/test_mcp_tool_registration.py \
tests/unit_tests/mcp_service/test_native_tool_surface.py \
tests/unit_tests/mcp_service/semantic_layer/tool/test_get_table.py
CI=1 PYTHONPATH=.:superset-core/src python -m pytest -q -o addopts= \
tests/unit_tests/commands/semantic_layer
python scripts/translations/check_pot_drift.py
```
Final candidate results: 1,958 semantic-layer tests passed at 100.00%
coverage, 635 supplemental SDK/command/network/MCP tests passed, and 13 SDK
conformance tests passed. Changed-file pre-commit (including MyPy) passed; POT
drift passed before the merge. The independent macOS export run needed a
test-only sentinel rename because the word "private" also matches
`/private/tmp` traceback paths; the author checkout passed unchanged. This test
portability follow-up remains open. Added cases cover masked nested preview
configuration, spoofed readiness, saved-runtime authority, required SDK
arguments, safe transport errors, suppressed sensitive causes, chart cache
admission, values lookup and the MCP error envelope.
No live provider or deployment validation is claimed. Provider schema
overrides must be updated together with the host.
Follow-ups: prove each provider blocks discovery for unresolved readiness;
consider rejecting literal secret placeholders during create/import; validate
status fields in the transport SDK constructor in addition to host boundary
validation. Also make malformed transport-error handling explicit at metadata
endpoints so it does not rely on the outer error wrapper and produce an extra
host-only ERROR traceback. These follow-ups are not implemented by this PR.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [x] Required feature flags: existing `SEMANTIC_LAYERS`
- [ ] Changes UI
- [ ] Includes DB Migration
- [x] Introduces new feature or API: required SDK readiness keyword and
backend error type
- [ ] Removes existing feature or API
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]