feat(sync): re-trigger Evergreen on downstream PRs after sync#42
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 retrycomment on the PR viagh pr comment— the supported keyword Evergreen watches for (aborts the existing patch for the head SHA and starts a fresh one). Reuses the existingghtooling; no Evergreen token or CLI required.Config
New object form on
ci_reruntargets (bare-int and string-ref forms unchanged):Re-runs the PR's Actions runs (as the bare int did) and comments
evergreen retry. Gated by the same--no-ciflag.Changes
utils/repo.py:get_ci_rerun_targetsparses the dict form, returns anevergreen_prssubset alongsideprs/refs.commands/sync.py: new_retry_evergreenhelper (best-effort, never fails the sync) wired into_rerun_downstream_ci;--no-cihelp 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.