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

shahar1 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 de9cf0d1fc4 Remove "translation freeze" logic from breeze selective 
checks (#65684)
de9cf0d1fc4 is described below

commit de9cf0d1fc446f7fa443d24c030360f2933e16e5
Author: Shahar Epstein <[email protected]>
AuthorDate: Thu Apr 23 01:56:46 2026 +0300

    Remove "translation freeze" logic from breeze selective checks (#65684)
---
 .../src/airflow_breeze/utils/selective_checks.py   | 36 ---------------------
 dev/breeze/tests/test_selective_checks.py          | 37 ----------------------
 2 files changed, 73 deletions(-)

diff --git a/dev/breeze/src/airflow_breeze/utils/selective_checks.py 
b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
index 47f84bbb28e..dd711c64767 100644
--- a/dev/breeze/src/airflow_breeze/utils/selective_checks.py
+++ b/dev/breeze/src/airflow_breeze/utils/selective_checks.py
@@ -88,7 +88,6 @@ LATEST_VERSIONS_ONLY_LABEL = "latest versions only"
 NON_COMMITTER_BUILD_LABEL = "non committer build"
 UPGRADE_TO_NEWER_DEPENDENCIES_LABEL = "upgrade to newer dependencies"
 USE_PUBLIC_RUNNERS_LABEL = "use public runners"
-ALLOW_TRANSACTION_CHANGE_LABEL = "allow translation change"
 ALLOW_PROVIDER_DEPENDENCY_BUMP_LABEL = "allow provider dependency bump"
 SKIP_COMMON_COMPAT_CHECK_LABEL = "skip common compat check"
 ALL_CI_SELECTIVE_TEST_TYPES = "API Always CLI Core Other Serialization"
@@ -97,9 +96,6 @@ ALL_PROVIDERS_SELECTIVE_TEST_TYPES = (
     "Providers[-amazon,google,standard] Providers[amazon] Providers[google] 
Providers[standard]"
 )
 
-# Set to True to enter a translation freeze period. Set to False to exit a 
translation freeze period.
-FAIL_WHEN_ENGLISH_TRANSLATION_CHANGED = False
-
 
 class FileGroupForCi(Enum):
     ENVIRONMENT_FILES = auto()
@@ -146,7 +142,6 @@ class FileGroupForCi(Enum):
     ASSET_FILES = auto()
     UNIT_TEST_FILES = auto()
     DEVEL_TOML_FILES = auto()
-    UI_ENGLISH_TRANSLATION_FILES = auto()
     SCRIPTS_FILES = auto()
     UV_LOCK_FILE = auto()
 
@@ -385,9 +380,6 @@ CI_FILE_GROUP_MATCHES: HashableDict[FileGroupForCi] = 
HashableDict(
         FileGroupForCi.DEVEL_TOML_FILES: [
             r"^devel-common/pyproject\.toml$",
         ],
-        FileGroupForCi.UI_ENGLISH_TRANSLATION_FILES: [
-            r"^airflow-core/src/airflow/ui/public/i18n/locales/en/.*\.json$",
-        ],
         FileGroupForCi.SCRIPTS_FILES: [
             r"^scripts/ci/.*\.py$",
             r"^scripts/cov/.*\.py$",
@@ -1807,34 +1799,6 @@ class SelectiveChecks:
     def shared_distributions_as_json(self):
         return json.dumps([file.name for file in (AIRFLOW_ROOT_PATH / 
"shared").iterdir() if file.is_dir()])
 
-    @cached_property
-    def ui_english_translation_changed(self) -> bool:
-        _translation_changed = bool(
-            self._matching_files(
-                FileGroupForCi.UI_ENGLISH_TRANSLATION_FILES,
-                CI_FILE_GROUP_MATCHES,
-            )
-        )
-        if FAIL_WHEN_ENGLISH_TRANSLATION_CHANGED and _translation_changed and 
not self._is_canary_run():
-            if ALLOW_TRANSACTION_CHANGE_LABEL in self._pr_labels:
-                console_print(
-                    "[warning]The 'allow translation change' label is set and 
English "
-                    "translation files changed. Bypassing the freeze period."
-                )
-                return True
-            console_print(
-                "[error]English translation changed but we are in a period of 
translation"
-                "freeze and label to allow it ('allow translation change') is 
not set"
-            )
-            console_print()
-            console_print(
-                "[warning]To allow translation change, please set the label "
-                "'allow translation change' on the PR, but this has to be 
communicated "
-                "and agreed to at the #i18n channel in slack"
-            )
-            sys.exit(1)
-        return _translation_changed
-
     @cached_property
     def provider_dependency_bump(self) -> bool:
         """Check for apache-airflow-providers dependency bumps in 
pyproject.toml files."""
diff --git a/dev/breeze/tests/test_selective_checks.py 
b/dev/breeze/tests/test_selective_checks.py
index 21296618fe0..b4e88242383 100644
--- a/dev/breeze/tests/test_selective_checks.py
+++ b/dev/breeze/tests/test_selective_checks.py
@@ -2831,43 +2831,6 @@ def test_mypy_matches(
     assert_outputs_are_printed(expected_outputs, str(stderr))
 
 
-@patch("airflow_breeze.utils.selective_checks.FAIL_WHEN_ENGLISH_TRANSLATION_CHANGED",
 True)
-def test_ui_english_translation_changed_fail_on_change():
-    translation_file = 
"airflow-core/src/airflow/ui/public/i18n/locales/en/some_file.json"
-    with pytest.raises(SystemExit):
-        SelectiveChecks(
-            files=(translation_file,),
-            commit_ref=NEUTRAL_COMMIT,
-            pr_labels=(),
-            github_event=GithubEvents.PULL_REQUEST,
-            default_branch="main",
-        ).ui_english_translation_changed
-
-
-def test_ui_english_translation_changed_allowed_in_canary_run():
-    translation_file = 
"airflow-core/src/airflow/ui/public/i18n/locales/en/some_file.json"
-    selective_checks = SelectiveChecks(
-        files=(translation_file,),
-        commit_ref=NEUTRAL_COMMIT,
-        pr_labels=(),
-        github_event=GithubEvents.PUSH,
-        default_branch="main",
-    )
-    assert selective_checks.ui_english_translation_changed
-
-
-def test_ui_english_translation_changed_allowed_with_label():
-    translation_file = 
"airflow-core/src/airflow/ui/public/i18n/locales/en/some_file.json"
-    selective_checks = SelectiveChecks(
-        files=(translation_file,),
-        commit_ref=NEUTRAL_COMMIT,
-        pr_labels=("allow translation change",),
-        github_event=GithubEvents.PULL_REQUEST,
-        default_branch="main",
-    )
-    assert selective_checks.ui_english_translation_changed is True
-
-
 @patch("requests.get")
 @patch.dict("os.environ", {"GITHUB_TOKEN": "test_token"})
 def test_get_job_label(mock_get):

Reply via email to