Add drivers-github-tools action to re-trigger downstream CI after a fork-branch force-push

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: django
    • None
    • None
    • Python Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      The upstream-sync.yml workflow in our django fork keeps each mongodb-X.Y.x fork branch current with upstream Django.

      django-mongodb-backend's CI checks out one of these fork branches by ref e.g. mongodb-6.0.x and runs its test suites against it.

      Nothing signals the backend that its dependency changed, so its CI does not re-run on its own. A rebase can pull in upstream changes that break the backend, and without a fresh run against the new commits, nobody would notice.

      Definition of done

      Add a reusable composite action in mongodb-labs/drivers-github-tools that takes two inputs: the downstream repo to re-trigger, and a ci_rerun spec describing how. The spec is a small JSON object, {"kind": ...}, with three kinds:

      • evergreen:  post an evergreen retry comment on a backend PR, nudging Evergreen to re-run its patch.
      • pr: re-queue the GitHub Actions runs on a backend PR's head commit.
      • ref: dispatch the backend's test-python* workflows on a branch (a dispatchable ref, i.e. branch or tag — not a SHA).

      This action should create a backend-scoped GitHub App token internally via actions/create-github-app-token, so callers pass only app_id / private_key and never handle a raw cross-repo token themselves.

      The ci_rerun values are already defined per-branch in upstream-sync.yml's matrix:

      • e.g. mongodb-6.1.x → {"kind":"evergreen","pr":422}). 

      The action will accept that exact format as its input contract, so those values pass through unchanged.

      Once the action is merged configure upstream-sync.yml to use it.

      Pitfalls

      Conceptual complexity.

            Assignee:
            Unassigned
            Reporter:
            Alex Clark
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: