Skip to content

Fix broken main with static checks#43287

Merged
kaxil merged 1 commit intoapache:mainfrom
astronomer:fix-main-static
Oct 23, 2024
Merged

Fix broken main with static checks#43287
kaxil merged 1 commit intoapache:mainfrom
astronomer:fix-main-static

Conversation

@kaxil
Copy link
Member

@kaxil kaxil commented Oct 23, 2024

#43281 changed the python exec path and is now failing with:

Traceback (most recent call last):
  File "/home/runner/work/airflow/airflow/./scripts/tools/check_if_limited_dependencies.py", line 46, in <module>
    check_call([sys.executable[0], DEV_BREEZE_SRC_PATH / "airflow_breeze" / "breeze.py", "--help"], env=env)
  File "/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/subprocess.py", line 368, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/subprocess.py", line 349, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/opt/hostedtoolcache/Python/3.9.20/x64/lib/python3.9/subprocess.py", line 1837, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/'

That is because:

ipython
Python 3.11.10 (main, Sep  9 2024, 20:58:40) [Clang 18.1.8 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.18.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import sys

In [2]: sys.executable[0]
Out[2]: '/'

In [3]: sys.executable[1]
Out[3]: 'U'

In [4]: sys.executable
Out[4]: '/Users/kaxilnaik/Documents/GitHub/astronomer/airflow/.venv/bin/python3'

Example Failure:
https://github.com/apache/airflow/actions/runs/11470387014/job/31919681910?pr=43286


^ 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 newsfragments.

Change in apache#43281 change the python exec path.

```
❯ ipython
Python 3.11.10 (main, Sep  9 2024, 20:58:40) [Clang 18.1.8 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.18.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import sys

In [2]: sys.executable[0]
Out[2]: '/'

In [3]: sys.executable[1]
Out[3]: 'U'

In [4]: sys.executable
Out[4]: '/Users/kaxilnaik/Documents/GitHub/astronomer/airflow/.venv/bin/python3'
```

Example Failure:
https://github.com/apache/airflow/actions/runs/11470387014/job/31919681910?pr=43286
@kaxil kaxil requested review from Lee-W and jscheffl October 23, 2024 00:24
@kaxil kaxil requested review from ashb and potiuk as code owners October 23, 2024 00:24
@kaxil kaxil requested a review from amoghrajesh October 23, 2024 00:35
@kaxil kaxil merged commit e778f03 into apache:main Oct 23, 2024
@kaxil kaxil deleted the fix-main-static branch October 23, 2024 00:39
@potiuk
Copy link
Member

potiuk commented Oct 23, 2024

Where did I get the [0] from? I have no idea. Sorry for that ...

Copy link
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

harjeevanmaan pushed a commit to harjeevanmaan/airflow that referenced this pull request Oct 23, 2024
Change in apache#43281 change the python exec path.

```
❯ ipython
Python 3.11.10 (main, Sep  9 2024, 20:58:40) [Clang 18.1.8 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.18.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import sys

In [2]: sys.executable[0]
Out[2]: '/'

In [3]: sys.executable[1]
Out[3]: 'U'

In [4]: sys.executable
Out[4]: '/Users/kaxilnaik/Documents/GitHub/astronomer/airflow/.venv/bin/python3'
```

Example Failure:
https://github.com/apache/airflow/actions/runs/11470387014/job/31919681910?pr=43286
PaulKobow7536 pushed a commit to PaulKobow7536/airflow that referenced this pull request Oct 24, 2024
Change in apache#43281 change the python exec path.

```
❯ ipython
Python 3.11.10 (main, Sep  9 2024, 20:58:40) [Clang 18.1.8 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.18.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import sys

In [2]: sys.executable[0]
Out[2]: '/'

In [3]: sys.executable[1]
Out[3]: 'U'

In [4]: sys.executable
Out[4]: '/Users/kaxilnaik/Documents/GitHub/astronomer/airflow/.venv/bin/python3'
```

Example Failure:
https://github.com/apache/airflow/actions/runs/11470387014/job/31919681910?pr=43286
ellisms pushed a commit to ellisms/airflow that referenced this pull request Nov 13, 2024
Change in apache#43281 change the python exec path.

```
❯ ipython
Python 3.11.10 (main, Sep  9 2024, 20:58:40) [Clang 18.1.8 ]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.18.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import sys

In [2]: sys.executable[0]
Out[2]: '/'

In [3]: sys.executable[1]
Out[3]: 'U'

In [4]: sys.executable
Out[4]: '/Users/kaxilnaik/Documents/GitHub/astronomer/airflow/.venv/bin/python3'
```

Example Failure:
https://github.com/apache/airflow/actions/runs/11470387014/job/31919681910?pr=43286
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.

4 participants