kaxil commented on code in PR #50880:
URL: https://github.com/apache/airflow/pull/50880#discussion_r2099958752
##########
task-sdk/src/airflow/sdk/execution_time/context.py:
##########
@@ -176,6 +176,10 @@ def _get_variable(key: str, deserialize_json: bool) -> Any:
try:
var_val = secrets_backend.get_variable(key=key) # type:
ignore[assignment]
if var_val is not None:
+ if deserialize_json:
+ import json
+
+ var_val = json.loads(var_val)
Review Comment:
We need secret masking too -- check the same implementation in
models.variable -- happy for you to do it in separate PR but let's do it for
3.0.2
https://github.com/apache/airflow/blob/13c6020278d1b4eddfcc10b4544ec2bed451a7d5/airflow-core/src/airflow/models/variable.py#L171-L175
##########
task-sdk/src/airflow/sdk/execution_time/context.py:
##########
@@ -176,6 +176,10 @@ def _get_variable(key: str, deserialize_json: bool) -> Any:
try:
var_val = secrets_backend.get_variable(key=key) # type:
ignore[assignment]
if var_val is not None:
+ if deserialize_json:
+ import json
+
+ var_val = json.loads(var_val)
Review Comment:
We need secret masking too -- check the same implementation in
models.variable -- happy for you to do it in separate PR but let's do it for
3.0.2 itself
https://github.com/apache/airflow/blob/13c6020278d1b4eddfcc10b4544ec2bed451a7d5/airflow-core/src/airflow/models/variable.py#L171-L175
--
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]