Skip to content

Commit 3cf6f0c

Browse files
authored
Merge branch 'main' into fix/aube-renovate
2 parents a79ad1c + 9672749 commit 3cf6f0c

153 files changed

Lines changed: 1315 additions & 287 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
mise.lock linguist-generated
12
CHANGELOG.md linguist-generated
23
**/src/main/generated/** linguist-generated
34
docs/apidiffs/** linguist-generated
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.7.0"
2+
".": "1.8.0"
33
}

.github/renovate-tracked-deps.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"mise"
2727
]
2828
},
29-
".github/workflows/generate-api-diff-baseline.yml": {
29+
".github/workflows/bump-api-diff-baseline.yml": {
3030
"regex": [
3131
"mise"
3232
]
@@ -183,11 +183,6 @@
183183
"maven-wrapper": [
184184
"maven-wrapper"
185185
]
186-
},
187-
"pom.xml": {
188-
"regex": [
189-
"io.prometheus:prometheus-metrics-core"
190-
]
191186
}
192187
}
193188
}

.github/renovate.json5

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,6 @@
4545
groupName: "protobuf",
4646
separateMajorMinor: false,
4747
},
48-
{
49-
description: "Isolate the api-diff baseline on renovate/api-diff-baseline so generate-api-diff-baseline can regenerate docs/apidiffs; merge manually after a close/reopen re-runs CI",
50-
matchFileNames: ["pom.xml"],
51-
matchPackageNames: ["io.prometheus:prometheus-metrics-core"],
52-
groupName: "api-diff-baseline",
53-
automerge: false,
54-
},
5548
{
5649
"description": "Flint autofix: align extractVersion for protoc",
5750
"extractVersion": "^(?<version>.+)\\.0\\.0$",
@@ -69,14 +62,6 @@
6962
"# renovate: datasource=(?<datasource>[a-z-]+?)(?: depName=(?<depName>.+?))?(?: packageName=(?<packageName>.+?))?(?: versioning=(?<versioning>[a-z-]+?))?\\s.+?_VERSION\\s*=\\s*\"?(?<currentValue>[^@\"]+?)(?:@(?<currentDigest>sha256:[a-f0-9]+))?\"?\\s"
7063
]
7164
},
72-
{
73-
"customType": "regex",
74-
"description": "update the api-diff baseline to the latest published release",
75-
"managerFilePatterns": ["/^pom\\.xml$/"],
76-
"matchStrings": [
77-
"<!-- renovate: datasource=(?<datasource>[a-z-]+?) packageName=(?<packageName>.+?) -->\\s*<api\\.diff\\.baseline\\.version>(?<currentValue>[^<]+)</api\\.diff\\.baseline\\.version>"
78-
]
79-
},
8065
{
8166
customType: "regex",
8267
description: "track the latest Micrometer release for upstream compatibility",

.github/workflows/api-diff.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ permissions:
2323

2424
jobs:
2525
api-diff:
26+
if: ${{ !startsWith(github.head_ref, 'release-please--branches--') }}
2627
runs-on: ubuntu-24.04
2728
env:
2829
# Empty unless overridden via workflow_dispatch; the api-diff task then
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
name: Bump API Diff Baseline
3+
4+
# After release.yml publishes to Maven Central, push a baseline bump and
5+
# regenerated docs/apidiffs onto release-please's open snapshot-bump PR branch
6+
# (release-please--branches--main). The user merges a single PR that bumps to
7+
# the next -SNAPSHOT *and* updates the api-diff baseline, so there is no window
8+
# where main has a stale baseline.
9+
#
10+
# If the snapshot PR branch no longer exists (already merged), this workflow
11+
# fails loudly — re-run via workflow_dispatch after recreating it, or bump
12+
# manually.
13+
14+
on:
15+
workflow_dispatch:
16+
inputs:
17+
tag:
18+
description: "Released tag (e.g. v1.8.0)"
19+
required: true
20+
21+
permissions: {}
22+
23+
env:
24+
SNAPSHOT_BRANCH: release-please--branches--main
25+
26+
jobs:
27+
bump:
28+
runs-on: ubuntu-24.04
29+
permissions:
30+
contents: write # push to the snapshot PR branch
31+
steps:
32+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
33+
with:
34+
ref: ${{ env.SNAPSHOT_BRANCH }}
35+
persist-credentials: true
36+
- uses: jdx/mise-action@dba19683ed58901619b14f395a24841710cb4925 # v4.1.0
37+
with:
38+
version: v2026.5.18
39+
sha256: cfac593469d028d7ae5fe36e37bd7c59118b5238e92d8a876209578464f24a84
40+
- name: Cache local Maven repository
41+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
42+
with:
43+
path: ~/.m2/repository
44+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
45+
restore-keys: |
46+
${{ runner.os }}-maven-
47+
- name: Compute versions and bump baseline
48+
id: bump
49+
env:
50+
TAG: ${{ inputs.tag }}
51+
run: |
52+
NEW="${TAG#v}"
53+
baseline() {
54+
grep -oP '(?<=<api\.diff\.baseline\.version>)[^<]+' "$1"
55+
}
56+
OLD=$(baseline pom.xml)
57+
if [[ -z "$OLD" ]]; then
58+
echo "::error::Could not read api.diff.baseline.version"
59+
exit 1
60+
fi
61+
if [[ "$OLD" == "$NEW" ]]; then
62+
echo "Baseline already $NEW; nothing to do"
63+
echo "skip=true" >>"$GITHUB_OUTPUT"
64+
exit 0
65+
fi
66+
sed -i -E \
67+
"s|(<api\.diff\.baseline\.version>)[^<]+(</api\.diff\.baseline\.version>)|\1${NEW}\2|" \
68+
pom.xml
69+
if [[ -d docs/apidiffs/current_vs_latest ]]; then
70+
cp -r docs/apidiffs/current_vs_latest "docs/apidiffs/${NEW}_vs_${OLD}"
71+
fi
72+
echo "old=${OLD}" >>"$GITHUB_OUTPUT"
73+
echo "new=${NEW}" >>"$GITHUB_OUTPUT"
74+
- name: Regenerate docs/apidiffs
75+
if: steps.bump.outputs.skip != 'true'
76+
run: mise run api-diff
77+
- name: Push to snapshot PR branch
78+
if: steps.bump.outputs.skip != 'true'
79+
env:
80+
NEW: ${{ steps.bump.outputs.new }}
81+
run: |
82+
git config user.name "github-actions[bot]"
83+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
84+
git add pom.xml docs/apidiffs
85+
OUTSIDE=$(git status --porcelain -- ':(exclude)pom.xml' ':(exclude)docs/apidiffs')
86+
if [[ -n "$OUTSIDE" ]]; then
87+
echo "::error::Unexpected changes outside pom.xml/docs/apidiffs:"
88+
echo "$OUTSIDE"
89+
exit 1
90+
fi
91+
git commit -m "chore: bump api-diff baseline to ${NEW}"
92+
# Note: GITHUB_TOKEN pushes don't trigger CI re-runs on the PR.
93+
# Close and reopen the snapshot PR to trigger CI after this commit.
94+
git push origin "HEAD:${SNAPSHOT_BRANCH}"

.github/workflows/generate-api-diff-baseline.yml

Lines changed: 0 additions & 117 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ jobs:
1515
if: ${{ github.repository == 'prometheus/client_java' }}
1616
environment: release
1717
runs-on: ubuntu-24.04
18-
permissions: {}
18+
permissions:
19+
actions: write # required to trigger bump-api-diff-baseline.yml via `gh workflow run`
1920

2021
steps:
2122
- name: Verify release secrets
@@ -94,3 +95,11 @@ jobs:
9495
MAVEN_USERNAME: ${{ secrets.SONATYPE_MAVEN_REPOSITORY_USERNAME }}
9596
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_MAVEN_REPOSITORY_PASSWORD }}
9697
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_PASSPHRASE }}
98+
99+
- name: Bump api-diff baseline
100+
env:
101+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102+
TAG: ${{ inputs.tag }}
103+
run: >
104+
gh workflow run bump-api-diff-baseline.yml
105+
--repo "${GITHUB_REPOSITORY}" -f "tag=${TAG}"

.mise/envs/jmx-exporter/mise.lock

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.mise/envs/micrometer/mise.lock

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)