Hi all,

Thanks, Chris, for raising this, and thanks, Yuan, for fixing the PR analysis 
and `master` scans in #19355. We’re looking into how to give contributors the 
same SonarCloud feedback on PRs opened from forks. GitHub runs those PR 
workflows without repository secrets, so IoTDB currently skips the SonarCloud 
job for them. [IoTDB #19355](https://github.com/apache/iotdb/pull/19355)

- **Apache Kvrocks** uploads build and coverage data from its PR workflow. A 
second workflow, triggered by `workflow_run`, picks up the artifacts and runs 
SonarCloud. Its fork PR #3403 received a Quality Gate result on the original 
PR. [Build 
workflow](https://github.com/apache/kvrocks/blob/unstable/.github/workflows/kvrocks.yaml#L467-L480)
 · [Scan 
workflow](https://github.com/apache/kvrocks/blob/unstable/.github/workflows/sonar.yaml)
 · [PR 
result](https://github.com/apache/kvrocks/pull/3403#issuecomment-4146427935)
- **Apache Nutch** uses the same pattern for Java. Its PR workflow uploads 
compiled classes, JaCoCo coverage, and JUnit reports. The follow-up workflow 
uses those artifacts and passes the original PR number to SonarScanner. [Build 
workflow](https://github.com/apache/nutch/blob/master/.github/workflows/master-build.yml#L399-L441)
 · [Scan 
workflow](https://github.com/apache/nutch/blob/master/.github/workflows/sonarcloud.yml)

For IoTDB, we’d run Maven in the fork PR workflow and upload the compiled 
classes and dependencies. The upstream `workflow_run` job would use the 
existing SonarCloud token only for the scan, passing the original PR number and 
commit SHA so the result appears on that PR. We’ve verified the Maven build and 
artifact handling locally. The remaining check is end-to-end reporting on a 
real fork PR.

Chris and Yuan, do you see any concerns with this approach? If there are no 
objections, we’ll open a PR for review.

Thanks,  
Haonan

On 2026/11/23 06:20:56 Yuan Tian wrote:
> Hi Chris,
> 
> I've just merged my PR. I think Sonar now only checks the diff, so if it
> fails, we need to fix it before we can merge that pr.
> 
> Best regards,
> ---------------------
> Yuan Tian
> 
> 
> On Fri, Nov 20, 2026 at 8:36 PM Christofer Dutz via dev <
> [email protected]> wrote:
> 
> > Hi all,
> >
> > this has now happened multiple times over the last few weeks.
> > I create a PR and it goes red because of sonarcube finding which were on
> > master from the beginning and then they are not addressed immediately.
> > I think in one case I simply provided a PR to fix them as nobody seems to
> > have been fixing them.
> >
> > This is not how CI should be done.
> >
> > Either a red build needs to get fixed as soon as possible or we should
> > probably disable the SonarCloud checks.
> >
> > What's your opinion on this?
> >
> > I think a constantly red CI pipeline makes people ignore build-failure
> > emails ... we've had the same in PLC4X and I would prefer to not live with
> > that for so long.
> >
> > Chris
> 

Reply via email to