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

   ### SUMMARY
   
   **TL;DR:** Check that a semantic view is still available from its provider 
before adding it.
   
   **Background:** Add Semantic View discovers available views using the 
selected layer and runtime configuration.
   
   **Problem:** The create command checked access and duplicate names but could 
save a view that the provider no longer offered. The problem surfaced only when 
someone tried to use that saved view.
   
   **What this changes:** Repeat provider discovery using the submitted 
configuration before saving. Reject an unavailable name with a typed validation 
error, and handle discovery failures through the existing create-error path. 
Bulk requests keep their per-item results, so valid siblings can still be 
created.
   
   JSON-string configurations accepted by the command are decoded for both 
uniqueness checks and discovery. This checks discovery membership; providers 
that construct views without a live query do not gain a connectivity probe. 
Cross-API identity consolidation is outside this bounded fix.
   
   [SC-126722](https://app.shortcut.com/preset/story/126722)
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Not applicable: backend validation only.
   
   ### TESTING INSTRUCTIONS
   
   With `SEMANTIC_LAYERS` enabled and an existing provider-backed layer:
   
   1. Add a discovered view with its runtime configuration; it is created.
   2. Submit an unavailable view name to `POST /api/v1/semantic_view/`; the 
item fails with its name and no record is created (422 when no items succeed).
   3. Make provider discovery fail; the item uses the existing generic 
create-failure response and is not saved.
   
   Regression tests cover command validation, JSON-string configuration 
compatibility, HTTP 422 responses, and no DAO writes on validation/provider 
failures. The new command cases failed before the fix.
   
   Local validation: 150 focused tests passed; changed-file pre-commit hooks, 
including MyPy, passed. Full service-free unit suite at `ba248a1f90`: 27,278 
passed, 11 failed, 49 skipped, 2 xfailed.
   
   **Unexecuted/known:** Live-provider and browser checks were not run; CI 
remains pending. Three failures match the documented local ARM longdouble/PATH 
baseline. The other eight MCP dateutil/DST failures reproduced identically on 
base `0ce9b6ca46` in the same environment and were accepted as baseline for 
this branch (tracked in 
[SC-126726](https://app.shortcut.com/preset/story/126726)). No failing files 
are changed here.
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: 
[SC-126722](https://app.shortcut.com/preset/story/126722)
   - [x] Required feature flags: `SEMANTIC_LAYERS`
   - [ ] 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
   
   Implementation and local review assisted by Codex.
   
   🤖 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: [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]

Reply via email to