Skip to content

FIX @W-24708955@ Pin Java 17 in the npm publish workflow - #525

Merged
nikhil-mittal-165 merged 1 commit into
devfrom
nikhil.mittal/publish-workflow-pin-java
Nov 26, 2026
Merged

nikhil-mittal-165 merged 1 commit into
devfrom
nikhil.mittal/publish-workflow-pin-java

Conversation

@nikhil-mittal-165

Copy link
Copy Markdown
Contributor

Problem

The November dry run of publish-package-to-npm.yml (run 45878114236, dev @ 9244099, dryrun=true) failed in build-and-test-and-publish at code-analyzer-pmd-engine:

> sh ./gradlew build -x test
FAILURE: Build failed with an exception.
* What went wrong:
25.0.5
BUILD FAILED in 19s

runs-on: ubuntu-latest now resolves to ubuntu-26.04 (image 20261116.202). Its default JDK is Java 25.0.5 (Java 11, 17 and 21 are also installed). The PMD and SFGE engines build with the Gradle 8.9 wrapper, which cannot run on Java 25. The workflow never selects a JDK, so it picked up the new image default.

This is independent of the monthly changes and would break the real publish too. engine-api, core, eslint8, eslint and flow had already built, tested and dry-run published successfully before the failure.

Change

Add actions/setup-java@v4 (Temurin 17) to the build-and-test-and-publish job, so the JDK no longer depends on the runner image default. Workflow-only change; no package code is touched.

Java 17 is within what the project builds with (the pmd-rules Gradle build targets Java 11 and verify-pr.yml pins Java 11).

Not changed

  • validate-packages-as-releasable, prepare-release-branch and create-postrelease-pull-request run on macOS and succeeded in the dry run. They are untouched.
  • The Gradle wrapper is not upgraded.

Test plan

  • Merge to dev, then re-run the dry run from dev with all 11 packages and dryrun=true. Expect build-and-test-and-publish to pass for all 11 packages, including pmd and sfge. Delete the leftover release/<epoch> branch afterwards.

Work item: W-24708955

🤖 Generated with Claude Code

ubuntu-latest now resolves to ubuntu-26.04, whose default JDK is Java 25.
The PMD (and SFGE) engines build with Gradle 8.9, which cannot run on Java 25,
so the build-and-test-and-publish job failed at code-analyzer-pmd-engine
(dry run 45878114236). Pin Temurin 17 with actions/setup-java instead of
relying on the runner image default.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@git2gus

git2gus Bot commented Nov 26, 2026

Copy link
Copy Markdown

Git2Gus App is installed but the .git2gus/config.json doesn't have right values. You should add the required configuration.

@nikhil-mittal-165
nikhil-mittal-165 merged commit e01bbb8 into dev Nov 26, 2026
9 checks passed
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