You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2026/06/01 22:54:27 UTC

(superset) branch master updated: ci: preserve PR translation updates during regression checks (#40581)

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

villebro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 74d1c83ec52 ci: preserve PR translation updates during regression checks (#40581)
74d1c83ec52 is described below

commit 74d1c83ec526a21fd828ffe682d9b2e8c9c583ef
Author: Ville Brofeldt <33...@users.noreply.github.com>
AuthorDate: Mon Jun 1 15:54:20 2026 -0700

    ci: preserve PR translation updates during regression checks (#40581)
---
 .github/workflows/superset-translations.yml          | 10 +++-------
 scripts/translations/check_translation_regression.py | 11 ++++++-----
 2 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/superset-translations.yml b/.github/workflows/superset-translations.yml
index 08e06e4133d..784ef1457b5 100644
--- a/.github/workflows/superset-translations.yml
+++ b/.github/workflows/superset-translations.yml
@@ -113,13 +113,9 @@ jobs:
             --translations-dir /tmp/base-worktree/superset/translations \
             > /tmp/before.json
 
-      # Reset the PR worktree's translations to the pristine BASE state so
-      # both babel_update runs start from the same .po files. The only
-      # difference between the runs is the source code.
-      - name: Reset PR worktree translations to pristine BASE
-        if: steps.check.outputs.python == 'true' || steps.check.outputs.frontend == 'true'
-        run: git checkout FETCH_HEAD -- superset/translations/
-
+      # Run babel_update against the PR source and PR translations. This keeps
+      # committed .po fixes in play while the base babel_update above still
+      # cancels out translation drift already present on the base branch.
       - name: Run babel_update against PR source
         if: steps.check.outputs.python == 'true' || steps.check.outputs.frontend == 'true'
         run: ./scripts/translations/babel_update.sh
diff --git a/scripts/translations/check_translation_regression.py b/scripts/translations/check_translation_regression.py
index 23f60bf6535..5e509bb30a9 100755
--- a/scripts/translations/check_translation_regression.py
+++ b/scripts/translations/check_translation_regression.py
@@ -44,13 +44,14 @@ Typical CI workflow
 1. Create a base-branch worktree alongside the PR worktree
 2. Run babel_update.sh in the base worktree (extract from BASE source)
 3. Record baseline:  python ... --count --translations-dir BASE_TREE > before.json
-4. Run babel_update.sh in the PR worktree (extract from PR source) starting
-   from the same pristine BASE translations
+4. Run babel_update.sh in the PR worktree (extract from PR source and keep
+   any committed PR .po updates)
 5. Compare:  python ... --compare before.json [--report report.md]
 
-Comparing two babel_update outputs that started from the same BASE .po files
-isolates regressions caused by the PR's source diff from any pre-existing
-drift on the base branch.
+Running babel_update on the base branch first isolates regressions caused by
+the PR's source diff from any pre-existing drift on the base branch, while the
+PR worktree run still allows committed .po updates to restore lost
+translations.
 """
 
 import argparse