Wrap AIRFLOW_HOME env var lookup in Path #37733
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'