-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5.1.1 introduces backward incompatible change #796
Comments
@Channyboy @Emily-Jiang As I mentioned in the MP metrics gitter channel I have a few changes to address this locally but I get bnd baseline plug-in failures in removing |
From this use case, it seems that the class Strictly speaking, service release should not have API changes. However, since this is a challenge and this change should not affect the current working system, it might be okay to do the change. @tjquinno you will need to update the package-info.java and the bundle versions because of the method update. Here is the PR I provided. However, it will have to be 5.2 release. I guess the spec team needs to discuss how to proceed with this. @Channyboy @tjquinno @donbourne please discuss. |
@tomas-langer , while an application technically could implement the @Emily-Jiang , based on my previous comment, this feels like an API bug that only affects vendors working on MP Metrics implementation. |
...and if we agree it only affects MP Metrics implementations (which would have to provide an implementation for that method to comply with the spec), then it isn't even really a bug. |
We have some Helidon users who provided their own implementation of To get a better understanding of their use case I am in the process of exploring with those users exactly why they've provided their own That said, it can be reasonably argued that the revision of the |
All this said, if MP Metrics ever creates a new release to address #795 or any other issue, it would be simple for us to address this one as well. |
I agree with your points on that. I'm interested to hear what the Helidon users are doing with it, when you find out. |
To clarify, this method was introduced in 5.1.0 (i.e. in a minor release), not 5.1.1 (which would be a service release). That's an important distinction and the title of the issue should be updated. While a default implementation could have been added, is I'd like to hear more about why not having a default implementation of this method is a breaking change for the user. |
Our user had written a private no-op implementation of MP Metrics (I believe as a performance optimization). It's in a library that their downstream applications use. So, when Helidon adopted MP Metrics 5.1.1 the incompatible change in the MP In this case, our "user" is not an application developer. I agree that's it would be unusual for an application developer to implement |
We discussed in the MP Technical call today that we would create a 5.1.2 release to add a default implementation to the new Snapshot method. It was discussed that this is a very borderline case -- if a consumer of an API is behaving like a provider of an impl of an API (for example, creating a noop implementation of the API), then they should expect to be broken when either the major or minor version changes (per semantic versioning rules - https://docs.osgi.org/whitepaper/semantic-versioning/Semantic-Versioning-20190110.pdf ) |
@tomas-langer Can we close this issue now? |
Method
bucketValues
does not exist in 5.0.0 specification oforg.eclipse.microprofile.metrics.Snapshot
, causing that a class extendingSnapshot
is not compilable when upgrading.New abstract methods (on abstract clases or interfaces) should always be created with default implementation, otherwise this is a backward incompatible change and should be done in a major version.
To reproduce:
org.eclipse.microprofile.metrics.Snapshot
The compilation fails with
The text was updated successfully, but these errors were encountered: