[improve][ci] Support smaller runners and restricted fork environments - #26558
Merged
Conversation
Select a smaller Gradle memory profile on 8 GiB Linux runners, expose test JVM settings, and retain heap dumps. Keep external build scans off for non-public repositories and make CodeQL optional where it requires repository enablement. Declare the token permissions used by CI jobs instead of depending on repository defaults. Assisted-by: Codex
lhotari
requested review from
Technoboy-,
dao-jun,
david-streamlio,
merlimat and
nodece
September 12, 2026 20:08
Distinguish candidate class batching from later TestNG group and wildcard filtering. Assisted-by: Codex
merlimat
approved these changes
Sep 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
Pulsar CI should also run in forks with smaller runners and restrictive default workflow permissions. A 4 GB Gradle heap plus up to four test JVMs leaves too little headroom on an 8 GB runner. Private repositories also need usable defaults when external build scans or GitHub CodeQL are unavailable.
The permissions case described in #22568 still applies: enterprise policy can enforce read-only default token permissions, while individual workflows can explicitly request their required scopes.
Modifications
/tmp. Preserve XML-suite, profiling and task-specific isolation settings.CI_ENABLE_CODEQL=true.CONTRIBUTING.md.Verifying this change
Fork CI: lhotari/pulsar#267. The build/license and flaky-test jobs passed. The connector process system-test job failed; other jobs are still running.
Local validation:
assemble quickCheck spotlessCheck checkstyleMain checkstyleTestpassed with a 2 GB Gradle heap and two workers.ConcurrentLongHashMapTestandConcurrentLongPairSetTest, using a 1100 MB test heap and one class per test worker.assembleand 21 selected tests passed in a container limited to 8 GiB RAM, no swap, and two CPUs (205 tasks executed). The recorded memory peak was about 5 GiB, with zero OOM events.Does this pull request potentially affect one of the following parts: