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

   ### SUMMARY
   
   Preserves complete semantic version history when one SQLAlchemy transaction 
flushes an entity more than once.
   
   The listener retains each entity initial database state, performs an 
explicit final flush from before_commit, and materializes one initial-to-final 
projection for the Continuum transaction. Transaction-scoped state is cleared 
only after the outermost transaction ends, so SAVEPOINT commit and rollback 
cannot discard outer history.
   
   Also scopes regression assertions to transactions created by each test.
   
   Shortcut: [sc-112938](https://app.shortcut.com/preset/story/112938)
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Not applicable; backend-only correctness fix.
   
   ### TESTING INSTRUCTIONS
   
   Run:
   
       docker compose -f docker-compose-light.yml --profile test run --rm 
pytest-runner pytest -q tests/unit_tests/versioning/test_listener.py 
tests/unit_tests/versioning/test_diff_caps.py
   
   Run integration regressions:
   
       docker compose -f docker-compose-light.yml --profile test run --rm 
pytest-runner pytest -q 
tests/integration_tests/versioning/transaction_correctness_tests.py 
tests/integration_tests/versioning/capture_disabled_tests.py 
tests/integration_tests/versioning/snapshot_projection_tests.py 
tests/integration_tests/versioning/versions_api_tests.py
   
   Observed locally: 15 unit tests and 22 integration tests passed. Focused 
pre-commit passed. The repository-wide mypy hook also reports five pre-existing 
errors in docker/pythonpath_dev/superset_config_docker.py and 
tests/unit_tests/semantic_layers/mapper_test.py; this patch adds none.
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: Shortcut sc-112938
   - [x] Required feature flags: ENTITY_VERSIONING
   - [ ] 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: [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