KAFKA-19768: Update ci-complete to support branch 4.0 buildscan upload #20805
+42
−18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, if we merge to the 4.0 branch, the
CIworkflow in branch4.0will be triggered. After the 4.0CIfinishes, it triggersthe
ci-complete.ymlworkflow in thetrunkbranch. However, theJDK version, Gradle version and the names of the build scan files
differ (due to
KAFKA-18748), so
the trunk
ci-complete.ymlcannot find the correct BuildScan filesgenerated by
4.0CI workflow to upload to Develocity.To address this, I added a job in
ci-completeto first retrieve allBuildScan file names that start with
build-scan-, then create a jobfor each file, extract the java version from the name, and finally
upload the corresponding BuildScan. The reason I chose not to detect the
target branch is that this information cannot be obtained from the
GitHub environment (see details in JIRA
KAFKA-19768).
There is a potential issue with using Gradle 9 to upload Gradle 8
buildScan archives to Develocity, I am not sure if it will work because
I don't have access to a Develocity server to test it. I could only find
the compatibility table for Develocity plugin and Gradle versions.
https://docs.gradle.com/develocity/compatibility/#build_scans
I have tested this in my forked repo. There are two
ci-completerunsin the following, one for the
trunkbuild, and the other for a PRmerged into the
4.0branch. Each run can obtain its correspondingBuildScan
files and execute them. The Gradle task
buildScanPublishPreviousfailsas expected due to the lack of a Develocity access token.
Found: ["build-scan-25-noflaky-new","build-scan-17-noflaky-new","build-scan-17-flaky-nonew","build-scan-25-flaky-nonew","build-scan-17-noflaky-nonew","build-scan-25-noflaky-nonew"]Found: ["build-scan-quarantined-test-23","build-scan-quarantined-test-17","build-scan-test-23","build-scan-test-17"]