vchiapaikeo commented on code in PR #28942:
URL: https://github.com/apache/airflow/pull/28942#discussion_r1073745616
##########
airflow/providers/cncf/kubernetes/decorators/kubernetes.py:
##########
@@ -82,11 +83,42 @@ def _get_python_source(self):
res = remove_task_decorator(res, "@task.kubernetes")
return res
+ def _generate_cmds(self) -> list[str]:
+ script_filename = "/tmp/script.py"
+ input_filename = "/tmp/script.in"
+ output_filename = "/airflow/xcom/return.json"
+
+ write_local_script_file_cmd = (
+ f"{_generate_decoded_command(quote(_PYTHON_SCRIPT_ENV),
quote(script_filename))}"
+ )
+ write_local_input_file_cmd = (
+ f"{_generate_decoded_command(quote(_PYTHON_INPUT_ENV),
quote(input_filename))}"
Review Comment:
The shlex.quote here isn't really necessary anymore since they don't capture
user input but I left it in anyways. Thought that made it a bit more readable
but I can remove if you prefer.
--
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]