This is an automated email from the ASF dual-hosted git repository.

pierrejeambrun 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 0d0a62de94 Strip provider test details for mssql tests in CI (#27938)
0d0a62de94 is described below

commit 0d0a62de94668530ae64a2a183a8e88718d6069f
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sat Nov 26 13:46:30 2022 +0100

    Strip provider test details for mssql tests in CI (#27938)
    
    When we have a big number of providers changed in a PR and test
    are run in self-hosted environment, the file path generated for
    mssql data volume was too long - because it contained all
    providers that were changed. However this is not necessary because
    there is at most one Providers test type run during those tests
    and "Providers" is enough to guarantee uniqueness of the volume
    name.
    
    This PR strips provider details from the volume name.
---
 dev/breeze/src/airflow_breeze/params/shell_params.py | 4 +++-
 1 file changed, 3 insertions(+), 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 9e36e54345..9a1813e780 100644
--- a/dev/breeze/src/airflow_breeze/params/shell_params.py
+++ b/dev/breeze/src/airflow_breeze/params/shell_params.py
@@ -266,7 +266,9 @@ class ShellParams:
     @property
     def mssql_data_volume(self) -> str:
         docker_filesystem = get_filesystem_type("/var/lib/docker")
-        volume_name = f"tmp-mssql-volume-{self.test_type}" if self.test_type 
else "tmp-mssql-volume"
+        # in case of Providers[....], only leave Providers
+        base_test_type = self.test_type.split("[")[0] if self.test_type else 
None
+        volume_name = f"tmp-mssql-volume-{base_test_type}" if base_test_type 
else "tmp-mssql-volume"
         if docker_filesystem == "tmpfs":
             return os.fspath(Path.home() / MSSQL_TMP_DIR_NAME / 
f"{volume_name}-{self.mssql_version}")
         else:

Reply via email to