From 5927fbcedb220345e78ea2903723e7fc844ab9f7 Mon Sep 17 00:00:00 2001
From: Jarek Potiuk <jarek@potiuk.com>
Date: Fri, 20 Oct 2023 00:59:12 +0200
Subject: [PATCH] Use arguments inestead of --package-filter option for build
 docs in CI

Fixes: #34086
---
 .github/workflows/ci.yml                      |   7 +-
 dev/breeze/SELECTIVE_CHECKS.md                |  96 ++++++------
 .../airflow_breeze/utils/selective_checks.py  |  10 +-
 dev/breeze/tests/test_selective_checks.py     | 143 +++++-------------
 4 files changed, 95 insertions(+), 161 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4ca12c516d0d6..b56b096249533 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -110,7 +110,7 @@ jobs:
       needs-api-codegen: ${{ steps.selective-checks.outputs.needs-api-codegen }}
       default-branch: ${{ steps.selective-checks.outputs.default-branch }}
       default-constraints-branch: ${{ steps.selective-checks.outputs.default-constraints-branch }}
-      docs-filter-list-as-string: ${{ steps.selective-checks.outputs.docs-filter-list-as-string }}
+      docs-list-as-string: ${{ steps.selective-checks.outputs.docs-list-as-string }}
       skip-pre-commits: ${{ steps.selective-checks.outputs.skip-pre-commits }}
       helm-test-packages: ${{ steps.selective-checks.outputs.helm-test-packages }}
       debug-resources: ${{ steps.selective-checks.outputs.debug-resources }}
@@ -694,8 +694,7 @@ jobs:
             docs-inventory-
       - name: "Build docs"
         run: >
-          breeze build-docs
-          ${{ needs.build-info.outputs.docs-filter-list-as-string }}
+          breeze build-docs ${{ needs.build-info.outputs.docs-list-as-string }}
       - name: "Clone airflow-site"
         run: >
           git clone https://github.com/apache/airflow-site.git ${GITHUB_WORKSPACE}/airflow-site &&
@@ -704,7 +703,7 @@ jobs:
         run: >
           breeze release-management publish-docs
           --override-versioned --run-in-parallel
-          ${{ needs.build-info.outputs.docs-filter-list-as-string }}
+          ${{ needs.build-info.outputs.docs-list-as-string }}
       - name: "Generate back references for providers"
         run: breeze release-management add-back-references all-providers
       - name: "Generate back references for apache-airflow"
diff --git a/dev/breeze/SELECTIVE_CHECKS.md b/dev/breeze/SELECTIVE_CHECKS.md
index 0806466a81c7a..66b760e6d16dc 100644
--- a/dev/breeze/SELECTIVE_CHECKS.md
+++ b/dev/breeze/SELECTIVE_CHECKS.md
@@ -105,7 +105,7 @@ The logic implements the following rules:
 * if `Image building` is disabled, only basic pre-commits are enabled - no 'image-depending` pre-commits
   are enabled.
 * If there are some setup files changed, `upgrade to newer dependencies` is enabled.
-* If docs are build, the `docs-filter-list-as-string` will determine which docs packages to build. This is based on
+* If docs are build, the `docs-list-as-string` will determine which docs packages to build. This is based on
   several criteria: if any of the airflow core, charts, docker-stack, providers files or docs have changed,
   then corresponding packages are build (including cross-dependent providers). If any of the core files
   changed, also providers docs are built because all providers depend on airflow docs. If any of the docs
@@ -121,50 +121,50 @@ empty string means `everything`, where lack of the output means `nothing` and li
 separated by spaces. This is to accommodate for the wau how outputs of this kind can be easily used by
 Github Actions to pass the list of parameters to a command to execute
 
-| Output                             | Meaning of the output                                                                                   | Example value                                              | List as string |
-|------------------------------------|---------------------------------------------------------------------------------------------------------|------------------------------------------------------------|----------------|
-| affected-providers-list-as-string  | List of providers affected when they are selectively affected.                                          | airbyte http                                               | *              |
-| all-python-versions                | List of all python versions there are available in the form of JSON array                               | ['3.8', '3.9', '3.10']                                     |                |
-| all-python-versions-list-as-string | List of all python versions there are available in the form of space separated string                   | 3.8 3.9 3.10                                               | *              |
-| basic-checks-only                  | Whether to run all static checks ("false") or only basic set of static checks ("true")                  | false                                                      |                |
-| cache-directive                    | Which cache should be used for images ("registry", "local" , "disabled")                             | registry                                                   |                |
-| debug-resources                    | Whether resources usage should be printed during parallel job execution ("true"/ "false")               | false                                                      |                |
-| default-branch                     | Which branch is default for the build ("main" for main branch, "v2-4-test" for 2.4 line etc.)       | main                                                       |                |
-| default-constraints-branch         | Which branch is default for the build ("constraints-main" for main branch, "constraints-2-4" etc.)  | constraints-main                                           |                |
-| default-helm-version               | Which Helm version to use as default                                                                    | v3.9.4                                                     |                |
-| default-kind-version               | Which Kind version to use as default                                                                    | v0.16.0                                                    |                |
-| default-kubernetes-version         | Which Kubernetes version to use as default                                                              | v1.25.2                                                    |                |
-| default-mssql-version              | Which MsSQL version to use as default                                                                   | 2017-latest                                                |                |
-| default-mysql-version              | Which MySQL version to use as default                                                                   | 5.7                                                        |                |
-| default-postgres-version           | Which Postgres version to use as default                                                                | 10                                                         |                |
-| default-python-version             | Which Python version to use as default                                                                  | 3.8                                                        |                |
-| docs-build                         | Whether to build documentation ("true"/"false")                                                         | true                                                       |                |
-| docs-filter-list-as-string         | What filter to apply to docs building - based on which documentation packages should be built           | --package-filter apache-airflow -package-filter-helm-chart |                |
-| full-tests-needed                  | Whether this build runs complete set of tests or only subset (for faster PR builds)                     | false                                                      |                |
-| helm-version                       | Which Helm version to use for tests                                                                     | v3.9.4                                                     |                |
-| image-build                        | Whether CI image build is needed                                                                        | true                                                       |                |
-| kind-version                       | Which Kind version to use for tests                                                                     | v0.16.0                                                    |                |
-| kubernetes-combos-list-as-string   | All combinations of Python version and Kubernetes version to use for tests as space-separated string    | 3.8-v1.25.2 3.9-v1.26.4                                    | *              |
-| kubernetes-versions                | All Kubernetes versions to use for tests as JSON array                                                  | ['v1.25.2']                                                |                |
-| kubernetes-versions-list-as-string | All Kubernetes versions to use for tests as space-separated string                                      | v1.25.2                                                    | *              |
-| mssql-exclude                      | Which versions of MsSQL to exclude for tests as JSON array                                              | []                                                         |                |
-| mssql-versions                     | Which versions of MsSQL to use for tests as JSON array                                                  | ['2017-latest']                                            |                |
-| mysql-exclude                      | Which versions of MySQL to exclude for tests as JSON array                                              | []                                                         |                |
-| mysql-versions                     | Which versions of MySQL to use for tests as JSON array                                                  | ['5.7']                                                    |                |
-| needs-api-codegen                  | Whether "api-codegen" are needed to run ("true"/"false")                                                | true                                                       |                |
-| needs-api-tests                    | Whether "api-tests" are needed to run ("true"/"false")                                                  | true                                                       |                |
-| needs-helm-tests                   | Whether Helm tests are needed to run ("true"/"false")                                                   | true                                                       |                |
-| needs-javascript-scans             | Whether javascript CodeQL scans should be run ("true"/"false")                                          | true                                                       |                |
-| needs-python-scans                 | Whether Python CodeQL scans should be run ("true"/"false")                                              | true                                                       |                |
-| parallel-test-types-list-as-string | Which test types should be run for unit tests                                                           | API Always Providers\[amazon\] Providers\[-amazon\]        | *              |
-| postgres-exclude                   | Which versions of Postgres to exclude for tests as JSON array                                           | []                                                         |                |
-| postgres-versions                  | Which versions of Postgres to use for tests as JSON array                                               | ['10']                                                     |                |
-| python-versions                    | Which versions of Python to use for tests as JSON array                                                 | ['3.8']                                                    |                |
-| python-versions-list-as-string     | Which versions of MySQL to use for tests as space-separated string                                      | 3.8                                                        | *              |
-| run-kubernetes-tests               | Whether Kubernetes tests should be run ("true"/"false")                                                 | true                                                       |                |
-| run-tests                          | Whether unit tests should be run ("true"/"false")                                                       | true                                                       |                |
-| run-www-tests                      | Whether WWW tests should be run ("true"/"false")                                                        | true                                                       |                |
-| skip-pre-commits                   | Which pre-commits should be skipped during the static-checks run                                        | true                                                       |                |
-| skip-provider-tests                | When provider tests should be skipped (on non-main branch or when no provider changes detected)         | true                                                       |                |
-| sqlite-exclude                     | Which versions of Sqlite to exclude for tests as JSON array                                             | []                                                         |                |
-| upgrade-to-newer-dependencies      | Whether the image build should attempt to upgrade all dependencies (might be true/false or commit hash) | false                                                      |                |
+| Output                             | Meaning of the output                                                                                   | Example value                                       | List as string |
+|------------------------------------|---------------------------------------------------------------------------------------------------------|-----------------------------------------------------|----------------|
+| affected-providers-list-as-string  | List of providers affected when they are selectively affected.                                          | airbyte http                                        | *              |
+| all-python-versions                | List of all python versions there are available in the form of JSON array                               | ['3.8', '3.9', '3.10']                              |                |
+| all-python-versions-list-as-string | List of all python versions there are available in the form of space separated string                   | 3.8 3.9 3.10                                        | *              |
+| basic-checks-only                  | Whether to run all static checks ("false") or only basic set of static checks ("true")                  | false                                               |                |
+| cache-directive                    | Which cache should be used for images ("registry", "local" , "disabled")                                | registry                                            |                |
+| debug-resources                    | Whether resources usage should be printed during parallel job execution ("true"/ "false")               | false                                               |                |
+| default-branch                     | Which branch is default for the build ("main" for main branch, "v2-4-test" for 2.4 line etc.)           | main                                                |                |
+| default-constraints-branch         | Which branch is default for the build ("constraints-main" for main branch, "constraints-2-4" etc.)      | constraints-main                                    |                |
+| default-helm-version               | Which Helm version to use as default                                                                    | v3.9.4                                              |                |
+| default-kind-version               | Which Kind version to use as default                                                                    | v0.16.0                                             |                |
+| default-kubernetes-version         | Which Kubernetes version to use as default                                                              | v1.25.2                                             |                |
+| default-mssql-version              | Which MsSQL version to use as default                                                                   | 2017-latest                                         |                |
+| default-mysql-version              | Which MySQL version to use as default                                                                   | 5.7                                                 |                |
+| default-postgres-version           | Which Postgres version to use as default                                                                | 10                                                  |                |
+| default-python-version             | Which Python version to use as default                                                                  | 3.8                                                 |                |
+| docs-build                         | Whether to build documentation ("true"/"false")                                                         | true                                                |                |
+| docs-list-as-string                | What filter to apply to docs building - based on which documentation packages should be built           | apache-airflow helm-chart google                    |                |
+| full-tests-needed                  | Whether this build runs complete set of tests or only subset (for faster PR builds)                     | false                                               |                |
+| helm-version                       | Which Helm version to use for tests                                                                     | v3.9.4                                              |                |
+| image-build                        | Whether CI image build is needed                                                                        | true                                                |                |
+| kind-version                       | Which Kind version to use for tests                                                                     | v0.16.0                                             |                |
+| kubernetes-combos-list-as-string   | All combinations of Python version and Kubernetes version to use for tests as space-separated string    | 3.8-v1.25.2 3.9-v1.26.4                             | *              |
+| kubernetes-versions                | All Kubernetes versions to use for tests as JSON array                                                  | ['v1.25.2']                                         |                |
+| kubernetes-versions-list-as-string | All Kubernetes versions to use for tests as space-separated string                                      | v1.25.2                                             | *              |
+| mssql-exclude                      | Which versions of MsSQL to exclude for tests as JSON array                                              | []                                                  |                |
+| mssql-versions                     | Which versions of MsSQL to use for tests as JSON array                                                  | ['2017-latest']                                     |                |
+| mysql-exclude                      | Which versions of MySQL to exclude for tests as JSON array                                              | []                                                  |                |
+| mysql-versions                     | Which versions of MySQL to use for tests as JSON array                                                  | ['5.7']                                             |                |
+| needs-api-codegen                  | Whether "api-codegen" are needed to run ("true"/"false")                                                | true                                                |                |
+| needs-api-tests                    | Whether "api-tests" are needed to run ("true"/"false")                                                  | true                                                |                |
+| needs-helm-tests                   | Whether Helm tests are needed to run ("true"/"false")                                                   | true                                                |                |
+| needs-javascript-scans             | Whether javascript CodeQL scans should be run ("true"/"false")                                          | true                                                |                |
+| needs-python-scans                 | Whether Python CodeQL scans should be run ("true"/"false")                                              | true                                                |                |
+| parallel-test-types-list-as-string | Which test types should be run for unit tests                                                           | API Always Providers\[amazon\] Providers\[-amazon\] | *              |
+| postgres-exclude                   | Which versions of Postgres to exclude for tests as JSON array                                           | []                                                  |                |
+| postgres-versions                  | Which versions of Postgres to use for tests as JSON array                                               | ['10']                                              |                |
+| python-versions                    | Which versions of Python to use for tests as JSON array                                                 | ['3.8']                                             |                |
+| python-versions-list-as-string     | Which versions of MySQL to use for tests as space-separated string                                      | 3.8                                                 | *              |
+| run-kubernetes-tests               | Whether Kubernetes tests should be run ("true"/"false")                                                 | true                                                |                |
+| run-tests                          | Whether unit tests should be run ("true"/"false")                                                       | true                                                |                |
+| run-www-tests                      | Whether WWW tests should be run ("true"/"false")                                                        | true                                                |                |
+| skip-pre-commits                   | Which pre-commits should be skipped during the static-checks run                                        | true                                                |                |
+| skip-provider-tests                | When provider tests should be skipped (on non-main branch or when no provider changes detected)         | true                                                |                |
+| sqlite-exclude                     | Which versions of Sqlite to exclude for tests as JSON array                                             | []                                                  |                |
+| upgrade-to-newer-dependencies      | Whether the image build should attempt to upgrade all dependencies (might be true/false or commit hash) | false                                               |                |
diff --git a/dev/breeze/src/airflow_breeze/utils/selective_checks.py b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
index cb79df373791b..09a20b7d080ac 100644
--- a/dev/breeze/src/airflow_breeze/utils/selective_checks.py
+++ b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
@@ -695,12 +695,12 @@ def upgrade_to_newer_dependencies(self) -> bool:
         )
 
     @cached_property
-    def docs_filter_list_as_string(self) -> str | None:
+    def docs_list_as_string(self) -> str | None:
         _ALL_DOCS_LIST = ""
         if not self.docs_build:
             return None
         if self._default_branch != "main":
-            return "--package-filter apache-airflow --package-filter docker-stack"
+            return "apache-airflow docker-stack"
         if self.full_tests_needed:
             return _ALL_DOCS_LIST
         providers_affected = find_all_providers_affected(
@@ -719,15 +719,15 @@ def docs_filter_list_as_string(self) -> str | None:
         if any(file.startswith(("airflow/", "docs/apache-airflow/")) for file in self._files):
             packages.append("apache-airflow")
         if any(file.startswith("docs/apache-airflow-providers/") for file in self._files):
-            packages.append("apache-airflow-providers")
+            packages.append("providers-index")
         if any(file.startswith(("chart/", "docs/helm-chart")) for file in self._files):
             packages.append("helm-chart")
         if any(file.startswith("docs/docker-stack/") for file in self._files):
             packages.append("docker-stack")
         if providers_affected:
             for provider in providers_affected:
-                packages.append(f"apache-airflow-providers-{provider.replace('.', '-')}")
-        return " ".join([f"--package-filter {package}" for package in packages])
+                packages.append(f"{provider.replace('.', '-')}")
+        return " ".join(packages)
 
     @cached_property
     def skip_pre_commits(self) -> str:
diff --git a/dev/breeze/tests/test_selective_checks.py b/dev/breeze/tests/test_selective_checks.py
index 0eb61aa5e0919..66c6d28d1fb17 100644
--- a/dev/breeze/tests/test_selective_checks.py
+++ b/dev/breeze/tests/test_selective_checks.py
@@ -426,7 +426,7 @@ def test_expected_output_pull_request_main(
                     "image-build": "true",
                     "run-tests": "true",
                     "docs-build": "true",
-                    "docs-filter-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
+                    "docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
                     "full-tests-needed": "true",
                     "upgrade-to-newer-dependencies": "false",
                     "parallel-test-types-list-as-string": "Operators Core Providers[-amazon,google] "
@@ -453,7 +453,7 @@ def test_expected_output_pull_request_main(
                     "image-build": "true",
                     "run-tests": "true",
                     "docs-build": "true",
-                    "docs-filter-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
+                    "docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
                     "full-tests-needed": "true",
                     "upgrade-to-newer-dependencies": "false",
                     "parallel-test-types-list-as-string": "Operators Core Providers[-amazon,google] "
@@ -478,7 +478,7 @@ def test_expected_output_pull_request_main(
                     "image-build": "true",
                     "run-tests": "true",
                     "docs-build": "true",
-                    "docs-filter-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
+                    "docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
                     "full-tests-needed": "true",
                     "upgrade-to-newer-dependencies": "false",
                     "parallel-test-types-list-as-string": "Operators Core Providers[-amazon,google] "
@@ -503,8 +503,7 @@ def test_expected_output_pull_request_main(
                     "image-build": "true",
                     "run-tests": "true",
                     "docs-build": "true",
-                    "docs-filter-list-as-string": "--package-filter apache-airflow "
-                    "--package-filter docker-stack",
+                    "docs-list-as-string": "apache-airflow docker-stack",
                     "full-tests-needed": "true",
                     "skip-provider-tests": "true",
                     "upgrade-to-newer-dependencies": "false",
@@ -544,7 +543,7 @@ def test_expected_output_full_tests_needed(
                 "needs-helm-tests": "false",
                 "run-tests": "false",
                 "docs-build": "false",
-                "docs-filter-list-as-string": None,
+                "docs-list-as-string": None,
                 "full-tests-needed": "false",
                 "upgrade-to-newer-dependencies": "false",
                 "skip-provider-tests": "true",
@@ -567,7 +566,7 @@ def test_expected_output_full_tests_needed(
                 "image-build": "true",
                 "run-tests": "true",
                 "docs-build": "true",
-                "docs-filter-list-as-string": "--package-filter apache-airflow --package-filter docker-stack",
+                "docs-list-as-string": "apache-airflow docker-stack",
                 "full-tests-needed": "false",
                 "run-kubernetes-tests": "true",
                 "upgrade-to-newer-dependencies": "false",
@@ -593,7 +592,7 @@ def test_expected_output_full_tests_needed(
                 "needs-helm-tests": "false",
                 "run-tests": "true",
                 "docs-build": "true",
-                "docs-filter-list-as-string": "--package-filter apache-airflow --package-filter docker-stack",
+                "docs-list-as-string": "apache-airflow docker-stack",
                 "full-tests-needed": "false",
                 "run-kubernetes-tests": "true",
                 "upgrade-to-newer-dependencies": "false",
@@ -615,7 +614,7 @@ def test_expected_output_full_tests_needed(
                 "needs-helm-tests": "false",
                 "run-tests": "true",
                 "docs-build": "true",
-                "docs-filter-list-as-string": "--package-filter apache-airflow --package-filter docker-stack",
+                "docs-list-as-string": "apache-airflow docker-stack",
                 "full-tests-needed": "false",
                 "run-kubernetes-tests": "false",
                 "upgrade-to-newer-dependencies": "false",
@@ -653,7 +652,7 @@ def test_expected_output_pull_request_v2_3(
                 "needs-helm-tests": "false",
                 "run-tests": "false",
                 "docs-build": "false",
-                "docs-filter-list-as-string": None,
+                "docs-list-as-string": None,
                 "upgrade-to-newer-dependencies": "false",
                 "skip-provider-tests": "true",
                 "parallel-test-types-list-as-string": None,
@@ -670,7 +669,7 @@ def test_expected_output_pull_request_v2_3(
                 "needs-helm-tests": "false",
                 "run-tests": "true",
                 "docs-build": "true",
-                "docs-filter-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
+                "docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
                 "upgrade-to-newer-dependencies": "false",
                 "skip-provider-tests": "true",
                 "parallel-test-types-list-as-string": "Always",
@@ -694,27 +693,10 @@ def test_expected_output_pull_request_v2_3(
                 "needs-helm-tests": "true",
                 "run-tests": "true",
                 "docs-build": "true",
-                "docs-filter-list-as-string": "--package-filter apache-airflow --package-filter helm-chart "
-                "--package-filter apache-airflow-providers-amazon "
-                "--package-filter apache-airflow-providers-apache-beam "
-                "--package-filter apache-airflow-providers-apache-cassandra "
-                "--package-filter apache-airflow-providers-cncf-kubernetes "
-                "--package-filter apache-airflow-providers-common-sql "
-                "--package-filter apache-airflow-providers-facebook "
-                "--package-filter apache-airflow-providers-google "
-                "--package-filter apache-airflow-providers-hashicorp "
-                "--package-filter apache-airflow-providers-microsoft-azure "
-                "--package-filter apache-airflow-providers-microsoft-mssql "
-                "--package-filter apache-airflow-providers-mysql "
-                "--package-filter apache-airflow-providers-openlineage "
-                "--package-filter apache-airflow-providers-oracle "
-                "--package-filter apache-airflow-providers-postgres "
-                "--package-filter apache-airflow-providers-presto "
-                "--package-filter apache-airflow-providers-salesforce "
-                "--package-filter apache-airflow-providers-samba "
-                "--package-filter apache-airflow-providers-sftp "
-                "--package-filter apache-airflow-providers-ssh "
-                "--package-filter apache-airflow-providers-trino",
+                "docs-list-as-string": "apache-airflow helm-chart amazon apache-beam apache-cassandra "
+                "cncf-kubernetes common-sql facebook google hashicorp microsoft-azure "
+                "microsoft-mssql mysql openlineage oracle postgres "
+                "presto salesforce samba sftp ssh trino",
                 "run-kubernetes-tests": "true",
                 "upgrade-to-newer-dependencies": "false",
                 "skip-provider-tests": "false",
@@ -740,7 +722,7 @@ def test_expected_output_pull_request_v2_3(
                 "needs-helm-tests": "false",
                 "run-tests": "true",
                 "docs-build": "true",
-                "docs-filter-list-as-string": "--package-filter apache-airflow",
+                "docs-list-as-string": "apache-airflow",
                 "run-kubernetes-tests": "false",
                 "upgrade-to-newer-dependencies": "false",
                 "skip-provider-tests": "true",
@@ -758,7 +740,7 @@ def test_expected_output_pull_request_v2_3(
                 "needs-helm-tests": "false",
                 "run-tests": "true",
                 "docs-build": "true",
-                "docs-filter-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
+                "docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
                 "run-kubernetes-tests": "false",
                 "upgrade-to-newer-dependencies": "false",
                 "skip-provider-tests": "false",
@@ -778,7 +760,7 @@ def test_expected_output_pull_request_v2_3(
                 "needs-helm-tests": "false",
                 "run-tests": "true",
                 "docs-build": "true",
-                "docs-filter-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
+                "docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
                 "run-kubernetes-tests": "false",
                 "upgrade-to-newer-dependencies": "false",
                 "skip-provider-tests": "false",
@@ -819,7 +801,7 @@ def test_expected_output_pull_request_target(
                 "needs-helm-tests": "true",
                 "run-tests": "true",
                 "docs-build": "true",
-                "docs-filter-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
+                "docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
                 "upgrade-to-newer-dependencies": "true",
                 "parallel-test-types-list-as-string": "Operators Core Providers[-amazon,google] "
                 "Providers[amazon] WWW "
@@ -839,7 +821,7 @@ def test_expected_output_pull_request_target(
                 "needs-helm-tests": "false",
                 "run-tests": "true",
                 "docs-build": "true",
-                "docs-filter-list-as-string": "--package-filter apache-airflow --package-filter docker-stack",
+                "docs-list-as-string": "apache-airflow docker-stack",
                 "upgrade-to-newer-dependencies": "true",
                 "parallel-test-types-list-as-string": "Operators Core WWW API Always CLI Other",
             },
@@ -858,7 +840,7 @@ def test_expected_output_pull_request_target(
                 "needs-helm-tests": "true",
                 "run-tests": "true",
                 "docs-build": "true",
-                "docs-filter-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
+                "docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
                 "upgrade-to-newer-dependencies": "true",
                 "parallel-test-types-list-as-string": "Operators Core Providers[-amazon,google] "
                 "Providers[amazon] WWW "
@@ -993,74 +975,34 @@ def test_upgrade_to_newer_dependencies(
         pytest.param(
             ("docs/apache-airflow-providers-google/docs.rst",),
             {
-                "docs-filter-list-as-string": "--package-filter apache-airflow-providers-amazon "
-                "--package-filter apache-airflow-providers-apache-beam "
-                "--package-filter apache-airflow-providers-apache-cassandra "
-                "--package-filter apache-airflow-providers-cncf-kubernetes "
-                "--package-filter apache-airflow-providers-common-sql "
-                "--package-filter apache-airflow-providers-facebook "
-                "--package-filter apache-airflow-providers-google "
-                "--package-filter apache-airflow-providers-hashicorp "
-                "--package-filter apache-airflow-providers-microsoft-azure "
-                "--package-filter apache-airflow-providers-microsoft-mssql "
-                "--package-filter apache-airflow-providers-mysql "
-                "--package-filter apache-airflow-providers-openlineage "
-                "--package-filter apache-airflow-providers-oracle "
-                "--package-filter apache-airflow-providers-postgres "
-                "--package-filter apache-airflow-providers-presto "
-                "--package-filter apache-airflow-providers-salesforce "
-                "--package-filter apache-airflow-providers-samba "
-                "--package-filter apache-airflow-providers-sftp "
-                "--package-filter apache-airflow-providers-ssh "
-                "--package-filter apache-airflow-providers-trino",
+                "docs-list-as-string": "amazon apache-beam apache-cassandra "
+                "cncf-kubernetes common-sql facebook google hashicorp "
+                "microsoft-azure microsoft-mssql mysql openlineage oracle "
+                "postgres presto salesforce samba sftp ssh trino",
             },
             id="Google provider docs changed",
         ),
         pytest.param(
             ("airflow/providers/common/sql/common_sql_python.py",),
             {
-                "docs-filter-list-as-string": "--package-filter apache-airflow "
-                "--package-filter apache-airflow-providers-amazon "
-                "--package-filter apache-airflow-providers-apache-drill "
-                "--package-filter apache-airflow-providers-apache-druid "
-                "--package-filter apache-airflow-providers-apache-hive "
-                "--package-filter apache-airflow-providers-apache-impala "
-                "--package-filter apache-airflow-providers-apache-pinot "
-                "--package-filter apache-airflow-providers-common-sql "
-                "--package-filter apache-airflow-providers-databricks "
-                "--package-filter apache-airflow-providers-elasticsearch "
-                "--package-filter apache-airflow-providers-exasol "
-                "--package-filter apache-airflow-providers-google "
-                "--package-filter apache-airflow-providers-jdbc "
-                "--package-filter apache-airflow-providers-microsoft-mssql "
-                "--package-filter apache-airflow-providers-mysql "
-                "--package-filter apache-airflow-providers-odbc "
-                "--package-filter apache-airflow-providers-openlineage "
-                "--package-filter apache-airflow-providers-oracle "
-                "--package-filter apache-airflow-providers-postgres "
-                "--package-filter apache-airflow-providers-presto "
-                "--package-filter apache-airflow-providers-slack "
-                "--package-filter apache-airflow-providers-snowflake "
-                "--package-filter apache-airflow-providers-sqlite "
-                "--package-filter apache-airflow-providers-trino "
-                "--package-filter apache-airflow-providers-vertica",
+                "docs-list-as-string": "apache-airflow amazon apache-drill apache-druid apache-hive "
+                "apache-impala apache-pinot common-sql databricks elasticsearch "
+                "exasol google jdbc microsoft-mssql mysql odbc openlineage "
+                "oracle postgres presto slack snowflake sqlite trino vertica",
             },
             id="Common SQL provider package python files changed",
         ),
         pytest.param(
             ("docs/apache-airflow-providers-airbyte/docs.rst",),
             {
-                "docs-filter-list-as-string": "--package-filter apache-airflow-providers-airbyte "
-                "--package-filter apache-airflow-providers-http",
+                "docs-list-as-string": "airbyte http",
             },
             id="Airbyte provider docs changed",
         ),
         pytest.param(
             ("docs/apache-airflow-providers-airbyte/docs.rst", "docs/apache-airflow/docs.rst"),
             {
-                "docs-filter-list-as-string": "--package-filter apache-airflow "
-                "--package-filter apache-airflow-providers-airbyte "
-                "--package-filter apache-airflow-providers-http",
+                "docs-list-as-string": "apache-airflow airbyte http",
             },
             id="Airbyte provider and airflow core docs changed",
         ),
@@ -1071,66 +1013,59 @@ def test_upgrade_to_newer_dependencies(
                 "docs/apache-airflow-providers/docs.rst",
             ),
             {
-                "docs-filter-list-as-string": "--package-filter apache-airflow "
-                "--package-filter apache-airflow-providers "
-                "--package-filter apache-airflow-providers-airbyte "
-                "--package-filter apache-airflow-providers-http",
+                "docs-list-as-string": "apache-airflow providers-index airbyte http",
             },
             id="Airbyte provider and airflow core and common provider docs changed",
         ),
         pytest.param(
             ("docs/apache-airflow/docs.rst",),
             {
-                "docs-filter-list-as-string": "--package-filter apache-airflow",
+                "docs-list-as-string": "apache-airflow",
             },
             id="Only Airflow docs changed",
         ),
         pytest.param(
             ("airflow/providers/celery/file.py",),
-            {
-                "docs-filter-list-as-string": "--package-filter apache-airflow "
-                "--package-filter apache-airflow-providers-celery "
-                "--package-filter apache-airflow-providers-cncf-kubernetes"
-            },
+            {"docs-list-as-string": "apache-airflow celery cncf-kubernetes"},
             id="Celery python files changed",
         ),
         pytest.param(
             ("docs/conf.py",),
             {
-                "docs-filter-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
+                "docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
             },
             id="Docs conf.py changed",
         ),
         pytest.param(
             ("airflow/test.py",),
             {
-                "docs-filter-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
+                "docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
             },
             id="Core files changed. All provider docs should also be built",
         ),
         pytest.param(
             ("docs/docker-stack/test.rst",),
-            {"docs-filter-list-as-string": "--package-filter docker-stack"},
+            {"docs-list-as-string": "docker-stack"},
             id="Docker stack files changed. No provider docs to build",
         ),
         pytest.param(
             ("airflow/test.py", "chart/airflow/values.yaml"),
             {
-                "docs-filter-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
+                "docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
             },
             id="Core files and helm chart files changed. All provider docs should be built",
         ),
         pytest.param(
             ("chart/airflow/values.yaml",),
             {
-                "docs-filter-list-as-string": "--package-filter helm-chart",
+                "docs-list-as-string": "helm-chart",
             },
             id="Helm chart files changed. No provider, airflow docs to build",
         ),
         pytest.param(
             ("docs/helm-chart/airflow/values.yaml",),
             {
-                "docs-filter-list-as-string": "--package-filter helm-chart",
+                "docs-list-as-string": "helm-chart",
             },
             id="Docs helm chart files changed. No provider, airflow docs to build",
         ),
