Skip to content

Wrap AIRFLOW_HOME env var lookup in Path - #37733

Merged
potiuk merged 1 commit into
apache:mainfrom
drajguru:home_dir_fix
Feb 27, 2024
Merged

Wrap AIRFLOW_HOME env var lookup in Path#37733
potiuk merged 1 commit into
apache:mainfrom
drajguru:home_dir_fix

Conversation

@drajguru

Copy link
Copy Markdown
Contributor

When testing the change with AIRFLOW_HOME env var set.
related: #37697

❯ breeze cleanup
Removing cache of parameters, and cleans up docker cache
Removing unused networks

Are you sure with the removal of unused docker networks?
Press y/N/q:
Pruning docker images

Are you sure with the removal of docker images?
Press y/N/q:
Removing build cache dir /home/dylanr/code/airflow/.build

Are you sure with the removal?
Press y/N/q:
Uninstalling airflow and removing configuration

Are you sure with the uninstall / remove?
Press y/N/q: y
Traceback (most recent call last):
File "/home/dylanr/.local/bin/breeze", line 8, in
sys.exit(main())
File "/home/dylanr/.local/share/pipx/venvs/apache-airflow-breeze/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/home/dylanr/.local/share/pipx/venvs/apache-airflow-breeze/lib/python3.10/site-packages/rich_click/rich_command.py", line 126, in main
rv = self.invoke(ctx)
File "/home/dylanr/.local/share/pipx/venvs/apache-airflow-breeze/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/dylanr/.local/share/pipx/venvs/apache-airflow-breeze/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/dylanr/.local/share/pipx/venvs/apache-airflow-breeze/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/dylanr/code/airflow/dev/breeze/src/airflow_breeze/commands/main_command.py", line 296, in cleanup
AIRFLOW_HOME_DIR.mkdir(exist_ok=True, parents=True)
AttributeError: 'str' object has no attribute 'mkdir'

@dirraodirrao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Can you look into the failing test cases?

@potiuk

Copy link
Copy Markdown
Member

I just rebased it for. You. whenever you see unrelated issues, and you are behind latest main, first thing to do is to rebase your PR.

@potiuk
potiuk merged commit c70aaa5 into apache:mainFeb 27, 2024
@drajguru
drajguru deleted the home_dir_fix branch February 29, 2024 00:52
Sign up for freeto 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

@drajguru@potiuk@dirrao