amoghrajesh commented on code in PR #59688:
URL: https://github.com/apache/airflow/pull/59688#discussion_r2642122108
##########
task-sdk/src/airflow/sdk/log.py:
##########
@@ -37,7 +37,20 @@
from airflow.sdk.types import Logger, RuntimeTaskInstanceProtocol as
RuntimeTI
-__all__ = ["configure_logging", "reset_logging", "mask_secret"]
+def redact(
+ value: Any, name: str | None = None, max_depth: int | None = None,
replacement: str = "***"
+) -> Any:
+ """
+ Redact any secrets found in ``value`` with the given replacement.
+
+ This is a re-export from airflow.sdk._shared.secrets_masker for provider
compatibility.
+ """
+ from airflow.sdk._shared.secrets_masker import redact as _redact
+
+ return _redact(value, name, max_depth, replacement)
Review Comment:
Can we not just re-export? Why do we need the wrapper?
```
from airflow.sdk._shared.secrets_masker import redact as _redact
```
Should be enough
##########
task-sdk/src/airflow/sdk/log.py:
##########
@@ -37,7 +37,20 @@
from airflow.sdk.types import Logger, RuntimeTaskInstanceProtocol as
RuntimeTI
-__all__ = ["configure_logging", "reset_logging", "mask_secret"]
+def redact(
+ value: Any, name: str | None = None, max_depth: int | None = None,
replacement: str = "***"
+) -> Any:
+ """
+ Redact any secrets found in ``value`` with the given replacement.
+
+ This is a re-export from airflow.sdk._shared.secrets_masker for provider
compatibility.
+ """
+ from airflow.sdk._shared.secrets_masker import redact as _redact
+
+ return _redact(value, name, max_depth, replacement)
+
+
+__all__ = ["configure_logging", "reset_logging", "mask_secret", "redact"]
Review Comment:
```suggestion
```
--
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]