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 d54f302826 Optimize-away PROD image build in many cases (#35439)
d54f302826 is described below

commit d54f30282651ff4040da7cbca634056b0a49c8b4
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sat Nov 4 18:05:28 2023 +0100

    Optimize-away PROD image build in many cases (#35439)
    
    We were always building PROD image when we built CI image on CI as
    we had only one flag "build-images" in selective checks. This was
    based on an assumption that we want to still run docker compose
    tests with airflow when any of our sources change - just to see if
    it still works.
    
    While "docker-compose" tests are the only end-to-end tests it is
    very unlikely that unit and integration tests passing will trigger
    a docker compose test failure.
    
    This of course might happen, but if it happens, we will find out during
    our canary builds that run all the tests and building PROD image in this
    case is a waste of resources and time - waiting for docker-compose tests
    to complete when we really do not have to do it makes no sense either.
    Even if those tests are relatively quick, just waiting for PROD images
    being built (PROD images have to wait for CI images in order to get
    constraints from CI builds) adds quite a bit of elapsed test time for
    many smaller PRs that do not change k8s or Helm in any way.
    
    This change splits "image-build" into two outputs of selective checks:
    ci-image-build and prod-image-build. The CI-image build is the same
    as before - we will build CI image whenever any test need to use the
    image and run our code (so for example it is false when only
    README files change). PROD image build is set to true now only when
    we need kubernetes tests (i.e. when k8s provider changes) or when chart
    changes - because there we want to test basic functionality of k8s
    integration and Helm deployment/running.
---
 .github/workflows/build-images.yml                 |   9 +-
 .github/workflows/ci.yml                           |  16 +--
 dev/breeze/SELECTIVE_CHECKS.md                     |   3 +-
 .../src/airflow_breeze/utils/selective_checks.py   |   8 +-
 dev/breeze/tests/test_selective_checks.py          | 108 ++++++++++++++-------
 5 files changed, 92 insertions(+), 52 deletions(-)

diff --git a/.github/workflows/build-images.yml 
b/.github/workflows/build-images.yml
index 44d82e6404..f95b0c4d8b 100644
--- a/.github/workflows/build-images.yml
+++ b/.github/workflows/build-images.yml
@@ -62,7 +62,8 @@ jobs:
       default-python-version: ${{ 
steps.selective-checks.outputs.default-python-version }}
       run-tests: ${{ steps.selective-checks.outputs.run-tests }}
       run-kubernetes-tests: ${{ 
steps.selective-checks.outputs.run-kubernetes-tests }}
-      image-build: ${{ steps.selective-checks.outputs.image-build }}
+      ci-image-build: ${{ steps.selective-checks.outputs.ci-image-build }}
+      prod-image-build: ${{ steps.selective-checks.outputs.prod-image-build }}
       cache-directive: ${{ steps.selective-checks.outputs.cache-directive }}
       default-branch: ${{ steps.selective-checks.outputs.default-branch }}
       default-constraints-branch: ${{ 
steps.selective-checks.outputs.default-constraints-branch }}
@@ -192,7 +193,7 @@ jobs:
     runs-on: ${{fromJSON(needs.build-info.outputs.runs-on)}}
     needs: [build-info]
     if: |
-      needs.build-info.outputs.image-build == 'true' &&
+      needs.build-info.outputs.ci-image-build == 'true' &&
       github.event.pull_request.head.repo.full_name != 'apache/airflow' &&
       github.repository == 'apache/airflow'
     env:
@@ -265,7 +266,7 @@ jobs:
     runs-on: ${{fromJSON(needs.build-info.outputs.runs-on)}}
     needs: [build-info, build-ci-images]
     if: |
-      needs.build-info.outputs.image-build == 'true' &&
+      needs.build-info.outputs.prod-image-build == 'true' &&
       github.event.pull_request.head.repo.full_name != 'apache/airflow' &&
       github.repository == 'apache/airflow'
     env:
@@ -322,7 +323,7 @@ jobs:
     needs: [build-info, build-prod-images]
     # We can change the job to run on ASF ARM runners and do not start our 
instance once we enable ASF runners
     if: |
-      needs.build-info.outputs.image-build == 'true' &&
+      needs.build-info.outputs.ci-image-build == 'true' &&
       needs.build-info.outputs.upgrade-to-newer-dependencies != 'false' &&
       github.event.pull_request.head.repo.full_name != 'apache/airflow' &&
       needs.build-info.outputs.is-self-hosted-runner == 'true' &&
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e540b6829e..d86d771745 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -102,7 +102,8 @@ jobs:
       run-www-tests: ${{ steps.selective-checks.outputs.run-www-tests }}
       run-kubernetes-tests: ${{ 
steps.selective-checks.outputs.run-kubernetes-tests }}
       basic-checks-only: ${{ steps.selective-checks.outputs.basic-checks-only 
}}
-      image-build: ${{ steps.selective-checks.outputs.image-build }}
+      ci-image-build: ${{ steps.selective-checks.outputs.ci-image-build }}
+      prod-image-build: ${{ steps.selective-checks.outputs.prod-image-build }}
       docs-build: ${{ steps.selective-checks.outputs.docs-build }}
       needs-helm-tests: ${{ steps.selective-checks.outputs.needs-helm-tests }}
       needs-api-tests: ${{ steps.selective-checks.outputs.needs-api-tests }}
@@ -344,7 +345,7 @@ jobs:
       RUNS_ON: "${{ needs.build-info.outputs.runs-on }}"
       PYTHON_VERSIONS: 
${{needs.build-info.outputs.all-python-versions-list-as-string}}
       DEBUG_RESOURCES: ${{needs.build-info.outputs.debug-resources}}
-    if: needs.build-info.outputs.image-build == 'true'
+    if: needs.build-info.outputs.ci-image-build == 'true'
     steps:
       - name: Cleanup repo
         run: docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm 
-rf /workspace/*"
@@ -505,7 +506,7 @@ jobs:
     name: "Test examples of production image building"
     runs-on: ${{fromJSON(needs.build-info.outputs.runs-on)}}
     needs: [build-info]
-    if: needs.build-info.outputs.image-build == 'true'
+    if: needs.build-info.outputs.ci-image-build == 'true'
     steps:
       - name: Cleanup repo
         run: docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm 
-rf /workspace/*"
@@ -543,7 +544,7 @@ jobs:
     name: "Wait for CI images"
     runs-on: "ubuntu-22.04"
     needs: [build-info, build-ci-images]
-    if: needs.build-info.outputs.image-build == 'true'
+    if: needs.build-info.outputs.ci-image-build == 'true'
     env:
       RUNS_ON: "${{needs.build-info.outputs.runs-on}}"
       BACKEND: sqlite
@@ -1613,7 +1614,7 @@ jobs:
     name: "Wait for & verify PROD images"
     runs-on: ${{fromJSON(needs.build-info.outputs.runs-on)}}
     needs: [build-info, wait-for-ci-images, build-prod-images]
-    if: needs.build-info.outputs.image-build == 'true'
+    if: needs.build-info.outputs.prod-image-build == 'true'
     env:
       RUNS_ON: "${{needs.build-info.outputs.runs-on}}"
       BACKEND: sqlite
@@ -1655,7 +1656,7 @@ jobs:
     name: "Test docker-compose quick start"
     runs-on: ${{fromJSON(needs.build-info.outputs.runs-on)}}
     needs: [build-info, wait-for-prod-images]
-    if: needs.build-info.outputs.image-build == 'true'
+    if: needs.build-info.outputs.prod-image-build == 'true'
     env:
       PYTHON_MAJOR_MINOR_VERSION: 
"${{needs.build-info.outputs.default-python-version}}"
     steps:
@@ -1695,8 +1696,7 @@ jobs:
       DEBUG_RESOURCES: ${{needs.build-info.outputs.debug-resources}}
     if: >
       ( needs.build-info.outputs.run-kubernetes-tests == 'true' ||
-      needs.build-info.outputs.needs-helm-tests == 'true' ) &&
-      needs.build-info.outputs.default-branch == 'main'
+      needs.build-info.outputs.needs-helm-tests == 'true')
     steps:
       - name: Cleanup repo
         run: docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm 
-rf /workspace/*"
diff --git a/dev/breeze/SELECTIVE_CHECKS.md b/dev/breeze/SELECTIVE_CHECKS.md
index 1cf92799fc..b3bff154ae 100644
--- a/dev/breeze/SELECTIVE_CHECKS.md
+++ b/dev/breeze/SELECTIVE_CHECKS.md
@@ -134,7 +134,8 @@ Github Actions to pass the list of parameters to a command 
to execute
 | 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          
                                      |                |
+| ci-image-build                     | Whether CI image build is needed        
                                                                | true          
                                      |                |
+| prod-image-build                   | Whether PROD 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']                                         |                |
diff --git a/dev/breeze/src/airflow_breeze/utils/selective_checks.py 
b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
index f34f963073..2d398db679 100644
--- a/dev/breeze/src/airflow_breeze/utils/selective_checks.py
+++ b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
@@ -563,9 +563,13 @@ class SelectiveChecks:
         return self._should_be_run(FileGroupForCi.ALL_SOURCE_FILES)
 
     @cached_property
-    def image_build(self) -> bool:
+    def ci_image_build(self) -> bool:
         return self.run_tests or self.docs_build or self.run_kubernetes_tests 
or self.needs_helm_tests
 
+    @cached_property
+    def prod_image_build(self) -> bool:
+        return self.run_kubernetes_tests or self.needs_helm_tests
+
     def _select_test_type_if_matching(
         self, test_types: set[str], test_type: SelectiveUnitTestTypes
     ) -> list[str]:
@@ -691,7 +695,7 @@ class SelectiveChecks:
 
     @cached_property
     def basic_checks_only(self) -> bool:
-        return not self.image_build
+        return not self.ci_image_build
 
     @cached_property
     def upgrade_to_newer_dependencies(self) -> bool:
diff --git a/dev/breeze/tests/test_selective_checks.py 
b/dev/breeze/tests/test_selective_checks.py
index 8d67eaa7ae..4c45e016ab 100644
--- a/dev/breeze/tests/test_selective_checks.py
+++ b/dev/breeze/tests/test_selective_checks.py
@@ -96,7 +96,7 @@ def assert_outputs_are_printed(expected_outputs: dict[str, 
str], stderr: str):
                     "all-python-versions-list-as-string": "3.8",
                     "python-versions": "['3.8']",
                     "python-versions-list-as-string": "3.8",
-                    "image-build": "false",
+                    "ci-image-build": "false",
                     "needs-helm-tests": "false",
                     "run-tests": "false",
                     "run-amazon-tests": "false",
@@ -116,7 +116,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, 
str], stderr: str):
                     "all-python-versions-list-as-string": "3.8",
                     "python-versions": "['3.8']",
                     "python-versions-list-as-string": "3.8",
-                    "image-build": "true",
+                    "ci-image-build": "true",
+                    "prod-image-build": "false",
                     "needs-helm-tests": "false",
                     "run-tests": "true",
                     "run-amazon-tests": "false",
@@ -136,7 +137,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, 
str], stderr: str):
                     "all-python-versions-list-as-string": "3.8",
                     "python-versions": "['3.8']",
                     "python-versions-list-as-string": "3.8",
-                    "image-build": "true",
+                    "ci-image-build": "true",
+                    "prod-image-build": "false",
                     "needs-helm-tests": "false",
                     "run-tests": "true",
                     "run-amazon-tests": "false",
@@ -159,7 +161,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, 
str], stderr: str):
                     "all-python-versions-list-as-string": "3.8",
                     "python-versions": "['3.8']",
                     "python-versions-list-as-string": "3.8",
-                    "image-build": "true",
+                    "ci-image-build": "true",
+                    "prod-image-build": "false",
                     "needs-helm-tests": "false",
                     "run-tests": "true",
                     "run-amazon-tests": "true",
@@ -180,7 +183,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, 
str], stderr: str):
                     "all-python-versions-list-as-string": "3.8",
                     "python-versions": "['3.8']",
                     "python-versions-list-as-string": "3.8",
-                    "image-build": "true",
+                    "ci-image-build": "true",
+                    "prod-image-build": "false",
                     "needs-helm-tests": "false",
                     "run-tests": "true",
                     "run-amazon-tests": "false",
@@ -201,7 +205,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, 
str], stderr: str):
                     "all-python-versions-list-as-string": "3.8",
                     "python-versions": "['3.8']",
                     "python-versions-list-as-string": "3.8",
-                    "image-build": "true",
+                    "ci-image-build": "true",
+                    "prod-image-build": "false",
                     "needs-helm-tests": "false",
                     "run-tests": "false",
                     "run-amazon-tests": "false",
@@ -225,7 +230,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, 
str], stderr: str):
                     "all-python-versions-list-as-string": "3.8",
                     "python-versions": "['3.8']",
                     "python-versions-list-as-string": "3.8",
-                    "image-build": "true",
+                    "ci-image-build": "true",
+                    "prod-image-build": "true",
                     "needs-helm-tests": "true",
                     "run-tests": "true",
                     "run-amazon-tests": "true",
@@ -253,7 +259,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, 
str], stderr: str):
                     "all-python-versions-list-as-string": "3.8",
                     "python-versions": "['3.8']",
                     "python-versions-list-as-string": "3.8",
-                    "image-build": "true",
+                    "ci-image-build": "true",
+                    "prod-image-build": "true",
                     "needs-helm-tests": "true",
                     "run-tests": "true",
                     "run-amazon-tests": "true",
@@ -280,7 +287,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, 
str], stderr: str):
                     "all-python-versions-list-as-string": "3.8",
                     "python-versions": "['3.8']",
                     "python-versions-list-as-string": "3.8",
-                    "image-build": "true",
+                    "ci-image-build": "true",
+                    "prod-image-build": "true",
                     "needs-helm-tests": "true",
                     "run-tests": "true",
                     "run-amazon-tests": "false",
@@ -306,7 +314,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, 
str], stderr: str):
                     "all-python-versions-list-as-string": "3.8",
                     "python-versions": "['3.8']",
                     "python-versions-list-as-string": "3.8",
-                    "image-build": "true",
+                    "ci-image-build": "true",
+                    "prod-image-build": "true",
                     "needs-helm-tests": "true",
                     "run-tests": "true",
                     "docs-build": "true",
@@ -315,7 +324,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, 
str], stderr: str):
                     "upgrade-to-newer-dependencies": "false",
                     "parallel-test-types-list-as-string": "Always",
                 },
-                id="Docs should run even if unimportant files were added",
+                id="Docs should run even if unimportant files were added and 
prod image "
+                "should be build for chart changes",
             )
         ),
         (
@@ -327,7 +337,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, 
str], stderr: str):
                     "all-python-versions-list-as-string": "3.8 3.9 3.10 3.11",
                     "python-versions": "['3.8', '3.9', '3.10', '3.11']",
                     "python-versions-list-as-string": "3.8 3.9 3.10 3.11",
-                    "image-build": "true",
+                    "ci-image-build": "true",
+                    "prod-image-build": "true",
                     "needs-helm-tests": "true",
                     "run-tests": "true",
                     "run-amazon-tests": "true",
@@ -348,7 +359,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, 
str], stderr: str):
                     "all-python-versions-list-as-string": "3.8 3.9 3.10 3.11",
                     "python-versions": "['3.8', '3.9', '3.10', '3.11']",
                     "python-versions-list-as-string": "3.8 3.9 3.10 3.11",
-                    "image-build": "true",
+                    "ci-image-build": "true",
+                    "prod-image-build": "true",
                     "needs-helm-tests": "true",
                     "run-tests": "true",
                     "run-amazon-tests": "true",
@@ -369,7 +381,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, 
str], stderr: str):
                 "all-python-versions-list-as-string": "3.8",
                 "python-versions": "['3.8']",
                 "python-versions-list-as-string": "3.8",
-                "image-build": "true",
+                "ci-image-build": "true",
+                "prod-image-build": "false",
                 "needs-helm-tests": "false",
                 "run-tests": "true",
                 "docs-build": "true",
@@ -390,7 +403,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, 
str], stderr: str):
                 "all-python-versions-list-as-string": "3.8",
                 "python-versions": "['3.8']",
                 "python-versions-list-as-string": "3.8",
-                "image-build": "true",
+                "ci-image-build": "true",
+                "prod-image-build": "false",
                 "needs-helm-tests": "false",
                 "run-tests": "true",
                 "run-amazon-tests": "false",
@@ -411,7 +425,8 @@ def assert_outputs_are_printed(expected_outputs: dict[str, 
str], stderr: str):
                 "all-python-versions-list-as-string": "3.8",
                 "python-versions": "['3.8']",
                 "python-versions-list-as-string": "3.8",
-                "image-build": "true",
+                "ci-image-build": "true",
+                "prod-image-build": "false",
                 "needs-helm-tests": "false",
                 "run-tests": "true",
                 "run-amazon-tests": "true",
@@ -454,7 +469,8 @@ def test_expected_output_pull_request_main(
                     "all-python-versions-list-as-string": "3.8 3.9 3.10 3.11",
                     "python-versions": "['3.8', '3.9', '3.10', '3.11']",
                     "python-versions-list-as-string": "3.8 3.9 3.10 3.11",
-                    "image-build": "true",
+                    "ci-image-build": "true",
+                    "prod-image-build": "true",
                     "run-tests": "true",
                     "docs-build": "true",
                     "docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
@@ -479,7 +495,8 @@ def test_expected_output_pull_request_main(
                     "all-python-versions-list-as-string": "3.8 3.9 3.10 3.11",
                     "python-versions": "['3.8', '3.9', '3.10', '3.11']",
                     "python-versions-list-as-string": "3.8 3.9 3.10 3.11",
-                    "image-build": "true",
+                    "ci-image-build": "true",
+                    "prod-image-build": "true",
                     "run-tests": "true",
                     "docs-build": "true",
                     "docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
@@ -502,7 +519,8 @@ def test_expected_output_pull_request_main(
                     "all-python-versions-list-as-string": "3.8 3.9 3.10 3.11",
                     "python-versions": "['3.8', '3.9', '3.10', '3.11']",
                     "python-versions-list-as-string": "3.8 3.9 3.10 3.11",
-                    "image-build": "true",
+                    "ci-image-build": "true",
+                    "prod-image-build": "true",
                     "run-tests": "true",
                     "docs-build": "true",
                     "docs-list-as-string": ALL_DOCS_SELECTED_FOR_BUILD,
@@ -525,7 +543,8 @@ def test_expected_output_pull_request_main(
                     "all-python-versions-list-as-string": "3.8 3.9 3.10 3.11",
                     "python-versions": "['3.8', '3.9', '3.10', '3.11']",
                     "python-versions-list-as-string": "3.8 3.9 3.10 3.11",
-                    "image-build": "true",
+                    "ci-image-build": "true",
+                    "prod-image-build": "true",
                     "run-tests": "true",
                     "docs-build": "true",
                     "docs-list-as-string": "apache-airflow docker-stack",
@@ -566,7 +585,7 @@ def test_expected_output_full_tests_needed(
                 "affected-providers-list-as-string": None,
                 "all-python-versions": "['3.8']",
                 "all-python-versions-list-as-string": "3.8",
-                "image-build": "false",
+                "ci-image-build": "false",
                 "needs-helm-tests": "false",
                 "run-tests": "false",
                 "docs-build": "false",
@@ -590,7 +609,8 @@ def test_expected_output_full_tests_needed(
                 "all-python-versions": "['3.8']",
                 "all-python-versions-list-as-string": "3.8",
                 "needs-helm-tests": "false",
-                "image-build": "true",
+                "ci-image-build": "true",
+                "prod-image-build": "true",
                 "run-tests": "true",
                 "docs-build": "true",
                 "docs-list-as-string": "apache-airflow docker-stack",
@@ -600,7 +620,8 @@ def test_expected_output_full_tests_needed(
                 "skip-provider-tests": "true",
                 "parallel-test-types-list-as-string": "Always",
             },
-            id="No Helm tests, No providers should run if only chart/providers 
changed in non-main",
+            id="No Helm tests, No providers should run if only chart/providers 
changed in non-main "
+            "but PROD image should be built",
         ),
         pytest.param(
             (
@@ -615,7 +636,8 @@ def test_expected_output_full_tests_needed(
                 "presto salesforce samba sftp ssh trino",
                 "all-python-versions": "['3.8']",
                 "all-python-versions-list-as-string": "3.8",
-                "image-build": "true",
+                "ci-image-build": "true",
+                "prod-image-build": "true",
                 "needs-helm-tests": "false",
                 "run-tests": "true",
                 "docs-build": "true",
@@ -637,7 +659,8 @@ def test_expected_output_full_tests_needed(
                 "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
                 "all-python-versions": "['3.8']",
                 "all-python-versions-list-as-string": "3.8",
-                "image-build": "true",
+                "ci-image-build": "true",
+                "prod-image-build": "false",
                 "needs-helm-tests": "false",
                 "run-tests": "true",
                 "docs-build": "true",
@@ -676,7 +699,7 @@ def test_expected_output_pull_request_v2_3(
                 "affected-providers-list-as-string": None,
                 "all-python-versions": "['3.8']",
                 "all-python-versions-list-as-string": "3.8",
-                "image-build": "false",
+                "ci-image-build": "false",
                 "needs-helm-tests": "false",
                 "run-tests": "false",
                 "docs-build": "false",
@@ -693,7 +716,8 @@ def test_expected_output_pull_request_v2_3(
                 "affected-providers-list-as-string": None,
                 "all-python-versions": "['3.8']",
                 "all-python-versions-list-as-string": "3.8",
-                "image-build": "true",
+                "ci-image-build": "true",
+                "prod-image-build": "false",
                 "needs-helm-tests": "false",
                 "run-tests": "true",
                 "docs-build": "true",
@@ -717,7 +741,8 @@ def test_expected_output_pull_request_v2_3(
                 "openlineage oracle postgres presto salesforce samba sftp ssh 
trino",
                 "all-python-versions": "['3.8']",
                 "all-python-versions-list-as-string": "3.8",
-                "image-build": "true",
+                "ci-image-build": "true",
+                "prod-image-build": "true",
                 "needs-helm-tests": "true",
                 "run-tests": "true",
                 "docs-build": "true",
@@ -733,7 +758,8 @@ def test_expected_output_pull_request_v2_3(
                 
"microsoft.azure,microsoft.mssql,mysql,openlineage,oracle,postgres,presto,salesforce,"
                 "samba,sftp,ssh,trino] Providers[google]",
             },
-            id="CLI tests and Google-related provider tests should run if 
cli/chart files changed",
+            id="CLI tests and Google-related provider tests should run if 
cli/chart files changed but "
+            "prod image should be build too and k8s tests too",
         ),
         pytest.param(
             (
@@ -746,7 +772,8 @@ def test_expected_output_pull_request_v2_3(
                 "affected-providers-list-as-string": None,
                 "all-python-versions": "['3.8']",
                 "all-python-versions-list-as-string": "3.8",
-                "image-build": "true",
+                "ci-image-build": "true",
+                "prod-image-build": "false",
                 "needs-helm-tests": "false",
                 "run-tests": "true",
                 "docs-build": "true",
@@ -764,7 +791,8 @@ def test_expected_output_pull_request_v2_3(
                 "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
                 "all-python-versions": "['3.8']",
                 "all-python-versions-list-as-string": "3.8",
-                "image-build": "true",
+                "ci-image-build": "true",
+                "prod-image-build": "false",
                 "needs-helm-tests": "false",
                 "run-tests": "true",
                 "docs-build": "true",
@@ -782,7 +810,8 @@ def test_expected_output_pull_request_v2_3(
                 "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
                 "all-python-versions": "['3.8']",
                 "all-python-versions-list-as-string": "3.8",
-                "image-build": "true",
+                "ci-image-build": "true",
+                "prod-image-build": "false",
                 "needs-helm-tests": "false",
                 "run-tests": "true",
                 "docs-build": "true",
@@ -821,7 +850,8 @@ def test_expected_output_pull_request_target(
                 "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
                 "all-python-versions": "['3.8', '3.9', '3.10', '3.11']",
                 "all-python-versions-list-as-string": "3.8 3.9 3.10 3.11",
-                "image-build": "true",
+                "ci-image-build": "true",
+                "prod-image-build": "true",
                 "needs-helm-tests": "true",
                 "run-tests": "true",
                 "docs-build": "true",
@@ -839,7 +869,8 @@ def test_expected_output_pull_request_target(
                 "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
                 "all-python-versions": "['3.8', '3.9', '3.10', '3.11']",
                 "all-python-versions-list-as-string": "3.8 3.9 3.10 3.11",
-                "image-build": "true",
+                "ci-image-build": "true",
+                "prod-image-build": "true",
                 "needs-helm-tests": "false",
                 "run-tests": "true",
                 "docs-build": "true",
@@ -859,7 +890,8 @@ def test_expected_output_pull_request_target(
                 "affected-providers-list-as-string": ALL_PROVIDERS_AFFECTED,
                 "all-python-versions": "['3.8', '3.9', '3.10', '3.11']",
                 "all-python-versions-list-as-string": "3.8 3.9 3.10 3.11",
-                "image-build": "true",
+                "ci-image-build": "true",
+                "prod-image-build": "true",
                 "needs-helm-tests": "true",
                 "run-tests": "true",
                 "docs-build": "true",
@@ -909,7 +941,8 @@ def 
test_no_commit_provided_trigger_full_build_for_any_event_type(github_event):
         {
             "all-python-versions": "['3.8', '3.9', '3.10', '3.11']",
             "all-python-versions-list-as-string": "3.8 3.9 3.10 3.11",
-            "image-build": "true",
+            "ci-image-build": "true",
+            "prod-image-build": "true",
             "needs-helm-tests": "true",
             "run-tests": "true",
             "docs-build": "true",
@@ -1107,7 +1140,8 @@ def test_docs_filter(files: tuple[str, ...], 
expected_outputs: dict[str, str]):
         pytest.param(
             ("helm_tests/random_helm_test.py",),
             {
-                "image-build": "true",
+                "ci-image-build": "true",
+                "prod-image-build": "true",
                 "needs-helm-tests": "true",
             },
             id="Only helm test files changed",

Reply via email to