Skip to content

Commit acdaf76

Browse files
authored
[CI] Main2main fall back to fresh mode when target commit is behind baseline (vllm-project#12376)
### What this PR does / why we need it? A manual workflow_dispatch specifies a TARGET_COMMIT that is older than the baseline's already-verified VLLM commit, the baseline's adapted code (which targets a newer VLLM) would produce incorrect version guards for the older target. Detect this with merge-base --is-ancestor and force a fresh start from upstream/main instead. ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? - vLLM version: v0.24.0 - vLLM main: vllm-project/vllm@85c09e9 Signed-off-by: wjunLu <wjunlu217@gmail.com>
1 parent c6be875 commit acdaf76

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/schedule_main2main.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,21 @@ jobs:
279279
git fetch upstream main
280280
git checkout -B "${BRANCH}" origin/main2main_baseline
281281
if git rebase upstream/main; then
282-
echo "::notice::incremental mode: rebased main2main_baseline onto upstream/main"
282+
# If a specific TARGET_COMMIT was set (e.g. manual dispatch) and
283+
# it is older than what the baseline already verified, the
284+
# baseline's version guards would be wrong for this older vllm
285+
# commit. Fall back to fresh mode in that case.
286+
if [ -n "${TARGET_COMMIT}" ]; then
287+
BASELINE_VLLM=$(cat .github/vllm-main-verified.commit 2>/dev/null || echo "")
288+
if [ -n "${BASELINE_VLLM}" ] && git -C vllm-upstream merge-base --is-ancestor "${TARGET_COMMIT}" "${BASELINE_VLLM}" 2>/dev/null; then
289+
git checkout -B "${BRANCH}" upstream/main
290+
echo "::warning::target commit ${TARGET_COMMIT} is behind baseline verified commit ${BASELINE_VLLM}, forcing fresh mode"
291+
else
292+
echo "::notice::incremental mode: rebased main2main_baseline onto upstream/main"
293+
fi
294+
else
295+
echo "::notice::incremental mode: rebased main2main_baseline onto upstream/main"
296+
fi
283297
else
284298
git rebase --abort
285299
git checkout -B "${BRANCH}" upstream/main

0 commit comments

Comments
 (0)