sadpandajoe opened a new issue, #44788:
URL: https://github.com/apache/superset/issues/44788

   **Problem**
   
   `tests/unit_tests/versioning/test_runtime_capture.py` and 
`tests/unit_tests/versioning/test_capture_gap_restore.py` fail nightly 
full-repo mypy on master. First failing run: 
https://github.com/apache/superset/actions/runs/36530938046/job/109284247292 
("pre-commit (next)", commit ca3d3560895c).
   
   **Root cause**
   
   `UUIDMixin.uuid` (`superset/models/helpers.py:740-742`) is a nullable 
column, so mypy infers `SqlaTable.uuid` / `Dashboard.uuid` as `UUID | None`. 
`BaseRestoreVersionCommand.__init__` 
(`superset/commands/version_restore.py:78`) requires a non-optional `UUID`. PR 
#44514 added the two test files and passed `.uuid` straight into 
`RestoreDatasetVersionCommand`/`RestoreDashboardVersionCommand` without 
narrowing (e.g. `test_runtime_capture.py:229`, 
`test_capture_gap_restore.py:186,236,257,306,311,416,488,608,609,720,753,786`), 
and `test_runtime_capture.py:253` assigns the nullable value into a `: 
UUID`-annotated variable, which fails at the assignment itself.
   
   **Steps to reproduce**
   
   ```
   pre-commit run mypy --files 
tests/unit_tests/versioning/test_runtime_capture.py 
tests/unit_tests/versioning/test_capture_gap_restore.py
   ```
   run against a commit on master before the fix, or open the mypy step output 
in the job log linked above.
   
   (Found via automated investigation — [Agor](https://agor.live/).)


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