release-cherry-pick

작성자: nvidia

병합된 PR들 중 릴리스 브랜치로 레이블이 지정된 것들을 해당 브랜치로 체리픽한 후, PR을 열고 cherry-pick-done 레이블을 적용합니다. "체리픽 PR들..."이라는 요청을 받았을 때 사용합니다.

npx skills add https://github.com/nvidia/model-optimizer --skill release-cherry-pick

Cherry-pick PRs to a Release Branch

Cherry-pick all merged main PRs labeled cherry-pick-<version> (but not cherry-pick-done) into the corresponding release/<version> branch, one by one in merge order.

Step 1 — Identify the target version

Ask the user for the release version (e.g. 0.44.0) and target release candidate (e.g. rc2) if not already provided. Confirm whether this is the final RC.

Set VERSION=<version> for use in subsequent steps.

Step 2 — Audit candidates for missing labels

Before fetching the labeled queue, audit for missing bug fixes:

  • Non-final RC: audit release NVBugs and recent merged PRs.
  • Final RC: audit only fixes tied to NVBugs with the exact keyword Committed_ModelOpt_<VERSION> and QA-verification evidence for the fix. Verify that evidence in the NVBug or linked QA results before recommending Needs label; if missing or unclear, classify as Unknown and ask for confirmation. Skip the general recent-PR audit; do not introduce general bug-fix PRs or fixes tied only to NVBugs committed for another release.

Audit release NVBugs

Use the NVBugs MCP to search for every NVBug whose Keywords field contains the exact keyword Committed_ModelOpt_<VERSION>. Follow pagination until no next token is returned.

Fetch each matching NVBug with its comments. Extract every Model-Optimizer PR link or unambiguous PR #<NUM> reference from the comments, not only the latest comment. Keep only PRs that are merged into main, lack cherry-pick-<VERSION>, and are not already included in the release branch. Verify each remaining PR is a bug fix. The NVBug keyword is evidence for review, not by itself proof that every linked PR should be picked.

Audit recent merged PRs

For non-final RCs only: Audit PRs merged into main since the latest release candidate. Exclude PRs that already have cherry-pick-<VERSION> and changes already present on the release branch:

git fetch origin main "release/$VERSION" --tags
RC_TAG=$(git tag --merged "origin/release/$VERSION" \
  --list "${VERSION}rc*" --sort=-version:refname | head -1)
test -n "$RC_TAG" || {
  echo "No ${VERSION}rc* tag found on origin/release/$VERSION" >&2
  exit 1
}
SINCE=$(git for-each-ref --format='%(creatordate:iso-strict)' \
  "refs/tags/$RC_TAG")

PATCH_STATUS=$(git cherry "origin/release/$VERSION" origin/main)

SEARCH_RESULTS=$(
  gh search prs \
    --repo NVIDIA/Model-Optimizer \
    --merged \
    --base main \
    --merged-at ">=$SINCE" \
    --limit 1000 \
    --json number,title,author,labels,url \
    -- "-label:cherry-pick-$VERSION"
)

if test "$(jq 'length' <<<"$SEARCH_RESULTS")" -ge 1000; then
  echo "Recent-PR audit reached the 1,000-result limit" >&2
  exit 1
fi

jq -r '.[].number' <<<"$SEARCH_RESULTS" \
  | while read -r pr; do
      sha=$(gh pr view "$pr" --repo NVIDIA/Model-Optimizer \
        --json mergeCommit --jq '.mergeCommit.oid')
      if grep -q "^+ $sha$" <<<"$PATCH_STATUS"; then
        gh pr view "$pr" --repo NVIDIA/Model-Optimizer \
          --json number,title,author,labels,url
      fi
    done

A release is not normally expected to reach the 1,000-PR limit.

Review each PR's title, body, labels, changed files, and linked issue context. Classify it as:

  • Yes — repairs incorrect behavior, a regression, crash, compatibility problem, or documentation defect relevant to the release.
  • No — feature, refactor, cleanup, dependency refresh, or other change not needed to correct the release.
  • Unclear — insufficient evidence or meaningful backport risk; ask the user.

Deduplicate PRs found through both audits.

Report and label

Present the complete audit before changing GitHub labels:

PRTitleAuthorNVBug(s)Bug fix?cherry-pick-<VERSION> present?Recommendation

Use these recommendation values and sort the table in this order:

  1. Needs label — confirmed release-relevant bug fix.
  2. Unknown — requires user judgment.
  3. No action needed — not a release-relevant bug fix.

Use — when no NVBug is known. Also list NVBugs with no linked PR. Ask the user to confirm which recommended PRs should receive the missing label. After confirmation, apply it:

for pr in <APPROVED_NUMBERS>; do
  gh pr edit "$pr" --repo NVIDIA/Model-Optimizer --add-label "cherry-pick-$VERSION"
done

Do not label unmerged PRs, PRs not based on main, or candidates classified Unclear without explicit approval. Re-run the audit table after edits so it reflects the final label state.

Step 3 — Fetch pending PRs

Use the GitHub search API to list PRs that have the cherry-pick label but not cherry-pick-done, sorted by merge date ascending:

gh api "search/issues?q=repo:NVIDIA/Model-Optimizer+is:pr+is:merged+base:main+label:cherry-pick-<VERSION>+-label:cherry-pick-done&sort=updated&order=asc&per_page=50" \
  --jq '.items[] | [.number, .title, .pull_request.merged_at] | @tsv' \
  | sort -t$'\t' -k3

Present the list to the user before proceeding.

Step 4 — Set up the release branch

Check out release/<VERSION>, creating it from the remote if it doesn't exist locally:

git fetch origin release/<VERSION>
git checkout release/<VERSION>

Step 5 — Get merge commit SHAs

All PRs are squash-merged, so each has a single-parent commit. Retrieve the SHA for each PR:

gh pr view <NUM> --repo NVIDIA/Model-Optimizer --json mergeCommit --jq '.mergeCommit.oid'

Step 6 — Cherry-pick in merge order

Cherry-pick each commit with -s (DCO sign-off). GPG signing is handled automatically by the repo's git config.

git cherry-pick -s <SHA>

On conflict: Tell the user which PR caused the conflict and ask them to fix it, then continue:

git cherry-pick --continue

Step 7 — Create a PR to the release branch

Push the cherry-picks to a new branch and open a PR targeting release/<VERSION>. The PR title lists every cherry-picked PR number. The body uses ## Cherry-picked PRs as the only heading with one - #<NUM> bullet per PR — no titles, no links, no extra text.

git checkout -B cherry-picks/release-<VERSION>
git push -u origin cherry-picks/release-<VERSION>

gh pr create \
  --title "[Cherry-pick] PRs #<NUM1> #<NUM2> ..." \
  --base release/<VERSION> \
  --head cherry-picks/release-<VERSION> \
  --body "$(cat <<'EOF'
## Cherry-picked PRs

- #<NUM1>
- #<NUM2>
...
EOF
)"

Step 8 — Apply cherry-pick-done label

Add the cherry-pick-done label to every PR that was successfully cherry-picked:

for pr in <NUM1> <NUM2> ...; do
  gh pr edit $pr --repo NVIDIA/Model-Optimizer --add-label "cherry-pick-done"
done

nvidia의 다른 스킬

fhir-basics
nvidia
에이전트에게 FHIR R4 API의 작동 방식, 사용 가능한 리소스, 검색 매개변수를 사용한 쿼리 방법, 모든 응답 형식을 올바르게 파싱하는 방법을 가르칩니다…
compileiq-validate-result
nvidia
검색이 완료된 후, 속도 향상을 청구하거나 ACF를 발송하기 전에 사용합니다. dump_results CSV를 로드하고, 상위 K개 후보(단일 목표)를 추출합니다…
changelog-audit
nvidia
릴리스 전에 Warp CHANGELOG.md를 감사합니다: 누락된 항목 복구, 사용자 영향별 정렬, 항목 언어 다듬기, 줄 바꿈, (릴리스 브랜치 모드) 비교 업데이트…
dgx-diagnose
nvidia
일반적인 DGX Station GB300 문제 진단 — CUDA 충돌, 잘못된 GPU 타겟팅, vLLM/SGLang 컨테이너 버그, MIG 상태 문제, NVLink/Fabric Manager 오류,…
aicr-managing-openvex
nvidia
Use when adding, updating, or removing CVE/GHSA suppressions in `.openvex.json` — the OpenVEX document consumed by the daily image vulnerability scan workflow.…
aicr-creating-slide-decks
nvidia
기술 개념이나 워크플로우에 대한 독립형 HTML 슬라이드 덱 또는 시각적 발표 자료(예: demos/*.html)를 만들 때 사용하세요. 전체 화면으로 표시하거나…
aicr-creating-guided-demos
nvidia
대화형 안내 데모 스크립트(demos/*.sh)를 라이브 또는 자기 주도 방식으로 Frame → Tell → Show → Close 패턴에 따라 구조화한다. "데모 스크립트", "안내…"와 같은 표현에 반응한다.
aicr-analyzing-snapshots
nvidia
AICR 스냅샷 YAML 파일을 분석하거나, 클러스터 상태를 검토하거나, 공급자 특성을 비교하거나, GPU/네트워크 토폴로지 인사이트를 추출할 때 사용합니다...