kutsibalci commented on issue #70875: URL: https://github.com/apache/airflow/issues/70875#issuecomment-5209107624
@1fanwang you ticked "willing to submit a PR" — are you still working on this? If so I will stay out of the way. If you would rather not, I am happy to pick it up. I checked the three files on current `main` before offering, and the asymmetry still holds: * the shim warns to use `airflow.sdk._shared.secrets_masker`, but its `__getattr__` special-cases `mask_secret` to `airflow.sdk.log`; * `airflow.sdk.log.mask_secret` calls `add_mask` **and** sends `MaskSecret` over `SUPERVISOR_COMMS`; * the `_shared` one calls `add_mask` only — `SUPERVISOR_COMMS`, `MaskSecret` and `task_runner` appear zero times in that module. So following the warning does drop supervisor-side masking. (Read from the sources rather than executed — I have not run a task under a supervisor to watch it happen, so I am reporting what the code says, not an observed leak.) One thing I would want a maintainer's view on first, since the issue offers two directions and they are not equivalent: * **Correct the message.** `__getattr__` already routes `mask_secret` to `airflow.sdk.log`, so the warning and the module docstring would name `airflow.sdk.log` for that symbol and `airflow.sdk._shared.secrets_masker` for the rest. Smallest change, and it makes the guidance match what the shim actually does. * **Drop the special case.** The message becomes true on its own, but then every caller of the shim loses supervisor masking — which is the behaviour being reported as the bug, so this looks like the wrong way round. I would go with the first unless the special case is meant to be temporary. Happy either way — I just did not want to open a PR that picks a direction on someone else's issue. -- 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]
