Skip to content

Conversation

@jack-berg
Copy link
Member

I was working on potential changes to the API and got dragged down a rabbit hole when japicmp was inappropriately flagging a change as breaking binary compatibility. I.e. japicmp had a false positive.

In my case, I was toying with lifting a method from Span to a new superinterface. Japicmp flagged the method as deleted even tho it still exists on the new superinterface. After too many hours debugging and inspecting the japicmp source code, I figured out that its because we improperly configure japicmp. Japicmp has config properties that allow you to set the old and new archives to compare, and the old and new classpaths for those archives. We are:

  1. Setting classpath instead of setting archive.
  2. Only setting the classpath to the single archive we're comparing.

The second point causes japicmp to blow up when it tries to resolve superinterfaces / superclasses which come from different artifacts. For example, Span extends ImplicitKeyedContext - japicmp is unable to resolve ImplicitKeyedContext because opentelemetry-context is not on the classpath.

My solution: for each artifact we're comparing, set the classpath to the set of all artifacts published by opentelemetry-java. If the artifact isn't needed, it doesn't hurt for it to be present. This means we're still exposed to these types of false positives if published classes / interfaces which extended types from external projects (i.e. if we had something in the opentelemetry-exporter-zipkin that extended something from zipkin-sender-okhttp3), but this should be rare or non existent.

I spent too much time on this for the impact, but I'm pretty sure I've come across these types of false positives in the past. At some point, you just have to bite the bullet and take the time to understand the tools you depend on.

@jack-berg jack-berg requested a review from a team as a code owner December 31, 2025 17:03
@codecov
Copy link

codecov bot commented Dec 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.14%. Comparing base (7a46bc5) to head (973e217).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7945      +/-   ##
============================================
+ Coverage     90.10%   90.14%   +0.03%     
- Complexity     7439     7467      +28     
============================================
  Files           834      834              
  Lines         22546    22586      +40     
  Branches       2236     2240       +4     
============================================
+ Hits          20316    20360      +44     
+ Misses         1531     1527       -4     
  Partials        699      699              

☔ View full report in Codecov by Sentry.
📢 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.

Copy link
Contributor

@jkwatson jkwatson left a comment

Choose a reason for hiding this comment

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

Thanks! Don't forget to revert the things before merging

@jack-berg jack-berg merged commit 7b2161c into open-telemetry:main Dec 31, 2025
27 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.

2 participants