You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/09/22 22:27:50 UTC

[GitHub] [airflow] potiuk opened a new pull request, #26612: Switch tests in ci to use Python Breeze

potiuk opened a new pull request, #26612:
URL: https://github.com/apache/airflow/pull/26612

   This is the last big change in "Rewrite Breeze to Python".
   
   Fixes: #23538
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   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](https://github.com/apache/airflow/tree/main/newsfragments).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on a diff in pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #26612:
URL: https://github.com/apache/airflow/pull/26612#discussion_r985017217


##########
dev/breeze/src/airflow_breeze/commands/ci_commands.py:
##########
@@ -92,6 +92,11 @@ def free_space(verbose: bool, dry_run: bool, answer: str):
         )
         run_command(["df", "-h"], verbose=verbose, dry_run=dry_run)
         run_command(["docker", "logout", "ghcr.io"], verbose=verbose, dry_run=dry_run, check=False)
+        run_command(
+            ["sudo", "rm", "-f", os.fspath(Path.home() / MSSQL_TMP_DIR_NAME)],
+            verbose=verbose,

Review Comment:
   We cleanup MSQL  local folder that is used on Self-Hosted runner here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Bowrna commented on a diff in pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
Bowrna commented on code in PR #26612:
URL: https://github.com/apache/airflow/pull/26612#discussion_r984188865


##########
scripts/ci/docker-compose/base-ports.yml:
##########
@@ -16,3 +16,9 @@
 # under the License.
 ---
 version: "3.7"
+services:

Review Comment:
   Oh, how did that issue got resolved @potiuk ? Can you explain me? I couldn't understand how it was fixed by checking the code.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #26612:
URL: https://github.com/apache/airflow/pull/26612#issuecomment-1255704532

   Last "BIG" change to get breeze replaced completely wiht Python !


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] ashb commented on a diff in pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
ashb commented on code in PR #26612:
URL: https://github.com/apache/airflow/pull/26612#discussion_r985790486


##########
dev/breeze/src/airflow_breeze/params/shell_params.py:
##########
@@ -221,30 +232,42 @@ def compose_files(self):
                 f"from sources but from {self.use_airflow_version}[/]"
             )
             self.mount_sources = MOUNT_REMOVE
+        if self.forward_ports:
+            compose_file_list.append(DOCKER_COMPOSE_DIR / "base-ports.yml")
         if self.mount_sources == MOUNT_SELECTED:
-            compose_ci_file.extend([local_docker_compose_file])
+            compose_file_list.append(DOCKER_COMPOSE_DIR / "local.yml")
         elif self.mount_sources == MOUNT_ALL:
-            compose_ci_file.extend([local_all_sources_docker_compose_file])
+            compose_file_list.append(DOCKER_COMPOSE_DIR / "local-all-sources.yml")
         elif self.mount_sources == MOUNT_REMOVE:
-            compose_ci_file.extend([remove_sources_docker_compose_file])
+            compose_file_list.append(DOCKER_COMPOSE_DIR / "remove-sources.yml")
         if self.forward_credentials:
-            compose_ci_file.append(forward_credentials_docker_compose_file)
+            compose_file_list.append(DOCKER_COMPOSE_DIR / "forward-credentials.yml")
         if self.use_airflow_version is not None:
-            compose_ci_file.append(remove_sources_docker_compose_file)
+            compose_file_list.append(DOCKER_COMPOSE_DIR / "remove-sources.yml")
         if self.include_mypy_volume:
-            compose_ci_file.append(mypy_docker_compose_file)
+            compose_file_list.append(DOCKER_COMPOSE_DIR / "mypy.yml")
         if "all" in self.integration:
             integrations = AVAILABLE_INTEGRATIONS
         else:
             integrations = self.integration
         if len(integrations) > 0:
             for integration in integrations:
-                compose_ci_file.append(f"{str(SCRIPTS_CI_DIR)}/docker-compose/integration-{integration}.yml")
-        return os.pathsep.join(compose_ci_file)
+                compose_file_list.append(DOCKER_COMPOSE_DIR / f"integration-{integration}.yml")
+        return os.pathsep.join([os.fspath(f) for f in compose_file_list])
 
     @property
     def command_passed(self):
         cmd = None
         if len(self.extra_args) > 0:
             cmd = str(self.extra_args[0])
         return cmd
+
+    @property
+    def mssql_data_volume(self) -> str:
+        docker_filesystem = get_filesystem_type("/var/lib/docker")

Review Comment:
   This is run from the host isn't it? If so this call might not get the right info in cases of Docker Desktop etc. Does that matter?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #26612:
URL: https://github.com/apache/airflow/pull/26612#issuecomment-1264177217

   Looking for approval :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on a diff in pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #26612:
URL: https://github.com/apache/airflow/pull/26612#discussion_r982271012


##########
dev/breeze/src/airflow_breeze/params/shell_params.py:
##########
@@ -173,15 +174,18 @@ def print_badge_info(self):
             get_console().print(f'[info]Backend: {self.backend} {self.backend_version}[/]')
             get_console().print(f'[info]Airflow used at runtime: {self.use_airflow_version}[/]')
 
-    def get_backend_compose_files(self, backend: str):
+    def get_backend_compose_files(self, backend: str) -> list[str]:
         backend_docker_compose_file = f"{str(SCRIPTS_CI_DIR)}/docker-compose/backend-{backend}.yml"
         backend_port_docker_compose_file = f"{str(SCRIPTS_CI_DIR)}/docker-compose/backend-{backend}-port.yml"
-        return backend_docker_compose_file, backend_port_docker_compose_file
+        if backend == 'sqlite' or not self.forward_ports:

Review Comment:
   Not needed any more :). Tests are run without Port forwarding.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on a diff in pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #26612:
URL: https://github.com/apache/airflow/pull/26612#discussion_r985017104


##########
CI.rst:
##########
@@ -529,65 +404,60 @@ For more information, see:
 
 Website endpoint: http://apache-airflow-docs.s3-website.eu-central-1.amazonaws.com/
 
-Naming conventions for stored images
-====================================
 
-The images produced during the ``Build Images`` workflow of CI jobs are stored in the
-`GitHub Container Registry <https://github.com/orgs/apache/packages?repo_name=airflow>`_
+Debugging CI Jobs in Github Actions

Review Comment:
   Added chapter on how to debug CI jobs - all the possibilities of how you can test different parts are now nicely separated out.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on a diff in pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #26612:
URL: https://github.com/apache/airflow/pull/26612#discussion_r982271333


##########
scripts/ci/docker-compose/base-ports.yml:
##########
@@ -16,3 +16,9 @@
 # under the License.
 ---
 version: "3.7"
+services:

Review Comment:
   Not needed any more :). Tests are run without Port forwarding.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #26612:
URL: https://github.com/apache/airflow/pull/26612#issuecomment-1259281342

   I am just about to complete last problem solving but I think I am very close to have a mergable version (and I would love to complete that before the Apache Con starts so that I can observe and fix any problems if we find them before my vacations after the ApacheCon.
   
   Some cool preview of what you see when "debug ci resources" label is set:
   
   ![image](https://user-images.githubusercontent.com/595491/192498290-6dcc65db-ef42-4a0a-8120-cd88deaefd32.png)
   
   
   looking forward to reviews :)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #26612:
URL: https://github.com/apache/airflow/pull/26612#issuecomment-1255622576

   cc: @Bowrna - not tested yet, but roughly complete.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on a diff in pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #26612:
URL: https://github.com/apache/airflow/pull/26612#discussion_r985874938


##########
dev/breeze/src/airflow_breeze/params/shell_params.py:
##########
@@ -221,30 +232,42 @@ def compose_files(self):
                 f"from sources but from {self.use_airflow_version}[/]"
             )
             self.mount_sources = MOUNT_REMOVE
+        if self.forward_ports:
+            compose_file_list.append(DOCKER_COMPOSE_DIR / "base-ports.yml")
         if self.mount_sources == MOUNT_SELECTED:
-            compose_ci_file.extend([local_docker_compose_file])
+            compose_file_list.append(DOCKER_COMPOSE_DIR / "local.yml")
         elif self.mount_sources == MOUNT_ALL:
-            compose_ci_file.extend([local_all_sources_docker_compose_file])
+            compose_file_list.append(DOCKER_COMPOSE_DIR / "local-all-sources.yml")
         elif self.mount_sources == MOUNT_REMOVE:
-            compose_ci_file.extend([remove_sources_docker_compose_file])
+            compose_file_list.append(DOCKER_COMPOSE_DIR / "remove-sources.yml")
         if self.forward_credentials:
-            compose_ci_file.append(forward_credentials_docker_compose_file)
+            compose_file_list.append(DOCKER_COMPOSE_DIR / "forward-credentials.yml")
         if self.use_airflow_version is not None:
-            compose_ci_file.append(remove_sources_docker_compose_file)
+            compose_file_list.append(DOCKER_COMPOSE_DIR / "remove-sources.yml")
         if self.include_mypy_volume:
-            compose_ci_file.append(mypy_docker_compose_file)
+            compose_file_list.append(DOCKER_COMPOSE_DIR / "mypy.yml")
         if "all" in self.integration:
             integrations = AVAILABLE_INTEGRATIONS
         else:
             integrations = self.integration
         if len(integrations) > 0:
             for integration in integrations:
-                compose_ci_file.append(f"{str(SCRIPTS_CI_DIR)}/docker-compose/integration-{integration}.yml")
-        return os.pathsep.join(compose_ci_file)
+                compose_file_list.append(DOCKER_COMPOSE_DIR / f"integration-{integration}.yml")
+        return os.pathsep.join([os.fspath(f) for f in compose_file_list])
 
     @property
     def command_passed(self):
         cmd = None
         if len(self.extra_args) > 0:
             cmd = str(self.extra_args[0])
         return cmd
+
+    @property
+    def mssql_data_volume(self) -> str:
+        docker_filesystem = get_filesystem_type("/var/lib/docker")

Review Comment:
   It's actually only really used when you have tmpfs in '/var/lib/docker' (which is the case of self-hosted runners). We could likely do a better job in finding the right folder, but I think it is 'good enough' to handle the nasal on tmpfs case 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #26612:
URL: https://github.com/apache/airflow/pull/26612#issuecomment-1255918594

   Did I mention -800 lines of bash code ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #26612:
URL: https://github.com/apache/airflow/pull/26612#issuecomment-1263076046

   Looking forward to reviews :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #26612:
URL: https://github.com/apache/airflow/pull/26612#issuecomment-1264177408

   Very thoroughly tested for Public/Self-hosted runners.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on a diff in pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #26612:
URL: https://github.com/apache/airflow/pull/26612#discussion_r984677270


##########
scripts/ci/docker-compose/base-ports.yml:
##########
@@ -16,3 +16,9 @@
 # under the License.
 ---
 version: "3.7"
+services:

Review Comment:
   it's in:
   
   ```
       def get_backend_compose_files(self, backend: str) -> list[Path]:
           backend_docker_compose_file = DOCKER_COMPOSE_DIR / f"backend-{backend}.yml"
           if backend == 'sqlite' or not self.forward_ports:
               return [backend_docker_compose_file]
           return [backend_docker_compose_file, DOCKER_COMPOSE_DIR / f"backend-{backend}-port.yml"]
   ```
   
   When I run tests, ShellParams has "forward_ports" set to False - this way when set of docker-compose files are determined to be used, the `*-port.yml` files are not used.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Bowrna commented on a diff in pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
Bowrna commented on code in PR #26612:
URL: https://github.com/apache/airflow/pull/26612#discussion_r982262320


##########
scripts/ci/docker-compose/base-ports.yml:
##########
@@ -16,3 +16,9 @@
 # under the License.
 ---
 version: "3.7"
+services:

Review Comment:
   I could see you are separating out the port, but how actually unique port values will be set for  `SSH_PORT, WEBSERVER_HOST_PORT, FLOWER_HOST_PORT` etc in case of parallel tests



##########
scripts/ci/docker-compose/base-ports.yml:
##########
@@ -16,3 +16,9 @@
 # under the License.
 ---
 version: "3.7"
+services:

Review Comment:
   @potiuk  I could see you are separating out the port, but how actually unique port values will be set for  `SSH_PORT, WEBSERVER_HOST_PORT, FLOWER_HOST_PORT` etc in case of parallel tests



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #26612:
URL: https://github.com/apache/airflow/pull/26612#issuecomment-1265574884

   > LGTM - just one small question about mssql tmpfs volume.
   
   Thanks! It looks big but it is not as huge as the numbers on the PR says :).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk merged pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk merged PR #26612:
URL: https://github.com/apache/airflow/pull/26612


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on a diff in pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #26612:
URL: https://github.com/apache/airflow/pull/26612#discussion_r978372967


##########
dev/breeze/src/airflow_breeze/params/shell_params.py:
##########
@@ -173,15 +174,18 @@ def print_badge_info(self):
             get_console().print(f'[info]Backend: {self.backend} {self.backend_version}[/]')
             get_console().print(f'[info]Airflow used at runtime: {self.use_airflow_version}[/]')
 
-    def get_backend_compose_files(self, backend: str):
+    def get_backend_compose_files(self, backend: str) -> list[str]:
         backend_docker_compose_file = f"{str(SCRIPTS_CI_DIR)}/docker-compose/backend-{backend}.yml"
         backend_port_docker_compose_file = f"{str(SCRIPTS_CI_DIR)}/docker-compose/backend-{backend}-port.yml"
-        return backend_docker_compose_file, backend_port_docker_compose_file
+        if backend == 'sqlite' or not self.forward_ports:

Review Comment:
   That's why I told it was a bit `tricky` to pull off



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on a diff in pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #26612:
URL: https://github.com/apache/airflow/pull/26612#discussion_r978368544


##########
scripts/ci/docker-compose/base-ports.yml:
##########
@@ -16,3 +16,9 @@
 # under the License.
 ---
 version: "3.7"
+services:

Review Comment:
   This is how I implemented ports @Bowrna - I had to separate "ports" to a separate compose file and not use this compose file when running tests.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #26612:
URL: https://github.com/apache/airflow/pull/26612#issuecomment-1255917605

   Two example screenshot of showing progress of parallel tests run (much nicer and more informative now):
   
   
   ![Screenshot from 2022-09-23 10-09-38](https://user-images.githubusercontent.com/595491/191918127-3f8db548-1d8f-4e97-8f78-eaf866498577.png)
   
   ![Screenshot from 2022-09-23 10-10-11](https://user-images.githubusercontent.com/595491/191918125-feff07e4-4f8e-4cc8-beea-5f9087d1ba13.png)
   
   I want to run a few more tests with public runners and such, but it should be ready to review/merge
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on a diff in pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #26612:
URL: https://github.com/apache/airflow/pull/26612#discussion_r978372140


##########
dev/breeze/src/airflow_breeze/params/shell_params.py:
##########
@@ -173,15 +174,18 @@ def print_badge_info(self):
             get_console().print(f'[info]Backend: {self.backend} {self.backend_version}[/]')
             get_console().print(f'[info]Airflow used at runtime: {self.use_airflow_version}[/]')
 
-    def get_backend_compose_files(self, backend: str):
+    def get_backend_compose_files(self, backend: str) -> list[str]:
         backend_docker_compose_file = f"{str(SCRIPTS_CI_DIR)}/docker-compose/backend-{backend}.yml"
         backend_port_docker_compose_file = f"{str(SCRIPTS_CI_DIR)}/docker-compose/backend-{backend}-port.yml"
-        return backend_docker_compose_file, backend_port_docker_compose_file
+        if backend == 'sqlite' or not self.forward_ports:

Review Comment:
   Here (and few lines below) @bowrna I check if "sefl.forward_ports" is set to True - and only there I also include `-port.yml` files. Effectively all the `docker-compose` used by parallel tests do not forward the ports from host so the prblem with busy port is gone.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] Bowrna commented on a diff in pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
Bowrna commented on code in PR #26612:
URL: https://github.com/apache/airflow/pull/26612#discussion_r982260985


##########
dev/breeze/src/airflow_breeze/params/shell_params.py:
##########
@@ -173,15 +174,18 @@ def print_badge_info(self):
             get_console().print(f'[info]Backend: {self.backend} {self.backend_version}[/]')
             get_console().print(f'[info]Airflow used at runtime: {self.use_airflow_version}[/]')
 
-    def get_backend_compose_files(self, backend: str):
+    def get_backend_compose_files(self, backend: str) -> list[str]:
         backend_docker_compose_file = f"{str(SCRIPTS_CI_DIR)}/docker-compose/backend-{backend}.yml"
         backend_port_docker_compose_file = f"{str(SCRIPTS_CI_DIR)}/docker-compose/backend-{backend}-port.yml"
-        return backend_docker_compose_file, backend_port_docker_compose_file
+        if backend == 'sqlite' or not self.forward_ports:

Review Comment:
   I see. How do you set the port to use in case of parallel tests then @potiuk ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on a diff in pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #26612:
URL: https://github.com/apache/airflow/pull/26612#discussion_r985017296


##########
dev/breeze/src/airflow_breeze/commands/ci_commands.py:
##########
@@ -111,7 +116,7 @@ def resource_check(verbose: bool, dry_run: bool):
     HOME_DIR / ".azure",
     HOME_DIR / ".config/gcloud",
     HOME_DIR / ".docker",
-    AIRFLOW_SOURCES_ROOT,
+    HOME_DIR / MSSQL_TMP_DIR_NAME,

Review Comment:
   AIRFLOW_SOURCES_ROOT was duplicated.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on a diff in pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on code in PR #26612:
URL: https://github.com/apache/airflow/pull/26612#discussion_r985017512


##########
dev/breeze/src/airflow_breeze/commands/kubernetes_commands.py:
##########
@@ -147,8 +148,7 @@ def kubernetes_group():
 K8S_CONFIGURE_CLUSTER_PROGRESS_REGEXP = r'.*airflow-python-[0-9.]+-v[0-9.].*'
 K8S_DEPLOY_PROGRESS_REGEXP = r'.*airflow-python-[0-9.]+-v[0-9.].*'
 K8S_TEST_PROGRESS_REGEXP = r'.*airflow-python-[0-9.]+-v[0-9.].*|^kubernetes_tests/.*'
-PERCENT_K8S_TEST_PROGRESS_REGEXP = r'^kubernetes_tests/.*\[[ \d*%]*\].*'
-K8S_SKIP_TRUNCATION_REGEXP = r'^kubernetes_tests/.*'

Review Comment:
   I found better ways to truncate the output (I simply check the length of the output after stripping or ANSI Colours (standard textwrap does not truncate ANSI colors and treats ANSI colors as characters)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #26612:
URL: https://github.com/apache/airflow/pull/26612#issuecomment-1263073837

   All right got it green and even optimized the tests enough to run Integration/Providers tests for MySQL/MsSQL. It is ready to a review/merge now. 
   
   The successful public runners build here: https://github.com/apache/airflow/actions/runs/3155819683 . Now pushing self-hosted buid too. without resource monitoring.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk commented on pull request #26612: Switch tests in ci to use Python Breeze

Posted by GitBox <gi...@apache.org>.
potiuk commented on PR #26612:
URL: https://github.com/apache/airflow/pull/26612#issuecomment-1265387761

   Re-running it one more time without resource debugging to see that the output is right.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org