From 06d2a8e40b9109ad723568063b704a49db972a54 Mon Sep 17 00:00:00 2001 From: Steve Bronder Date: Wed, 9 Sep 2026 11:16:20 -0400 Subject: [PATCH 1/3] Remove flaky performance comments from other pull requests --- Jenkinsfile | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 78b1dd8..4c7f8eb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -71,12 +71,6 @@ catchError { junit '*.xml' archiveArtifacts '*.xml' } - - } else { - stage("Test cmdstan develop against cmdstan pointer in this branch") { - sh "./compare-git-hashes.sh stat_comp_benchmarks develop ${params.cmdstan_pr} ${params.stan_pr} ${params.math_pr} '$stanc3_bin_url'" - buildInfo["table"] = sh(returnStdout: true, script: "./comparePerformance.py develop_performance.csv performance.csv md") - } } } @@ -118,11 +112,6 @@ catchError { } } } - else { - postComment("cmdstan", params.cmdstan_pr, buildInfo) - postComment("stan", params.stan_pr, buildInfo) - postComment("math", params.math_pr, buildInfo) - } } emailFailure() From d72572f80dc6c96b881ada545f221503eb6a927a Mon Sep 17 00:00:00 2001 From: Steve Bronder Date: Wed, 9 Sep 2026 11:34:20 -0400 Subject: [PATCH 2/3] Fix typo in downstream parameter name --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4c7f8eb..b89fd14 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,7 +7,7 @@ properties([ string(defaultValue: 'develop', name: 'math_pr', description: "Math PR to test against. Will check out this PR in the downstream Math repo."), string(defaultValue: 'nightly', name: 'stanc3_bin_url', description: 'Custom stanc3 binary url'), booleanParam(name:"update_golds", defaultValue: false, description:"Update golds"), - booleanParam(defaultValue: false, name: 'downsteam', description: 'Run downstream tests from cmdstan (was previously downstream_tests [master])'), + booleanParam(defaultValue: false, name: 'downstream', description: 'Run downstream tests from cmdstan (was previously downstream_tests [master])'), ]) ]) @@ -80,8 +80,9 @@ catchError { checkout scm writeFile(file: "cmdstan/make/local", text: "PRECOMPILED_HEADERS=False CXXFLAGS += -march=core2 \n$stanc3_bin_url\n") def cmd = 'python3 runPerformanceTests.py --runs 3 --check-golds --name=known_good_perf --tests-file=known_good_perf_all.tests -j$PARALLEL' - if (params.update_golds) + if (params.update_golds) { cmd += ' --runj 8 --overwrite' + } sh cmd junit '*.xml' archiveArtifacts '*.xml' From 218a8d88a9ac67bff017b4b970ec01fcbecfe3fa Mon Sep 17 00:00:00 2001 From: Dylan Simon Date: Wed, 9 Sep 2026 11:46:31 -0400 Subject: [PATCH 3/3] jenkins: further cleanups if not posting comments --- Jenkinsfile | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b89fd14..0f94990 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,52 +14,8 @@ properties([ def isPrimary = !params.downstream && (env.BRANCH_NAME == "master" || env.BRANCH_NAME == "jenkins-new") && params.cmdstan_pr == "develop" def stanc3_bin_url = params.stanc3_bin_url != "nightly" ? "STANC3_TEST_BIN_URL=${params.stanc3_bin_url}" : '' -def buildInfo = [:] - -def postComment(String repo, String pr, Map info) { - if (pr.startsWith("PR-")) { - def prn = pr.drop(3) - def comment = """ -${info["table"]} -[Jenkins Console Log](${env.JENKINS_URL}job/CCM/job/Stan/job/$repo/view/change-requests/job/$pr/lastBuild/console) -[Jenkins Build Stages](${env.JENKINS_URL}job/CCM/job/Stan/job/$repo/view/change-requests/job/$pr/lastBuild/stages/) -Commit hash: ${info["hash"]} -
Machine information -
${info["system"]["sys_ver"]}
- -CPU: -
${info["system"]["cpu"]}
- -G++: -
${info["system"]["gpp"]}
- -Clang: -
${info["system"]["clang"]}
- -
-""" - withCredentials([usernamePassword(usernameVariable: 'GITHUB_USER', passwordVariable: 'GITHUB_TOKEN', credentialsId: 'stan-github')]) { - httpRequest url:"https://api.github.com/repos/stan-dev/$repo/issues/$prn/comments", - httpMode: 'POST', - contentType: 'APPLICATION_JSON', - customHeaders: [[maskValue: true, name: 'Authorization', value: 'token ' + GITHUB_TOKEN]], - requestBody: writeJSON(returnText: true, json: [body: comment]) - } - } -} - catchError { runPod(image: "stanorg/ci:gpu", memory: "64Gi") { - stage('Gather machine information') { - buildInfo["hash"] = sh(returnStdout: true, script: "git rev-parse HEAD").trim() - buildInfo["system"] = [ - "cpu": sh(returnStdout: true, script: "lscpu"), - "sys_ver": sh(returnStdout: true, script: "lsb_release -a"), - "gpp": sh(returnStdout: true, script: "g++ --version"), - "clang": sh(returnStdout: true, script: "clang --version") - ] - } - if (isPrimary) { stage('Shotgun Performance Regression Tests') { sh "make clean"