Fix SSHRemoteJobOperator custom remote_base_dir cleanup validation#69834
Fix SSHRemoteJobOperator custom remote_base_dir cleanup validation#69834axelray-dev wants to merge 4 commits into
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
|
Suggestion: Remove the |
|
Thanks for the detailed notes. I agree we should keep the cleanup validation. Once job_dir comes back from the trigger event, that prefix check is basically the only guard before rm -rf. I'll update this PR to:
|
|
@axelray-dev This PR has been converted to draft because it does not yet meet our Pull Request quality criteria. Issues found:
What to do next:
Converting a PR to draft is not a rejection — it is an invitation to bring the PR up to the project's standards so that maintainer review time is spent productively. There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the Airflow Slack. Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. |
78b532e to
b63ef25
Compare
Summary
Fixes inconsistent validation of custom
remote_base_dironSSHRemoteJobOperatorcleanup (#69813).The operator accepts a custom base directory when constructing job paths, but cleanup validation only allowed the hardcoded defaults (
/tmp/airflow-ssh-jobsand the Windows temp default). Jobs with a custom base then failed at the end withValueError: Invalid job directory ... Expected path under '/tmp/airflow-ssh-jobs'.Changes
_validate_job_dirand the cleanup command builders, defaulting to the existing platform defaults.RemoteJobPaths.base_dir/remote_base_dir) into cleanup so custom bases validate the same way as defaults.Verification
python -m pytest providers/ssh/tests/unit/ssh/utils/test_remote_job.py -qBackwards compatibility
remote_base_diris unset.Fixes #69813