Repository navigation
Conversation
❌ ErrorsYour PR has failed checks. Please review the issues below and take necessary action before merging. 🚦 1 Pipeline job failed
Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: 82dff6d | Docs | View more details | Give us feedback! |
| - name: Install analyzer-wire | ||
| run: bash ./.github/scripts/install-analyzer-wire.sh | ||
| - uses: SonarSource/ci-github-actions/build-maven@v2 |
There was a problem hiding this comment.
⚠️ Bug: Other full-reactor jobs still don't install analyzer-wire
This commit adds the install-analyzer-wire.sh step only to the build and qa-os-win jobs. Several other jobs also resolve the root reactor, which now includes java-frontend-semsitter (pom.xml:54) and depends on org.sonarsource.semsitter:analyzer-wire:2.0.0:
test-analyzerunsbuild-maven@v2on the whole project (build.yml:359).custom-rules-license-checkrunslicense-maven-plugin:aggregate-add-third-partyfrom the repo root (build.yml:420), which resolves the dependencies of every module.- The scheduled
unified-dogfooding.ymlbuild runsbuild-maven@v2on the full reactor (unified-dogfooding.yml:24).
The new step exists because Maven can't resolve the jar from the configured repositories. These jobs will hit the same dependency-resolution error, and since promote needs test-analyze and custom-rules-license-check, a PR build will fail to promote. Fix: add Install analyzer-wire to each of these jobs. In test-analyze and unified-dogfooding, add a config-maven step first so ARTIFACTORY_* is set, as done in build.
Add the install step to custom-rules-license-check (after config-maven), and add config-maven plus the install step before build-maven in test-analyze and unified-dogfooding:
- name: Configure Maven
uses: SonarSource/ci-github-actions/config-maven@v2
with:
repox-url: https://repox-internal.dev.sonar.build
artifactory-reader-role: private-reader
use-develocity: ${{ env.USE_DEVELOCITY }}
develocity-url: ${{ env.DEVELOCITY_URL }}
- name: Install analyzer-wire
run: bash ./.github/scripts/install-analyzer-wire.sh
- Apply fix
Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎
| base="${ARTIFACTORY_URL}/sonarsource-public-qa/org/sonarsource/semsitter/analyzer-wire/2.0.0" | ||
| dest="${RUNNER_TEMP}/analyzer-wire" | ||
| mkdir -p "$dest" | ||
| curl -fsS -u "${ARTIFACTORY_USERNAME}:${ARTIFACTORY_ACCESS_TOKEN}" \ | ||
| -o "$dest/analyzer-wire-2.0.0.pom" "$base/analyzer-wire-2.0.0.pom" | ||
| curl -fsS -u "${ARTIFACTORY_USERNAME}:${ARTIFACTORY_ACCESS_TOKEN}" \ | ||
| -o "$dest/analyzer-wire-2.0.0.jar" "$base/analyzer-wire-2.0.0.jar" | ||
| mvn -B org.apache.maven.plugins:maven-install-plugin:3.1.2:install-file \ | ||
| -Dfile="$dest/analyzer-wire-2.0.0.jar" \ | ||
| -DpomFile="$dest/analyzer-wire-2.0.0.pom" |
There was a problem hiding this comment.
💡 Quality: analyzer-wire version is hard-coded separately from pom.xml
The script hard-codes 2.0.0 in the URL and file names. The version Maven actually resolves is declared separately in dependencyManagement (pom.xml:344-346). If the pom version is bumped and the script is not, CI installs the stale 2.0.0 jar and the build still fails to resolve the new version. Fix: put the version in a single variable, or read it from the pom (e.g. mvn help:evaluate), and pass it to the script.
Parameterize the version so it can be passed in (or derived from the pom) in one place:
version="${ANALYZER_WIRE_VERSION:-2.0.0}"
base="${ARTIFACTORY_URL}/sonarsource-public-qa/org/sonarsource/semsitter/analyzer-wire/${version}"
dest="${RUNNER_TEMP}/analyzer-wire"
mkdir -p "$dest"
for ext in pom jar; do
curl -fsS -u "${ARTIFACTORY_USERNAME}:${ARTIFACTORY_ACCESS_TOKEN}" \
-o "$dest/analyzer-wire-${version}.${ext}" "$base/analyzer-wire-${version}.${ext}"
done
- Apply fix
Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎
… dependencies Test Analyze builds with the Maven setup that only sees the sonarsource repository, where analyzer-wire 2.0.0 is not published.
f550b6f to
82dff6d
Compare
CI failed: The Test Analyze job (136233007191) failed because the SonarScanner's request for the provisioned JRE from the SonarQube server timed out, which looks like a server or network availability problem. The finding is not attributed to this PR, though the log alone does not fully rule out other causes.OverviewThe Test Analyze job (136233007191) failed because the SonarScanner's request for the provisioned JRE from the SonarQube server timed out, which looks like a server or network availability problem. The finding is not attributed to this PR, though the log alone does not fully rule out other causes. FailuresTest Analyze job: SonarScanner timed out downloading provisioned JRE from SonarQube (not related to PR)
Summary
Code Review
|
| Auto-apply | Compact | Unblock |
|
|
|
Was this helpful? React with 👍 / 👎 | Gitar
Part 1 of 2 split from #6533.
New Maven module
java-frontend-semsitter, next to the ECJ-basedjava-frontend. Nothing depends on it yet. It will host the SemSitter front-end so the two can be switched behind a feature flag later.The data model is not defined here. It is the jar
org.sonarsource.semsitter:analyzer-wire:2.0.0, generated in SemSitter fromanalyzer.proto(SonarSource/semsitter#5821). This module depends on that jar. There is no copy of the proto and no submodule.Documentis fully protobuf: tree, symbols, reference facts and graph facts. Control lines and theget-typespayload stay JSON, and that is the client's job in #6542.CI of this PR resolves the jar only after
analyzer-wire2.0.0 is published.Summary by Gitar
install-analyzer-wire.shto fetch and installanalyzer-wire2.0.0 from Artifactory before buildsbuild.ymljava-frontend-semsittermodule andanalyzer-wireversion in rootpom.xmlProtocolTestcoveringDocumentandStringListprotobuf round tripsThis will update automatically on new commits.