Skip to content

Conversation

@amoghrajesh
Copy link
Contributor

There can be a possibility that the command can be run with python3 instead of python:

{"timestamp":"2024-12-03T10:00:00Z","level":"info","event":"Running command","command":["sudo","-E","-H","-u","airflowuser","/usr/local/bin/python3","-c","from airflow.sdk.execution_time.task_runner import main; main()"],"logger":"task"}

Asserting better to avoid issues like:

____________________ test_task_run_with_user_impersonation _____________________
[gw0] linux -- Python 3.12.11 /usr/local/bin/python3
task-sdk/tests/task_sdk/execution_time/test_task_runner.py:689: in test_task_run_with_user_impersonation
    assert "python -c" in actual_cmd[5] + " " + actual_cmd[6]
E   AssertionError: assert 'python -c' in (('/usr/local/bin/python3' + ' ') + '-c')

Fixes https://github.com/apache/airflow/actions/runs/15752220682/job/44400018685


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@potiuk
Copy link
Member

potiuk commented Jun 19, 2025

This one is fixed but we have a "baseball game" another issue.

@potiuk potiuk merged commit e614be6 into apache:main Jun 19, 2025
66 of 69 checks passed
RoyLee1224 pushed a commit to RoyLee1224/airflow that referenced this pull request Jun 21, 2025
kaxil pushed a commit to astronomer/airflow that referenced this pull request Jul 2, 2025
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.

3 participants