hussein-awala commented on code in PR #38743:
URL: https://github.com/apache/airflow/pull/38743#discussion_r1551525434
##########
airflow/utils/db.py:
##########
@@ -993,7 +993,7 @@ def decrypt_trigger_kwargs(*, session: Session) -> None:
# this can happen when we downgrade to an old version before the
Trigger table was added
return
- for trigger in session.query(Trigger):
+ for trigger in session.scalars(select(Trigger.encrypted_kwargs)):
Review Comment:
This is just an improvement or it's a bug fix too?
##########
airflow/utils/db.py:
##########
@@ -1744,12 +1744,12 @@ def downgrade(*, to_revision, from_revision=None,
show_sql_only=False, session:
else:
log.info("Applying downgrade migrations.")
command.downgrade(config, revision=to_revision, sql=show_sql_only)
- if _revision_greater(
- config,
- _REVISION_HEADS_MAP["2.9.0"],
- to_revision,
- ):
- decrypt_trigger_kwargs(session=session)
+ if _revision_greater(
+ config,
+ _REVISION_HEADS_MAP["2.9.0"],
+ to_revision,
+ ):
+ decrypt_trigger_kwargs(session=session)
Review Comment:
👍 we don't need it in for show only
--
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]