Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 33 additions & 26 deletions jenkins/L0_MergeRequest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -335,33 +335,40 @@ def mergeWaiveList(pipeline, globalVars)
sh "cp ${LLM_ROOT}/tests/integration/test_lists/waives.txt ./waives_CUR_${env.gitlabCommit}.txt"
sh "cp ${LLM_ROOT}/jenkins/scripts/mergeWaiveList.py ./"

// Get TOT waive list
LLM_TOT_ROOT = "llm-tot"
targetBranch = env.gitlabTargetBranch ? env.gitlabTargetBranch : globalVars[TARGET_BRANCH]
echo "Target branch: ${targetBranch}"
withCredentials([string(credentialsId: 'default-sync-llm-repo', variable: 'DEFAULT_SYNC_LLM_REPO')]) {
trtllm_utils.checkoutSource(DEFAULT_SYNC_LLM_REPO, targetBranch, LLM_TOT_ROOT, false, false)
try {
// Get TOT waive list
LLM_TOT_ROOT = "llm-tot"
targetBranch = env.gitlabTargetBranch ? env.gitlabTargetBranch : globalVars[TARGET_BRANCH]
echo "Target branch: ${targetBranch}"
withCredentials([string(credentialsId: 'default-llm-repo', variable: 'DEFAULT_LLM_REPO')]) {
trtllm_utils.checkoutSource(DEFAULT_LLM_REPO, targetBranch, LLM_TOT_ROOT, false, true)
}
targetBranchTOTCommit = sh (script: "cd ${LLM_TOT_ROOT} && git rev-parse HEAD", returnStdout: true).trim()
echo "Target branch TOT commit: ${targetBranchTOTCommit}"
sh "cp ${LLM_TOT_ROOT}/tests/integration/test_lists/waives.txt ./waives_TOT_${targetBranchTOTCommit}.txt"

// Get waive list diff in current MR
def diff = getMergeRequestOneFileChanges(pipeline, globalVars, "tests/integration/test_lists/waives.txt")

// Write diff to a temporary file to avoid shell escaping issues
writeFile file: 'diff_content.txt', text: diff

// Merge waive lists
sh """
python3 mergeWaiveList.py \
--cur-waive-list=waives_CUR_${env.gitlabCommit}.txt \
--latest-waive-list=waives_TOT_${targetBranchTOTCommit}.txt \
--diff-file=diff_content.txt \
--output-file=waives.txt
"""
trtllm_utils.uploadArtifacts("waives*.txt", "${UPLOAD_PATH}/waive_list/")
echo "New merged test waive list: https://urm.nvidia.com/artifactory/${UPLOAD_PATH}/waive_list/waives.txt"
} catch (InterruptedException e) {
throw e
} catch (Exception e) {
echo "Merge test waive list failed. Error: ${e.toString()}"
echo "Fallback to use the default test waive list from the PR"
}
targetBranchTOTCommit = sh (script: "cd ${LLM_TOT_ROOT} && git rev-parse HEAD", returnStdout: true).trim()
echo "Target branch TOT commit: ${targetBranchTOTCommit}"
sh "cp ${LLM_TOT_ROOT}/tests/integration/test_lists/waives.txt ./waives_TOT_${targetBranchTOTCommit}.txt"

// Get waive list diff in current MR
def diff = getMergeRequestOneFileChanges(pipeline, globalVars, "tests/integration/test_lists/waives.txt")

// Write diff to a temporary file to avoid shell escaping issues
writeFile file: 'diff_content.txt', text: diff

// Merge waive lists
sh """
python3 mergeWaiveList.py \
--cur-waive-list=waives_CUR_${env.gitlabCommit}.txt \
--latest-waive-list=waives_TOT_${targetBranchTOTCommit}.txt \
--diff-file=diff_content.txt \
--output-file=waives.txt
"""
trtllm_utils.uploadArtifacts("waives*.txt", "${UPLOAD_PATH}/waive_list/")
echo "New merged test waive list: https://urm.nvidia.com/artifactory/${UPLOAD_PATH}/waive_list/waives.txt"
}

def preparation(pipeline, testFilter, globalVars)
Expand Down