Skip to content

Fix(pubsub): Upgrade Cloud Functions Pub/Sub to Java25#10279

Open
Kef131 wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
Kef131:fix(pubsub)-update_cloud_functions_pubsub_java25
Open

Fix(pubsub): Upgrade Cloud Functions Pub/Sub to Java25#10279
Kef131 wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
Kef131:fix(pubsub)-update_cloud_functions_pubsub_java25

Conversation

@Kef131

@Kef131 Kef131 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #
b/470272226
Upgrades the Cloud Functions Pub/Sub Publish Message sample to Java 25:

  • Sets maven.compiler.source and maven.compiler.target to 25.
  • Upgrades shared-configuration parent version to 1.2.2.
  • Overrides jacoco-maven-plugin to 0.8.14 to support Java 25 (Class file major version 69). - Configures jacoco-maven-plugin executions (prepare-agent and report) to enable dynamic bytecode instrumentation for test coverage collection and report generation during the test lifecycle as mentioned on bug.

Checklist

  • I have followed Sample Format Guide
  • pom.xml parent set to latest shared-configuration (1.2.2)
  • Appropriate changes to README are included in PR (None needed)
  • These samples need a new API enabled in testing projects to pass (None)
  • These samples need a new/updated env vars in testing projects set to pass (None)
  • Tests pass: mvn clean verify required
  • Lint passes: mvn -P lint checkstyle:check required
  • Static Analysis: mvn -P lint clean compile pmd:cpd-check spotbugs:check advisory only (Note: ErrorProne 2.18.0 and Spotbugs 4.7.3.3 from parent pom have compatibility warnings/errors under Java 25)
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Please merge this PR for me once it is approved

@product-auto-label product-auto-label Bot added api: pubsub Issues related to the Pub/Sub API. samples Issues that are directly related to samples. api: cloudfunctions Issues related to the Cloud Run functions API. labels Jun 10, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the parent POM version, adds the JaCoCo Maven plugin for test coverage reporting, and upgrades the Java compiler target and source versions. The reviewer noted that the Java compiler properties should be set directly to Java 25 to align with the pull request's objective, rather than using Java 21 with a temporary comment.

Comment thread functions/pubsub/publish-message/pom.xml
@Kef131 Kef131 self-assigned this Jun 10, 2026
@Kef131 Kef131 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 10, 2026
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 10, 2026
@Kef131 Kef131 marked this pull request as ready for review June 10, 2026 17:22
@Kef131 Kef131 requested review from a team and yoshi-approver as code owners June 10, 2026 17:22

@angelcaamal angelcaamal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@XrossFox

Copy link
Copy Markdown

LGTM!

@product-auto-label product-auto-label Bot removed the api: cloudfunctions Issues related to the Cloud Run functions API. label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsub Issues related to the Pub/Sub API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants