vchiapaikeo commented on code in PR #28942:
URL: https://github.com/apache/airflow/pull/28942#discussion_r1071045620


##########
airflow/providers/cncf/kubernetes/decorators/kubernetes.py:
##########
@@ -82,15 +84,35 @@ def _get_python_source(self):
         res = remove_task_decorator(res, "@task.kubernetes")
         return res
 
+    def _generate_cmds(self):
+        return [
+            "bash",
+            "-cx",
+            (
+                f"{_generate_decoded_command('%s', '%s')} && " % 
(_PYTHON_SCRIPT_ENV, _FILENAME_IN_CONTAINER)

Review Comment:
   Hi @uranusjr , are you referring to passing in variables like 
_PYTHON_SCRIPT_ENV,  _PYTHON_INPUT_ENV, INPUT_FILENAME_IN_CONTAINER? This was 
done to stay dry since these values are reused in the env vars below.
   
   If you’re suggesting we don’t use env vars and instead pass in the 
b64encoded values themselves to the commands, I didn’t think about that because 
of how the code was originally laid out. But I do agree that removing the env 
vars would simplify the logic and remove the need to instantiate extra env vars 
for the container. I can give that a shot if that’s what you’re referring to.



-- 
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]

Reply via email to