Skip to content

Call sys.exit instead of builtin exit in task runner parse method in case of missing DAG or task.#55786

Merged
kaxil merged 1 commit intoapache:mainfrom
kosteev:exit_sys_exit
Sep 17, 2025
Merged

Call sys.exit instead of builtin exit in task runner parse method in case of missing DAG or task.#55786
kaxil merged 1 commit intoapache:mainfrom
kosteev:exit_sys_exit

Conversation

@kosteev
Copy link
Contributor

@kosteev kosteev commented Sep 17, 2025

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.

Thus, we use sys.exit which is intended to be used in production (versus exit which is for interactive shell). See details in the linked issue.

closes: #55783
related: #55783

…case of missing DAG or task.

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.
@kaxil kaxil added this to the Airflow 3.1.0 milestone Sep 17, 2025
@kaxil kaxil merged commit 4bce72d into apache:main Sep 17, 2025
80 checks passed
kaxil pushed a commit that referenced this pull request Sep 18, 2025
…case of missing DAG or task. (#55786)

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.

(cherry picked from commit 4bce72d)
kosteev pushed a commit to GoogleCloudPlatform/composer-airflow that referenced this pull request Sep 25, 2025
Patch builtin exit method to address issue from apache/airflow#55783.
This patch will/should be removed in the Composer Airflow versions that will contain apache/airflow#55786.

BUG=445115413

Change-Id: I1929945edb9dce81de2f512681e3a3335c9833d0
GitOrigin-RevId: 36bfe8ac983d87c12d8fb6f692a3a0ca0de7a320
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Sep 30, 2025
…case of missing DAG or task. (apache#55786)

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 1, 2025
…case of missing DAG or task. (apache#55786)

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 2, 2025
…case of missing DAG or task. (apache#55786)

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 3, 2025
…case of missing DAG or task. (apache#55786)

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 4, 2025
…case of missing DAG or task. (apache#55786)

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 5, 2025
…case of missing DAG or task. (apache#55786)

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 5, 2025
…case of missing DAG or task. (apache#55786)

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 7, 2025
…case of missing DAG or task. (apache#55786)

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 8, 2025
…case of missing DAG or task. (apache#55786)

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 9, 2025
…case of missing DAG or task. (apache#55786)

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 10, 2025
…case of missing DAG or task. (apache#55786)

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 11, 2025
…case of missing DAG or task. (apache#55786)

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 12, 2025
…case of missing DAG or task. (apache#55786)

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 14, 2025
…case of missing DAG or task. (apache#55786)

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 15, 2025
…case of missing DAG or task. (apache#55786)

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 17, 2025
…case of missing DAG or task. (apache#55786)

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.
abdulrahman305 bot pushed a commit to qenex-ai/airflow that referenced this pull request Oct 19, 2025
…case of missing DAG or task. (apache#55786)

Builtin exit method apart from raising SystemExit exception also closes stdin (supervisor socket in case of task runner), which breaks supervisor-runner communication.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bad file descriptor in task runner in case of missing DAG file

3 participants