shantanukhond commented on code in PR #39469:
URL: https://github.com/apache/superset/pull/39469#discussion_r3610463922
##########
superset/migrations/versions/2026-06-23_03-23_a7d3f1b9c2e4_cleanup_stale_can_import_pvm.py:
##########
@@ -112,9 +112,9 @@ def downgrade() -> None:
session = Session(bind=bind)
do_downgrade(session)
try:
- session.commit()
+ session.commit() # pylint: disable=consider-using-transaction
Review Comment:
Fixed: same change applied to downgrade() -- flush only, no manual
commit/rollback, so it stays inside Alembic's transaction like upgrade().
Resolving.
##########
superset/migrations/versions/2026-06-23_03-23_a7d3f1b9c2e4_cleanup_stale_can_import_pvm.py:
##########
@@ -101,9 +101,9 @@ def upgrade() -> None:
session = Session(bind=bind)
do_upgrade(session)
try:
- session.commit()
+ session.commit() # pylint: disable=consider-using-transaction
except SQLAlchemyError as ex:
- session.rollback()
+ session.rollback() # pylint: disable=consider-using-transaction
Review Comment:
Addressed differently: rather than switching to
superset.migrations.shared.utils helpers, we removed the manual
session.commit()/rollback() entirely so the migration session stays inside
Alembic's own transaction. Resolving.
##########
superset/migrations/versions/2026-06-23_03-23_a7d3f1b9c2e4_cleanup_stale_can_import_pvm.py:
##########
@@ -112,9 +112,9 @@ def downgrade() -> None:
session = Session(bind=bind)
do_downgrade(session)
try:
- session.commit()
+ session.commit() # pylint: disable=consider-using-transaction
except SQLAlchemyError as ex:
- session.rollback()
+ session.rollback() # pylint: disable=consider-using-transaction
Review Comment:
Addressed differently, same as upgrade(): removed the manual
session.commit()/rollback() in downgrade() so it stays inside Alembic's own
transaction. Resolving.
--
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]