You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sadpandajoe (via GitHub)" <gi...@apache.org> on 2026/10/08 08:17:53 UTC

[PR] fix(mypy): narrow nullable uuid/perm reads in chart restore version tests [superset]

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

   ### SUMMARY
   PR #44925 (commit 0cb498d08f, "fix(versioning): refuse a chart restore whose
   datasource no longer exists") added
   tests/unit_tests/versioning/test_restore_datasource_race.py and
   test_restore_missing_datasource.py. Both files read `chart.uuid` and
   `working.perm` — nullable ORM columns per `UUIDMixin.uuid` and
   `BaseDatasource.perm` — and pass or assign them unnarrowed into
   UUID/str-typed contexts (`derive_version_uuid(entity_uuid: UUID, ...)`,
   and explicit `: UUID`/`: str` local annotations), omitting the
   `assert x is not None` idiom established since PR #42654/#44394 and
   repeated in #44424/#44648/#44789/#44610/#44944. This adds that same
   assert at each of the 10 flagged sites. No behavior changes — the
   asserts never fire, since `uuid`/`perm` are always populated after
   `session.commit()` in these tests.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   ### TESTING INSTRUCTIONS
   1. `pytest tests/unit_tests/versioning/test_restore_datasource_race.py tests/unit_tests/versioning/test_restore_missing_datasource.py` — 8 tests pass.
   2. `mypy --check-untyped-defs superset-core/src tests/unit_tests/versioning/test_restore_datasource_race.py tests/unit_tests/versioning/test_restore_missing_datasource.py` — the 10 previously-reported `arg-type`/`assignment` errors are gone.
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: Fixes #45079
   - [ ] 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
   
   🤖 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(mypy): narrow nullable uuid/perm reads in chart restore version tests [superset]

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

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/45080?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 66.30%. Comparing base ([`100f512`](https://app.codecov.io/gh/apache/superset/commit/100f51240bda67dc4536ce101c38a3ff0fcbf309?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`7bef400`](https://app.codecov.io/gh/apache/superset/commit/7bef40020e92e982ee3061e403f9d421d4ecf0e3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   > :exclamation:  There is a different number of reports uploaded between BASE (100f512) and HEAD (7bef400). Click for more details.
   > 
   > <details><summary>HEAD has 5 uploads less than BASE</summary>
   >
   >| Flag | BASE (100f512) | HEAD (7bef400) |
   >|------|------|------|
   >|python|7|3|
   >|postgres|2|1|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #45080       +/-   ##
   ===========================================
   - Coverage   82.62%   66.30%   -16.33%     
   ===========================================
     Files        3006     3006               
     Lines      187140   187140               
     Branches    43374    43374               
   ===========================================
   - Hits       154632   124078    -30554     
   - Misses      29742    60352    +30610     
   + Partials     2766     2710       -56     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/45080/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/45080/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.18% <ø> (ø)` | |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/45080/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/45080/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.10% <ø> (-0.01%)` | :arrow_down: |
   | [presto](https://app.codecov.io/gh/apache/superset/pull/45080/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.04% <ø> (ø)` | |
   | [python](https://app.codecov.io/gh/apache/superset/pull/45080/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.19% <ø> (-31.24%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/45080/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [unit](https://app.codecov.io/gh/apache/superset/pull/45080/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/45080?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


Re: [PR] fix(mypy): narrow nullable uuid/perm reads in chart restore version tests [superset]

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


-- 
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(mypy): narrow nullable uuid/perm reads in chart restore version tests [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #45080:
URL: https://github.com/apache/superset/pull/45080#issuecomment-6055828237

   ## CodeAnt PR Risk: Low Risk
   
   - The PR appears safe to merge; it adds type-narrowing assertions in tests without changing application behavior.
   
   **Assessed commit:** `7bef40020e92`


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