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