Repository navigation
Fix OpenTelemetry dependency versions in generated Dataflow runner Maven POM - #40530
Merged
Merged
Conversation
Contributor
Author
|
R: @stankiewicz |
damccorm
marked this pull request as ready for review
October 12, 2026 18:56
Contributor
|
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment |
stankiewicz
approved these changes
Oct 12, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #40530 +/- ##
============================================
+ Coverage 56.16% 65.27% +9.10%
- Complexity 2288 13921 +11633
============================================
Files 1124 1720 +596
Lines 178336 107838 -70498
Branches 1489 11245 +9756
============================================
- Hits 100170 70388 -29782
+ Misses 75645 33265 -42380
- Partials 2521 4185 +1664
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Problem
Projects consuming
org.apache.beam:beam-runners-google-cloud-dataflow-java:2.78.0-SNAPSHOTwith Maven fail to resolve the runner's transitive dependencies because the published POM is rejected as invalid:Because Maven skips all transitive dependencies when a dependency's POM fails model validation, required runner dependencies (such as
com.google.api.services.dataflow.Dataflow) are missing at runtime, causingPipelineOptionsFactoryinitialization and pipeline submission to fail. This also broke thePostRelease Nightly Snapshotworkflow (#30505).Root Cause
BeamModulePlugin.groovy:<dependencies>,BeamModulePluginonly emits<version>ifit.version != nullon the direct dependency entry inlibrary.java.<dependencyManagement>,BeamModulePluginonly imports BOMs (Category.REGULAR_PLATFORM/Category.ENFORCED_PLATFORM) that are directly declared in that subproject'simplementation(orshadow) configuration.BeamModulePlugin.groovy,opentelemetry_exporter_otlpandopentelemetry_extension_autoconfigure(along withopentelemetry_apiandopentelemetry_sdk) were declared without explicit versions (// opentelemetry-bom sets version).opentelemetry_*dependencies (sdks/java/core,sdks/java/io/google-cloud-platform,sdks/java/io/kafka,sdks/java/extensions/opentelemetry-gcp-auth-extension) explicitly declareplatform(library.java.opentelemetry_bom), whereasrunners/google-cloud-dataflow-java/build.gradleonly declaredenforcedPlatform(library.java.google_cloud_platform_libraries_bom)(which does not manageopentelemetry-exporter-otlporopentelemetry-sdk-extension-autoconfigure).opentelemetry_exporter_otlpandopentelemetry_extension_autoconfigurefromruntimeOnlytoimplementationinrunners/google-cloud-dataflow-java/build.gradle, Gradle still resolved their versions transitively via:sdks:java:coreduring compilation, butbeam-runners-google-cloud-dataflow-java.pomwas generated without<version>on those two dependencies and withoutopentelemetry-bom-alphain<dependencyManagement>.Fix
opentelemetry_bominrunners/google-cloud-dataflow-java/build.gradle: Addsimplementation platform(library.java.opentelemetry_bom)andpermitUnusedDeclared platform(library.java.opentelemetry_bom)(matchingsdks/java/core,sdks/java/io/google-cloud-platform,sdks/java/io/kafka, andsdks/java/extensions/opentelemetry-gcp-auth-extension) soio.opentelemetry:opentelemetry-bom-alphais imported in<dependencyManagement>ofbeam-runners-google-cloud-dataflow-java.pom.$opentelemetry_versionon OpenTelemetry entries inBeamModulePlugin.groovy: Sets:$opentelemetry_version(kept in sync withlibraries-bombybomupgrader.py) onopentelemetry_api,opentelemetry_sdk,opentelemetry_exporter_otlp, andopentelemetry_extension_autoconfigure(following Fix pom involving maven-archetype and opentelemetry #38518 foropentelemetry_context), and removes the duplicateopentelemetry_sdk_testingmap key, ensuring no module can emit a versionless OpenTelemetry dependency in its published POM.