Skip to content

THRIFT-5967: Parallelize static code analysis run on GitHub#3443

Merged
kpumuk merged 1 commit intoapache:masterfrom
kpumuk:sca-parallel
May 3, 2026
Merged

THRIFT-5967: Parallelize static code analysis run on GitHub#3443
kpumuk merged 1 commit intoapache:masterfrom
kpumuk:sca-parallel

Conversation

@kpumuk
Copy link
Copy Markdown
Member

@kpumuk kpumuk commented May 3, 2026

Currently SCA job runs as a single monolythic workflow, with each job checking different libraries separately. Jobs are allowed to fail, and there is a final summary job that check the status of each other job and fails if any failed. This makes it a little bit hard to read, makes the job slower, and somewhat hard to add new languages.

This pull request follows the similar structure we have in our build.yml - each language gets its own job, that depends on compiler build (used to generate thrift and verify generated code to follow the same rules as the library itself).

CleanShot 2026-05-03 at 13 15 28@2x

The time went down from 7m4s to 6m45s, which is not very significant, but that's pretty much a cap - compiler + cppcheck for C++ library, and the rest of the languages will finish in parallel before that, so it will never take longer. The old workflow would keep increasing the total time.

Additionally, replaces sloccount with scc, as it does not know the modern PHP syntax and was spitting lots of noise in the output:

Warning! Unclosed PHP file /home/runner/work/thrift/thrift/lib/php/test/Unit/Lib/Transport/TransportErrorScenariosTest.php, mode=1
Warning! Unclosed PHP file /home/runner/work/thrift/thrift/lib/php/test/Unit/Lib/Serializer/TBinarySerializerTest.php, mode=1

Nice and pretty now with https://github.com/apache/thrift/actions/runs/25285416874/job/74129027301

  • Did you create an Apache Jira ticket? THRIFT-5967
  • If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?
  • Did you squash your changes to a single commit? (not required, but preferred)
  • Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"?
  • If your change does not involve any code, include [skip ci] anywhere in the commit message to free up build resources.

@mergeable mergeable Bot added the github_actions Pull requests that update GitHub Actions code label May 3, 2026
Comment thread .github/workflows/sca.yml
@kpumuk kpumuk changed the title Parallelize static code analysis run on GitHub THRIFT-5967: Parallelize static code analysis run on GitHub May 3, 2026
@kpumuk kpumuk marked this pull request as ready for review May 3, 2026 18:08
@kpumuk kpumuk requested review from Jens-G, fishy and jimexist as code owners May 3, 2026 18:08
@kpumuk
Copy link
Copy Markdown
Member Author

kpumuk commented May 3, 2026

Created an umbrella ticket https://issues.apache.org/jira/browse/THRIFT-5966 to add SCA for other libraries.

@kpumuk kpumuk merged commit 1668e19 into apache:master May 3, 2026
92 of 93 checks passed
@kpumuk kpumuk deleted the sca-parallel branch May 3, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants