You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2023/06/16 15:23:58 UTC
[GitHub] [airflow] potiuk commented on issue #31873: KubernetesPodOperator doesn't mask variables in Rendered Template that are used as arguments
potiuk commented on issue #31873:
URL: https://github.com/apache/airflow/issues/31873#issuecomment-1594867356
> Hi @phanikumv , thank you for your comment.
>
> I tried to implement the use of masking the secret on DAG level, but that still doesn't work:
>
> ```
> @task
> def hide_git_token():
> from airflow.utils.log.secrets_masker import mask_secret
> mask_secret('{{ var.json.faros_api_key.faros_git_token }}')
> ```
I think this won't work. The parameter passed inside the method is NOT going to be processed by JINJA - you need to read it from Variable with `Variable.get()` here instead.
Can you try it again ?
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org