Skip to content

Build and CI cleanup across all projects - #52

Merged
scottf merged 1 commit into
mainfrom
ci-build-cleanup
Sep 9, 2026
Merged

scottf merged 1 commit into
mainfrom
ci-build-cleanup

Conversation

@scottf

@scottf scottf commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Build and CI work only. The batch-publish EOB / fast-ingest code is deliberately not here — it follows in a separate PR branched from this one.

Dependencies

  • jnats-server-runner 3.1.1 in every project that uses it.
  • chaos-runner ported off 2.0.2, which was two breaking releases behind. 3.x moved the cluster helpers out of NatsRunnerUtils into ClusterUtils/ClusterDefaults, removed getTemporaryJetStreamStoreDirBase(), renamed connectCheckTries(0) to skipConnectValidate(), and moved setDefaultOutputLevel. It asks for LocalHost.ip.host explicitly, because the 3.x default is localhost on a Java 8 JVM and 127.0.0.1 elsewhere, and chaos-runner used to be 127.0.0.1 everywhere.

Known issue, unchanged by this PR and recorded for later: on 3.1.x a cluster's JetStream store dir is not honored — NatsServerRunner re-parses the jetstream block from configInserts through JsConfig(List), which substitutes a fresh temp dir. Measured on Linux. 4.0.1 fixes it.

Gradle

  • The six projects still on 6.8.3 moved to 8.14, with wrapper artifacts regenerated by gradle wrapper --gradle-version 8.14 — jar, properties, gradlew, gradlew.bat, byte-identical to the projects already on 8.14. pcgroups-cli stays on 9.0.0.
  • Those six aligned to the batch-publish template: coveralls plugin dropped (no workflow referenced it), bnd 7.1.0, test-retry 1.6.4, nexus-publish 2.0.0, junit 5.14.1 plus junit-platform-launcher, equalsverifier 4.2.3, jacoco 0.8.12, xml.enabled → xml.required (removed in Gradle 8), and the javadoc doLast favicon block removed.
  • jacoco 0.8.6 could not instrument JDK 21 class files — it logged Unsupported class file major version 65 and still reported success, producing a degraded report.

Manifests

Automatic-Module-Name now equals Bundle-Name on all ten published bundles; four were missing it entirely, which left their module name derived from the jar filename. batch-publish's bnd Bundle-Description and Bundle-DocURL pointed at counters and are corrected.

Build file cleanup

  • TARGET_COMPATIBILITY machinery removed from all eleven build files. Nothing set it — not this repo's workflows, not the shared ones — so only the Java 8 artifact was ever published. targetCompatibility is now a fixed JavaVersion.VERSION_1_8; jarAndArtifactName stays as the artifact id, replacing the archivesBaseName that Gradle 9 removes.
  • isMerge removed from the ten files that declared it. It was referenced in exactly one place — js-publish-extensions wrapped nexusPublishing in if (isMerge || isRelease), a no-op guard. All eleven now configure it identically.

Workflows

21 files across seven projects migrated to synadia-io/workflows, 623 lines removed. Each file keeps its name: and on: block byte-for-byte; only the jobs: block changed, to the same five-line caller counters already used. This retires actions/checkout@v3, actions/setup-java@v3, the adopt distribution, the second nats-server install method, and the signArchives reference that Gradle 9 breaks. pcgroups-cli keeps its own workflows since it publishes a distribution, not a library.

The JDK question that previously blocked this is resolved: the shared workflow hardcodes JDK 21, and Gradle 6.8.3 cannot run on 21 at all — 8.14 can.

Verification

Everything below was run against the exact contents of this branch, checked out into a separate worktree, using nats-server v2.15.0-dev:

  • clean test jar javadoc succeeds in all eleven standalone projects, plus :pcgroups-cli:compileJava through its parent.
  • 131 tests, 0 failures — pcgroups 67, encoded-kv 19, request-many 18, schedule-message 13, counters 6, direct-batch 4, js-publish-extensions 2, retrier 2.
  • chaos-runner has no test suite, so it was run for real: a three-server JetStream cluster with the chaos loop cycling servers down and up, jnats clients reconnecting and rediscovering, healthz returning to ok after each restart. Single-server mode likewise.
  • batch-publish has no test sources on this branch, which is why its 44 tests are absent here; they arrive with the feature PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01V5QAt1CFwPXNN8nSAqWdvX

- jnats-server-runner 3.1.1 in every project that uses it; chaos-runner ported off
  2.0.2 onto the ClusterUtils/ClusterDefaults API
- Gradle 8.14 for the six projects still on 6.8.3, with regenerated wrapper
  artifacts; pcgroups-cli left on 9.0.0
- those six aligned to the batch-publish template: coveralls dropped, bnd 7.1.0,
  test-retry 1.6.4, nexus-publish 2.0.0, junit 5.14.1 plus platform-launcher,
  equalsverifier 4.2.3, jacoco 0.8.12, xml.required, javadoc doLast removed
- Automatic-Module-Name set to Bundle-Name on all ten published bundles;
  batch-publish bnd description and DocURL corrected
- TARGET_COMPATIBILITY machinery and isMerge removed from all eleven build files
- 21 workflows migrated to the synadia-io/workflows reusable workflows, 623 lines

Claude-Session: https://claude.ai/code/session_01V5QAt1CFwPXNN8nSAqWdvX
@synadia-claude-reviewer

synadia-claude-reviewer Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Claude finished @scottf's task in 3m 56s —— View job


PR Review: Build and CI Cleanup

  • Gather context and understand the request
  • Read PR diff and changed source files
  • Review chaos-runner API migration (ChaosRunner.java, ChaosArguments.java)
  • Review build file changes (Gradle upgrades, plugin versions)
  • Review workflow consolidations
  • Review test file changes
  • Post inline comments on specific issues
  • Post final review summary

Overall Assessment

This is a well-scoped, mechanically thorough cleanup PR. The changes are large in volume but narrow in purpose — no logic rewrites, just infrastructure alignment. Two items worth tracking:


Findings

1. batch-publish uses a SNAPSHOT runtime dependency — batch-publish/build.gradle:39
(inline comment posted)

io.nats:jnats:2.26.3-SNAPSHOT makes builds non-deterministic and will block Maven Central publication. The PR description is clear that the feature PR handles the real batch-publish work, so this is presumably intentional as a placeholder. Just confirm the downstream PR bumps this to a GA release before releasing batch-publish.

2. Pre-existing NPE in ChaosRunner.start() — ChaosRunner.java:301

INSTANCE_ARGUMENTS is declared but never assigned anywhere in the class. If start() is called a second time with INSTANCE != null, the guard INSTANCE_ARGUMENTS.equals(a) throws NullPointerException instead of the intended Exception("Instance already started with different arguments."). This is present on main and not introduced by this PR, but the chaos-runner port is a good opportunity to fix it — the fix is a one-liner (INSTANCE_ARGUMENTS = a; after INSTANCE = new ChaosRunner(...)).


What looks correct

  • chaos-runner API migration is complete and consistent: connectCheckTries(0) → skipConnectValidate(), NatsServerRunner.setDefaultOutputLevel → NatsRunnerUtils.setDefaultOutputLevel, ClusterDefaults builder replacing the old positional createNodes overload, and explicit LocalHost.ip.host for deterministic 127.0.0.1 behavior across JVM versions. The monitorStart(monitor) call with the comment that ≤ 0 disables monitoring is consistent with the old monitor < 1 ? null : monitor guard.
  • Test migration (nats.io.* → io.nats.*, getURI() → getNatsLocalhostUri()) is uniform across all six test files.
  • Automatic-Module-Name additions are correct; module names match Bundle-Name on all ten bundles.
  • jacoco 0.8.6 → 0.8.12 correctly handles JDK 21 class files (0.8.6 silently produced degraded reports, as noted in the PR description).
  • xml.required / html.required is the correct Gradle 8 syntax; xml.enabled was removed.
  • isMerge removal is safe — the PR description's analysis that it guarded a no-op is accurate.
  • Workflow consolidation — 21 files to 5-line callers — is clean, retires deprecated action versions (checkout@v3, setup-java@v3, adopt distribution), and removes the signArchives reference that Gradle 9 breaks.
  • .gitattributes correctly enforces LF for gradlew/.sh and CRLF for .bat/.cmd.

Comment thread batch-publish/build.gradle
@scottf

scottf commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

The findings about NPE in ChaosRunner.start(), while true are not relevant to this PR and should/will be addressed separately

@scottf
scottf merged commit bbecdeb into main Sep 9, 2026
20 checks passed
@scottf
scottf deleted the ci-build-cleanup branch September 9, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant