eladkal commented on code in PR #63351:
URL: https://github.com/apache/airflow/pull/63351#discussion_r2936667132
##########
airflow-core/src/airflow/models/connection.py:
##########
@@ -360,7 +360,15 @@ def get_password(self) -> str | None:
f"Can't decrypt encrypted password for login={self.login}
"
f"FERNET_KEY configuration is missing"
)
- return fernet.decrypt(bytes(self._password, "utf-8")).decode()
+ try:
+ return fernet.decrypt(bytes(self._password, "utf-8")).decode()
+ except Exception:
+ log.warning(
+ "Failed to decrypt password for connection %s. "
+ "This may happen after migrating with a different Fernet
key.",
+ self.conn_id,
+ )
+ return None
Review Comment:
Not sure if it has value.
this doesn't fix the issue only hides it.
cc @vatsrahul1001 WDYT?
--
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]