Repository navigation
[CI] Keep Ascend mirror retry on actions/checkout - #3802
Merged
Merged
Conversation
The ghfast fallback used raw git fetch, which skipped checkout's pull_request_target fork check and ran untrusted PR heads on the privileged self-hosted job. Rewrite github.com via insteadOf and retry the same action so network failures still use the mirror. Signed-off-by: staryxchen <staryxchen@tencent.com> Co-authored-by: Cursor <cursoragent@cursor.com>
staryxchen
requested review from
Aionw,
Ann-1024,
luketong777,
stmatengss and
ykwd
as code owners
August 31, 2026 13:21
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.
Description
ci_ascend.ymlretries GitHub checkout via mirror whenactions/checkout@v4fails. That fallback used rawgit fetch, so it skipped checkout'spull_request_targetfork check (assertSafePrCheckout) and could check out an untrusted PR head into a privileged self-hosted job.This is a regression in failure meaning, not a change we made to the YAML trigger. Checkout
@v4now refuses fork PR heads underpull_request_target(backported 2026-07-16). The mirror step treated that refusal as a network failure and rescued the SHA.The retry now only rewrites
https://github.com/withurl.<mirror>.insteadOfand runsactions/checkout@v4again (nocontinue-on-error). Network failures still use the mirror; fork +pull_request_targetis rejected again and the job fails.allow-unsafe-pr-checkoutis not enabled.Submodule mirror retry and the separate xxHash missing-package failure in
mooncake-hixl-ci:v5are unchanged.Incompatible behavior
After this change, fork PRs can no longer run
ascend-test/ci_ascend. Labelingrun-e2e-cion a fork PR will fail at checkout instead of building and testing the PR head.That previously-working path was out of spec, not a supported feature. The mirror exists only to survive github.com instability on the self-hosted runner. It was never meant to bypass
actions/checkoutand execute untrusted fork code in a privileged job that inherits repository secrets. Same-repo PRs, nightly, andworkflow_dispatchon in-tree SHAs are unchanged.Module
mooncake-transfer-engine)mooncake-store)mooncake-reshard)mooncake-ep)mooncake-pg)mooncake-integration)mooncake-p2p-store)mooncake-wheel)mooncake-common)mooncake-rl)Type of Change
How Has This Been Tested?
Workflow YAML change only; Ascend self-hosted jobs are not covered by
scripts/run_ci_test.sh.Test commands:
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/ci_ascend.yml'))" pre-commit run --files .github/workflows/ci_ascend.ymlTest results:
YAML parse succeeded. pre-commit hooks on the touched file passed (trailing whitespace, EOF, check-yaml, merge conflict, large files, codespell).
Expected job behavior after merge:
insteadOf+actions/checkout@v4run-e2e-ci(pull_request_target): both checkouts refuse; job fails instead of compiling untrusted codeChecklist
./scripts/code_format.shAI Assistance Disclosure
Cursor drafted the workflow change and this PR. The submitter reviewed the checkout retry path, the
insteadOfrewrite, and the intentional fork-PR failure behavior.Made with Cursor