Skip to content
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

Address the issue #796 #798

Merged
merged 1 commit into from
Oct 22, 2024
Merged

Address the issue #796 #798

merged 1 commit into from
Oct 22, 2024

Conversation

Emily-Jiang
Copy link
Member

This is to fix the issue #796 by providing an implementation to the abstract method and also skip this change from semantic versioning check.

@Emily-Jiang Emily-Jiang mentioned this pull request Oct 14, 2024
@Emily-Jiang
Copy link
Member Author

@tjquinno @donbourne @Channyboy further to the Technical call discussion, I have proposed this PR. With this, you can go ahead to perform a micro release. It should not have any impact on the existing implementations.

Copy link
Contributor

@tjquinno tjquinno left a comment

Choose a reason for hiding this comment

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

I am requesting some minor edits noted with the source changes.

Also, some might think it excessive but consider adding a build-time test class in src/test/java which extends Snapshot and does not provide an implementation for bucketValues. The normal Maven compilation of the test directory and this new class would ensure that the changes in the PR address the underlying issue now and going forward. (There would be no point in adding a TCK test for this because we want to test the behavior of the MP Metrics API library itself, not implementations of the MP Metrics spec.)

@@ -36,6 +36,10 @@
<groupId>org.osgi</groupId>
<artifactId>org.osgi.annotation.versioning</artifactId>
</dependency>
<dependency>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-baseline-maven-plugin</artifactId>
Copy link
Contributor

Choose a reason for hiding this comment

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

IIUC this dependency needed to process the new use of the @BaselineIgnore annotation in the source code.

The annotation has retention CLASS (not RUNTIME) so there is no runtime detection of the annotation.

Perhaps, therefore, this dependency should have scope provided to avoid the plug-in bleeding into the runtime class path of anything that depends on the MP Metrics API component.

Copy link
Contributor

Choose a reason for hiding this comment

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

I cloned Emily's fork and tried to push a commit to the fix branch to add <scope>provided</scope> but I do not have permission to write.

@@ -64,7 +64,10 @@ public abstract class Snapshot {
*
* @return an array of {@link HistogramBucket} if it is available or an empty array if not available
*/
public abstract HistogramBucket[] bucketValues();
@aQute.bnd.annotation.baseline.BaselineIgnore("5.2")
Copy link
Contributor

@tjquinno tjquinno Oct 14, 2024

Choose a reason for hiding this comment

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

My mistake. the "5.2" is also a reasonable future version of MP Metrics to specify.

Why is the baseline package version "5.2" in the annotation?

I know that is the version of the plug-in being used, but the Javadoc for the value attribute for the annotation states

Baseline package version.
The version must be a valid OSGi version string.

That doesn't clarify much, but It seems that this value is intended to reflect the version of the component being produced, not the version of the bnd baseline plug-in being used.

Copy link
Member

@donbourne donbourne left a comment

Choose a reason for hiding this comment

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

we can add the scope change in a subsequent PR

@donbourne donbourne merged commit 3973114 into eclipse:main Oct 22, 2024
1 of 2 checks passed
@tjquinno
Copy link
Contributor

Here is a candidate subsequent PR: #799

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.

3 participants