yashmayya commented on code in PR #18597:
URL: https://github.com/apache/pinot/pull/18597#discussion_r3312850067
##########
compatibility-verifier/checkoutAndBuild.sh:
##########
@@ -70,49 +70,86 @@ function checkOut() {
# dedicated maven cache for these builds, and remove the cache after build is
# completed.
# If buildId is less than 0, then the mvn version is not changed in pom files.
+function installPinotBom() {
+ local outFile=$1
+ local repoDir=$2
+ local repoOption=$3
+ local maxRetry=$4
+
+ if [ ! -f "pinot-bom/pom.xml" ]; then
+ return
+ fi
+
+ for i in $(seq 1 $maxRetry); do
+ mvn -U -f pinot-bom/pom.xml install -DskipTests -q -B ${repoOption}
${PINOT_MAVEN_OPTS} 1>>${outFile} 2>&1
+ if [ $? -eq 0 ]; then break; fi
+ if [ $i -eq $maxRetry ]; then exit 1; fi
+ echo ""
+ echo "Pinot BOM install failed, see last 200 lines of output below."
+ tail -200 ${outFile}
+ echo "Retrying after 30 seconds..."
+ find "${repoDir}" -name "*.lastUpdated" -delete 2>/dev/null || true
+ sleep 30
+ done
+}
+
function build() {
local outFile=$1
local buildTests=$2
local buildId=$3
local buildCompatibilityVerifier=$4
- local repoOption=""
local versionOption="-Djdk.version=21"
local maxRetry=5
+ local repoId=${buildId}
mkdir -p ${MVN_CACHE_DIR}
mkdir -p ${mvnCache}
+ if [ ${repoId} -le 0 ]; then
+ repoId="current"
+ fi
+ local repoDir="${mvnCache}/${repoId}"
+ mkdir -p "${repoDir}"
+ local repoOption="-Dmaven.repo.local=${repoDir}"
+
+ installPinotBom "${outFile}" "${repoDir}" "${repoOption}" "${maxRetry}"
if [ ${buildId} -gt 0 ]; then
# Build it in a different env under different version so that maven cache
does
# not collide
local pomVersion=$(grep -E "<version>(.*)-SNAPSHOT</version>" pom.xml |
cut -d'>' -f2 | cut -d'<' -f1 | cut -d'-' -f1)
- mvn versions:set -DnewVersion="${pomVersion}-compat-${buildId}" -q -B
1>${outFile} 2>&1
- mvn versions:commit -q -B 1>${outFile} 2>&1
- repoOption="-Dmaven.repo.local=${mvnCache}/${buildId}"
+ mvn -U versions:set -DnewVersion="${pomVersion}-compat-${buildId}" -q -B
${repoOption} ${PINOT_MAVEN_OPTS} 1>${outFile} 2>&1 || exit 1
+ mvn -U versions:commit -q -B ${repoOption} ${PINOT_MAVEN_OPTS}
1>${outFile} 2>&1 || exit 1
Review Comment:
`versions:commit` here re-reads the *rewritten* root pom, which imports
`pinot-bom:${project.version}` — now `...-compat-${buildId}`. But the bom isn't
bumped + installed at that version until the block right below (122-126), so
commit fails with `Non-resolvable import POM ... pinot-bom:...-compat-...`.
That's exactly the error the *Compatibility Regression against master* job hits
on this PR, so the new `installPinotBom` path never actually runs.
The bom `versions:set` + `installPinotBom` need to move *above* this commit.
Reordering to set+install the bom right after the root `versions:set`, then
commit, fixes it (reproduced + verified locally). Alternatively, drop
`versions:commit` and pass `-DgenerateBackupPoms=false` on the root
`versions:set`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]