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

   ### SUMMARY
   
   #45251 (`8e6e91e4dc097046a981475f647d2871ed575bd3`) made 
`SemanticView.implementation` a read-only property and changed the provider 
factory to require keyword-only `cache_token` and `context` arguments. Several 
test fixtures still assigned the property, wrote an ineffective `__dict__` 
override, or used the old factory signature.
   
   This test-only repair updates seven test/fixture files:
   
   - Replace stale assignments with scoped property mocks, retaining grain 
ordering, dimension and compatibility assertions.
   - Ensure saved/unsaved chart mapper-refusal tests receive the intended 
provider and still require `ValidationError` without querying it.
   - Use an instance-aware dashboard override so healthy and deliberately 
ambiguous views receive different providers, preserving metadata and 
access-denied assertions.
   - Update the semantic stub's explicit typed factory signature and direct 
test calls. Verify that its context, cache token and credentials are retained 
and its execution method remains `CONNECTION`.
   
   The stub is maintained directly in the checked-in 
`tests/e2e_extensions/semantic_stub/dist/` test bundle; there is no separate 
generated source to rebuild. **Production code is unchanged.** No cases are 
removed, skipped or marked xfail, and the existing behavioral assertions are 
preserved.
   
   The same failures occur on [Apache master's Python unit 
run](https://github.com/apache/superset/actions/runs/39326027454). On 
unmodified master `d36febc96ec75824329fd996cc5b8ec5e9d44862`, the original 
cases reproduce **14 failed tests and 2 setup errors**.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Not applicable: test/fixture repair only; no UI changes.
   
   ### TESTING INSTRUCTIONS
   
   Local results:
   
   - Original 16 failing cases after repair: **16 passed**.
   - Six affected test files in one pytest invocation: **540 passed**, 
including 24 semantic-stub cases.
   - Existing host/SDK provider-contract suites: **59 passed**.
   - Staged pre-commit, including MyPy, Ruff and formatting: **passed**.
   - `git diff --check`: **passed**.
   
   The passing pytest runs have zero failures, setup errors or skips. These are 
focused local checks; the full repository suite has not been rerun, and this 
does **not** claim that full repository CI has passed.
   
   Run in the repository's configured Python test environment:
   
   ```bash
   pytest -q \
     tests/unit_tests/semantic_layers/models_test.py \
     tests/unit_tests/mcp_service/semantic_layer/tool/test_list_metrics.py \
     tests/unit_tests/datasource/test_compatible_api.py \
     tests/unit_tests/mcp_service/chart/tool/test_get_chart_data.py \
     tests/unit_tests/dashboards/datasets_test.py \
     tests/unit_tests/semantic_layers/e2e_stub_extension_test.py
   
   pytest -q \
     tests/unit_tests/semantic_layers/execution_context_test.py \
     tests/unit_tests/semantic_layers/metadata_contract_test.py \
     superset-core/tests/semantic_layers/test_execution_context.py
   ```
   
   ### ADDITIONAL INFORMATION
   
   Follow-up to #45251. No dependency manifests, CI configuration, feature 
flags or production behavior change.
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] 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
   


-- 
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