This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new ca97dd67d4 Skip running "fix ownership" when Breeze image pre-commits
are skipped (#35859)
ca97dd67d4 is described below
commit ca97dd67d47fea1059292647fd30df2a5f061ced
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sun Nov 26 12:41:43 2023 +0100
Skip running "fix ownership" when Breeze image pre-commits are skipped
(#35859)
When we skip breeze image pre-commits, we do not have breeze image
available, because we want to run them as fast as possible. In this
case we should not attempt to run "ownership fixing" - because:
a) it reuires the image
b) the whole point is to fix ownership of files created as side
effect of breeze-image run commands
This means that we do not need it and it slows down static checks
on PRs that do not require breeze image to be created.
---
dev/breeze/src/airflow_breeze/commands/developer_commands.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dev/breeze/src/airflow_breeze/commands/developer_commands.py
b/dev/breeze/src/airflow_breeze/commands/developer_commands.py
index 83abfb4575..5d4948dbc8 100644
--- a/dev/breeze/src/airflow_breeze/commands/developer_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/developer_commands.py
@@ -646,7 +646,8 @@ def static_checks(
text=True,
env=env,
)
- fix_ownership_using_docker()
+ if not os.environ.get("SKIP_IMAGE_PRE_COMMITS"):
+ fix_ownership_using_docker()
if static_checks_result.returncode != 0:
if os.environ.get("CI"):
get_console().print("\n[error]This error means that you have to
fix the issues listed above:[/]")