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/10 14:39:31 UTC

[PR] fix(tests): narrow nullable uuid before passing it to KeyValueDAO.get_entry [superset]

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

   ### SUMMARY
   test_get_entry_shared_lock, added in #45102, passes `key_value_entry.uuid` (typed `UUID | None` on the `KeyValue` model) directly to `KeyValueDAO.get_entry`, whose `key` parameter is typed `int | UUID` (no `None`) — mypy flags this under a full-repo run (`pre-commit run mypy --all-files`), since `follow_imports = "skip"` for `superset_core.*` otherwise hides the import on the changed-files-only hook. Adds the same `assert key_value_entry.uuid is not None` narrowing already used three tests earlier in `test_get_uuid_entry`.
   
   ### TESTING INSTRUCTIONS
   Run `pytest tests/unit_tests/dao/key_value_test.py -q` — all tests pass. To see the mypy failure this fixes, run `pre-commit run mypy --all-files` (or `mypy` with both `tests/unit_tests/dao/key_value_test.py` and the `superset-core` package passed on the command line) on master before this change; the error disappears after.
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: Fixes #45170
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in SIP-59)
     - [ ] 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(tests): narrow nullable uuid before passing it to KeyValueDAO.get_entry [superset]

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

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/45171?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 79.74%. Comparing base ([`b9e8188`](https://app.codecov.io/gh/apache/superset/commit/b9e8188ad606f61317403c3be5ef9450dbe0e381?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`608044c`](https://app.codecov.io/gh/apache/superset/commit/608044ce03b2eb82c6d7f0193524ca4bf95caa3f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #45171      +/-   ##
   ==========================================
   - Coverage   82.85%   79.74%   -3.12%     
   ==========================================
     Files        3017     3017              
     Lines      192923   192923              
     Branches    44976    44976              
   ==========================================
   - Hits       159841   153841    -6000     
   - Misses      30042    35856    +5814     
   - Partials     3040     3226     +186     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/45171/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/45171/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `35.30% <ø> (ø)` | |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/45171/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/45171/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/45171/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `37.13% <ø> (ø)` | |
   | [python](https://app.codecov.io/gh/apache/superset/pull/45171/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `80.72% <ø> (-5.78%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/45171/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/45171/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `80.14% <ø> (ø)` | |
   
   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/45171?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(tests): narrow nullable uuid before passing it to KeyValueDAO.get_entry [superset]

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


-- 
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(tests): narrow nullable uuid before passing it to KeyValueDAO.get_entry [superset]

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

   ## CodeAnt PR Risk: Low Risk
   
   - The PR appears safe to merge; the change is a narrow assertion in a unit test.
   
   **Assessed commit:** `608044ce03b2`


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