This is an automated email from the ASF dual-hosted git repository. potiuk pushed a commit to branch v2-8-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 1d6f1d40b2023afcef79bfe9ae2fca5788579a71 Author: Jarek Potiuk <[email protected]> AuthorDate: Tue Nov 28 14:02:38 2023 +0100 Skip port forwarding also for base ports when running pre-commits (#35922) When pre-commits are run and breeze shell is opened they were both attempting to use the same port forwarding. However pre-commits do not ever need port forwarding because the forwarded ports are only needed when you run breeze shell interactively. This is a follow-up afte #35862. This PR removes port forwarding when "pre-commit" project name is used to run breeze shell command. (cherry picked from commit ad04d2af9e5c645a50242fd9bf43b9468bbb1d4e) --- dev/breeze/src/airflow_breeze/params/shell_params.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/breeze/src/airflow_breeze/params/shell_params.py b/dev/breeze/src/airflow_breeze/params/shell_params.py index 2ed8215f91..abfe2c4ddd 100644 --- a/dev/breeze/src/airflow_breeze/params/shell_params.py +++ b/dev/breeze/src/airflow_breeze/params/shell_params.py @@ -315,7 +315,7 @@ class ShellParams: f"from sources but from {self.use_airflow_version}[/]" ) self.mount_sources = MOUNT_REMOVE - if self.forward_ports: + if self.forward_ports and not self.project_name == "pre-commit": compose_file_list.append(DOCKER_COMPOSE_DIR / "base-ports.yml") if self.mount_sources == MOUNT_SELECTED: compose_file_list.append(DOCKER_COMPOSE_DIR / "local.yml")
