feat: Add StableApi marker and API diff check by zeitlinger · Pull Request #2168 · prometheus/client_java (original) (raw)

@zeitlinger zeitlinger changed the titleAdd StableApi marker and API diff check feat: Add StableApi marker and API diff check

Jun 1, 2026

@zeitlinger

Signed-off-by: Gregor Zeitlinger gregor.zeitlinger@grafana.com

jaydeluca

@zeitlinger

Signed-off-by: Gregor Zeitlinger gregor.zeitlinger@grafana.com

zeitlinger added a commit that referenced this pull request

Jun 2, 2026

@zeitlinger

…idiffs (#2174)

Summary

Fixes the manual-bump drift in the api-diff baseline (#2170) and makes API changes visible in review.

Notes

Validation

Closes #2170

Also fixes a pre-existing compat-test break on main

micrometer-compatibility and jmx-exporter-compatibility fail on main (e.g. #2173), unrelated to this change. The compat harness installs local artifacts with -Dmaven.test.skip=true, which skips building the *:test-jar artifacts that the activeByDefault default profiles declare as test dependencies, breaking resolution (e.g. prometheus-metrics-exposition-textformats:jar:tests).

Fixed by deactivating those profiles in the compat install (-P !default), matching what the release task already does (-P release,!default). Verified locally: full mvnw install -Dmaven.test.skip=true -P !default → BUILD SUCCESS.

Reviewer note: the seed diffs show the full stable surface (expected)

The committed docs/apidiffs/current_vs_latest/*.txt list the entire @StableApi surface as additions, not a small delta. This is the documented bootstrap state from #2168, not a bug:

It self-corrects after the next release ships @StableApi: Renovate bumps the baseline to that release, the bump workflow regenerates current_vs_latest/ as an annotated-vs-annotated (near-empty) diff, and the archived <new>_vs_<old>/ becomes the first real release diff. So the current files are best read as a one-time record of the initial declared stable API surface.


Signed-off-by: Gregor Zeitlinger gregor.zeitlinger@grafana.com

zeitlinger added a commit that referenced this pull request

Jun 3, 2026

@github-actions @zeitlinger

jaydeluca pushed a commit that referenced this pull request

Jun 4, 2026

@zeitlinger @jaydeluca

Summary

Notes

This is the bootstrap PR for the annotation-based API surface. Since 1.5.1 does not contain @StableApi, the first diff is noisy and mostly shows the seeded API surface as new. After a release contains the annotations, future diffs should be normal compatibility diffs.

The workflow does not post PR comments or upload artifacts. If the check fails, run this locally:

mise run api-diff

Reports are written to **/target/japicmp/*.

Intentional incompatible changes can be accepted by adding the PR label breaking-api-change-accepted.

Validation


Signed-off-by: Gregor Zeitlinger gregor.zeitlinger@grafana.com Signed-off-by: Jay DeLuca jaydeluca4@gmail.com

jaydeluca pushed a commit that referenced this pull request

Jun 4, 2026

@zeitlinger @jaydeluca

…idiffs (#2174)

Summary

Fixes the manual-bump drift in the api-diff baseline (#2170) and makes API changes visible in review.

Notes

Validation

Closes #2170

Also fixes a pre-existing compat-test break on main

micrometer-compatibility and jmx-exporter-compatibility fail on main (e.g. #2173), unrelated to this change. The compat harness installs local artifacts with -Dmaven.test.skip=true, which skips building the *:test-jar artifacts that the activeByDefault default profiles declare as test dependencies, breaking resolution (e.g. prometheus-metrics-exposition-textformats:jar:tests).

Fixed by deactivating those profiles in the compat install (-P !default), matching what the release task already does (-P release,!default). Verified locally: full mvnw install -Dmaven.test.skip=true -P !default → BUILD SUCCESS.

Reviewer note: the seed diffs show the full stable surface (expected)

The committed docs/apidiffs/current_vs_latest/*.txt list the entire @StableApi surface as additions, not a small delta. This is the documented bootstrap state from #2168, not a bug:

It self-corrects after the next release ships @StableApi: Renovate bumps the baseline to that release, the bump workflow regenerates current_vs_latest/ as an annotated-vs-annotated (near-empty) diff, and the archived <new>_vs_<old>/ becomes the first real release diff. So the current files are best read as a one-time record of the initial declared stable API surface.


Signed-off-by: Gregor Zeitlinger gregor.zeitlinger@grafana.com Signed-off-by: Jay DeLuca jaydeluca4@gmail.com

jaydeluca pushed a commit that referenced this pull request

Jun 4, 2026

🤖 I have created a release beep boop

1.7.0 (2026-06-03)

Features

Bug Fixes

Performance Improvements

Documentation


[!IMPORTANT] Close and reopen this PR to trigger CI checks.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Gregor Zeitlinger gregor.zeitlinger@grafana.com Signed-off-by: Jay DeLuca jaydeluca4@gmail.com

zeitlinger added a commit that referenced this pull request

Jun 4, 2026

@zeitlinger

Summary

Covers user-facing changes since v1.6.1:

Test plan

Signed-off-by: Gregor Zeitlinger gregor.zeitlinger@grafana.com

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

[ Show hidden characters]({{ revealButtonHref }})