ashb commented on code in PR #43040:
URL: https://github.com/apache/airflow/pull/43040#discussion_r1804279042
##########
airflow/settings.py:
##########
@@ -722,6 +722,22 @@ def import_local_settings():
log.info("Loaded airflow_local_settings from %s .",
airflow_local_settings.__file__)
+def mask_conf_values():
+ from airflow.utils.log.secrets_masker import mask_secret
+
+ for section, key in conf.sensitive_config_values:
+ try:
+ value = conf.get(section, key)
+ except AirflowConfigException:
+ log.warning(
+ "Could not retrieve value from section %s, for key %s.
Skipping redaction of this conf.",
+ section,
+ key,
+ )
+ continue
+ mask_secret(value)
Review Comment:
This feels like it should be method on Configuration, not a few method in
settings module.
Could you move it and the tests please?
(Calling conf.mask_secrets from withing settings is still okay I think)
--
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]