Skip to content

feat(sync): re-trigger Evergreen on downstream PRs after sync#42

Merged
aclark4life merged 1 commit into
mainfrom
feat/sync-evergreen-retry
Jul 13, 2026
Merged

feat(sync): re-trigger Evergreen on downstream PRs after sync#42
aclark4life merged 1 commit into
mainfrom
feat/sync-evergreen-retry

Conversation

@aclark4life

Copy link
Copy Markdown
Collaborator

Summary

Adds Evergreen re-triggering to dbx sync's downstream-CI step. Like the GitHub Actions workflows, Evergreen's PR patch checks out the fork branch at a pinned ref, so a rebased (force-pushed) fork branch never re-runs Evergreen on its own — the gap seen in mongodb/django-mongodb-backend#422 where Actions re-run but Evergreen tasks don't.

Mechanism

Posts an evergreen retry comment on the PR via gh pr comment — the supported keyword Evergreen watches for (aborts the existing patch for the head SHA and starts a fresh one). Reuses the existing gh tooling; no Evergreen token or CLI required.

Config

New object form on ci_rerun targets (bare-int and string-ref forms unchanged):

[repo.groups.django.ci_rerun.django]
"mongodb-6.2.x" = {"mongodb/django-mongodb-backend" = {pr = 535, evergreen = true}}

Re-runs the PR's Actions runs (as the bare int did) and comments evergreen retry. Gated by the same --no-ci flag.

Changes

  • utils/repo.py: get_ci_rerun_targets parses the dict form, returns an evergreen_prs subset alongside prs/refs.
  • commands/sync.py: new _retry_evergreen helper (best-effort, never fails the sync) wired into _rerun_downstream_ci; --no-ci help updated.
  • docs/features/django-fork.rst: object form, sample output, comment mechanism documented.
  • tests/test_repo.py: test_repo_sync_all_branches_retries_evergreen.

All 431 tests pass; ruff clean.

Like GitHub Actions, Evergreen's PR patch checks out the fork branch at a
pinned ref, so force-pushing a rebased fork branch does not re-run Evergreen
on its own. Extend the ci_rerun mapping with an object form
{pr = <n>, evergreen = true} that re-runs the PR's Actions runs (as the bare
int already did) AND posts an 'evergreen retry' comment on the PR to
re-trigger its Evergreen patch. Uses the existing gh CLI (no Evergreen token
needed) and is gated by the same --no-ci flag. Best-effort: never fails sync.
@aclark4life
aclark4life merged commit 3e8215a into main Jul 13, 2026
@aclark4life
aclark4life deleted the feat/sync-evergreen-retry branch July 13, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant