You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "AlankritVerma01 (via GitHub)" <gi...@apache.org> on 2026/10/19 22:49:45 UTC
[PR] test(semantic-layers): update fixtures for provider execution contract [superset]
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: 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] test(semantic-layers): update fixtures for provider execution contract [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #45500:
URL: https://github.com/apache/superset/pull/45500#issuecomment-6279703656
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/45500?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 64.87%. Comparing base ([`d36febc`](https://app.codecov.io/gh/apache/superset/commit/d36febc96ec75824329fd996cc5b8ec5e9d44862?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`6660e37`](https://app.codecov.io/gh/apache/superset/commit/6660e375086b3435813595d77d3c51936f35c49b?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 1 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #45500 +/- ##
==========================================
- Coverage 65.10% 64.87% -0.24%
==========================================
Files 3050 3050
Lines 200206 200206
Branches 46682 46682
==========================================
- Hits 130335 129874 -461
- Misses 66931 67388 +457
- Partials 2940 2944 +4
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/45500/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/45500/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `34.92% <ø> (ø)` | |
| [mysql](https://app.codecov.io/gh/apache/superset/pull/45500/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/45500/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/45500/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.67% <ø> (ø)` | |
| [python](https://app.codecov.io/gh/apache/superset/pull/45500/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `52.78% <ø> (-0.41%)` | :arrow_down: |
| [sqlite](https://app.codecov.io/gh/apache/superset/pull/45500/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `52.66% <ø> (ø)` | |
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/45500?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