Skip to content

generateTranslations runs on merges #70895

Closed

Description

@roryabraham

Problem

When you merge main into your PR branch, and main has changes in en.ts, translations will run on your PR, even though you didn't push any changes originating from your branch or PR.

Solution

The "traditional" solution to this is to find the merge-base between your PR head and the base branch, and then do a diff between your PR head and the merge base. The problem is that takes too long, because there's no efficient way to know how far back in the history you need to search to find the merge base.

This is a common problem, and in other repos we solve it by either:

  • using fetch-depth: 0, which in E/App takes 3+ minutes
  • using fetch-depth: 100, which is still kind of slow, but more importantly might arbitrarily not be deep enough.

I am cooking up a better solution.

Activity

  1. self-assigned this
    on Sep 19, 2025
  2. roryabraham commented on Sep 20, 2025

    @roryabraham
    ContributorAuthor

    This ended up being a harder problem to solve than I imagined, but it's a common problem and the solution I came up with should be reusable for other similar needs in the future

  3. roryabraham commented on Sep 23, 2025

    @roryabraham
    ContributorAuthor

    Have a draft PR ready for this. It probably works but I think the best way to test will be in App-Test-Fork (or maybe just well-crafted automated tests)

  4. roryabraham commented on Sep 26, 2025

    @roryabraham
    ContributorAuthor

    Started creating automated tests. Merging #71246 created non-trivial conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ImprovementItem broken or needs improvement.ReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions