AchimGaedkeLynker commented on code in PR #69834:
URL: https://github.com/apache/airflow/pull/69834#discussion_r3574156958
##########
providers/ssh/src/airflow/providers/ssh/utils/remote_job.py:
##########
@@ -452,27 +459,29 @@ def build_windows_kill_command(pid_file: str) -> str:
return f"powershell.exe -NoProfile -NonInteractive -EncodedCommand
{encoded_script}"
-def build_posix_cleanup_command(job_dir: str) -> str:
+def build_posix_cleanup_command(job_dir: str, expected_base: str | None =
None) -> str:
"""
Build a POSIX command to clean up the job directory.
:param job_dir: Path to the job directory
+ :param expected_base: Expected base directory for the job
:return: Shell command to remove the directory
:raises ValueError: If job_dir is not under the expected base directory
"""
- _validate_job_dir(job_dir, "posix")
+ _validate_job_dir(job_dir, "posix", expected_base)
Review Comment:
Hmm, interesting. I thought I could trust the return values of the trigger
as it comes from the validated operator argument. I probably haven't conquered
the full complexity of the deferral mechanism.
The eternal question of "how paranoid should I be" was (rightfully)
preventing me from diving into a fix/PR straight away.
--
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]