Skip to content

Include OpenTelemetry dependencies in published Dataflow runner POM - #40352

Merged
stankiewicz merged 1 commit into
apache:masterfrom
stankiewicz:fix_otel_deps
Sep 30, 2026
Merged

stankiewicz merged 1 commit into
apache:masterfrom
stankiewicz:fix_otel_deps

Conversation

@stankiewicz

Copy link
Copy Markdown
Contributor

BeamModulePlugin constructs the <dependencies> section of published Maven POMs from the implementation (when unshaded) and provided configurations, omitting runtimeOnly dependencies.

Because opentelemetry-exporter-otlp, opentelemetry-extension-autoconfigure, and :sdks:java:extensions:opentelemetry-gcp-auth-extension were declared as runtimeOnly in runners/google-cloud-dataflow-java/build.gradle, they were missing from the published beam-runners-google-cloud-dataflow-java POM and not pulled in transitively (or staged to Dataflow) for external users.

This PR changes those three dependencies to implementation with permitUnusedDeclared so they are included in the published POM while satisfying dependency analysis checks.

  
    BeamModulePlugin's custom POM generation only exports the `implementation`
    (or `shadow`) and `provided` configurations to the published Maven POM,
    omitting `runtimeOnly` dependencies.
  
    Change `opentelemetry-exporter-otlp`, `opentelemetry-extension-autoconfigure`,
    and `:sdks:java:extensions:opentelemetry-gcp-auth-extension` from
    `runtimeOnly` to `implementation` (with `permitUnusedDeclared`) in
    `runners/google-cloud-dataflow-java/build.gradle` so that external Maven/Gradle
    consumers of `beam-runners-google-cloud-dataflow-java` receive them transitively
    and stage them to Dataflow.
@stankiewicz

Copy link
Copy Markdown
Contributor Author

R: @tvalentyn

@github-actions

Copy link
Copy Markdown
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 assign set of reviewers

@stankiewicz

Copy link
Copy Markdown
Contributor Author

R: @kennknowles

@kennknowles kennknowles left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

OK temporarily until we fix BeamModulePlugin (lines 2202 or approx skip runtimeOnly deps, and are just wrong)

@codecov

codecov Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.62%. Comparing base (d1ebefb) to head (bb16a7e).
⚠️ Report is 74 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #40352      +/-   ##
============================================
+ Coverage     57.29%   58.62%   +1.33%     
- Complexity     3696    13819   +10123     
============================================
  Files          1201     2579    +1378     
  Lines        194397   270329   +75932     
  Branches       3889    11212    +7323     
============================================
+ Hits         111373   158483   +47110     
- Misses        79416   105812   +26396     
- Partials       3608     6034    +2426     
Flag Coverage Δ
java 64.99% <ø> (-7.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@stankiewicz
stankiewicz merged commit e8460fd into apache:master Sep 30, 2026
22 of 24 checks passed
@stankiewicz
stankiewicz deleted the fix_otel_deps branch October 13, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants