Skip to content

Commit 0eab74d

Browse files
committed
chore: merge upstream/main, remove spotless in favor of google-java-format via flint
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
2 parents f78d3be + 0fa1ad7 commit 0eab74d

136 files changed

Lines changed: 2336 additions & 720 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.

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ max_line_length = 200
1111
max_line_length = 300
1212

1313
[pom.xml]
14-
max_line_length = 120
14+
max_line_length = 210
1515

1616
[*.py]
1717
# checked by black
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.5.0"
2+
".": "1.5.1"
33
}

.github/config/lychee.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ max_concurrency = 4
1010
include_fragments = true
1111

1212
base_url = "https://prometheus.github.io"
13-
exclude_path = ["docs/themes"]
13+
exclude_path = ["docs/themes", "CHANGELOG.md"]
1414

1515
exclude = [
1616
# excluding links to pull requests and issues is done for performance
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3-
"separate-pull-requests": false,
3+
"group-pull-request-title-pattern": "chore${scope}: release${component} ${version}",
44
"pull-request-footer": "> [!IMPORTANT]\n> Close and reopen this PR to trigger CI checks.",
55
"packages": {
66
".": {
7-
"release-type": "java",
8-
"versioning": "always-bump-patch",
9-
"extra-files": [
10-
"prometheus-metrics-parent/pom.xml",
11-
"integration-tests/it-spring-boot-smoke-test/pom.xml"
12-
]
7+
"release-type": "maven"
138
}
149
}
1510
}

.github/config/super-linter.env

Lines changed: 14 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,24 @@
1-
FILTER_REGEX_EXCLUDE=mvnw|src/main/generated/.*|docs/themes/.*|keystore.pkcs12|.*.java|prometheus-metrics-exporter-opentelemetry-shaded/pom.xml|CODE_OF_CONDUCT.md|CLAUDE.md
1+
FILTER_REGEX_EXCLUDE=mvnw|src/main/generated/.*|docs/themes/.*|keystore.pkcs12|.*.java|prometheus-metrics-exporter-opentelemetry-shaded/pom.xml|CODE_OF_CONDUCT.md|CLAUDE.md|CHANGELOG.md
22
IGNORE_GITIGNORED_FILES=true
33
JAVA_FILE_NAME=google_checks.xml
44
LOG_LEVEL=ERROR
5-
# conflicts with prettier
6-
VALIDATE_BIOME_FORMAT=false
7-
# conflicts with prettier
8-
VALIDATE_BIOME_LINT=false
9-
# disable kubernetes linter - complains about resource limits, etc
10-
VALIDATE_CHECKOV=false
11-
VALIDATE_CSS=false
12-
VALIDATE_CSS_PRETTIER=false
13-
VALIDATE_DOCKERFILE_HADOLINT=false
14-
VALIDATE_GIT_COMMITLINT=false
15-
# done by maven
16-
VALIDATE_GOOGLE_JAVA_FORMAT=false
17-
# times out
18-
VALIDATE_GO_MODULES=false
19-
VALIDATE_HTML=false
20-
# done by checkstyle
21-
VALIDATE_JAVA=false
22-
# we have many duplicate code in our codebase for demo purposes
23-
VALIDATE_JSCPD=false
24-
VALIDATE_PYTHON_PYLINT=false
25-
# conflicts with black
26-
VALIDATE_PYTHON_RUFF_FORMAT=false
27-
# excluding simpleclient-archive doesn't seem to work
28-
VALIDATE_TRIVY=false
295

30-
FIX_ENV=true
31-
FIX_GITHUB_ACTIONS_ZIZMOR=true
32-
FIX_GO=true
33-
FIX_JAVASCRIPT_PRETTIER=true
34-
FIX_JSON=true
35-
FIX_JSONC=true
36-
FIX_JSONC_PRETTIER=true
6+
VALIDATE_BASH=true
7+
VALIDATE_EDITORCONFIG=true
8+
VALIDATE_GIT_MERGE_CONFLICT_MARKERS=true
9+
VALIDATE_GITHUB_ACTIONS=true
10+
VALIDATE_JSON_PRETTIER=true
11+
VALIDATE_MARKDOWN=true
12+
VALIDATE_MARKDOWN_PRETTIER=true
13+
VALIDATE_RENOVATE=true
14+
VALIDATE_SHELL_SHFMT=true
15+
VALIDATE_SPELL_CODESPELL=true
16+
VALIDATE_XML=true
17+
VALIDATE_YAML_PRETTIER=true
18+
3719
FIX_JSON_PRETTIER=true
3820
FIX_MARKDOWN=true
3921
FIX_MARKDOWN_PRETTIER=true
40-
FIX_PYTHON_BLACK=true
4122
FIX_SHELL_SHFMT=true
4223
FIX_SPELL_CODESPELL=true
4324
FIX_YAML_PRETTIER=true

.github/release.yml

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

.github/workflows/java-version-matrix-tests.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
# Note: Java 8 runtime testing is skipped due to Spotless incompatibility
2726
java-version: [11, 17, 21, 25]
2827
steps:
2928
- name: Check out
@@ -46,15 +45,13 @@ jobs:
4645
${{ runner.os }}-maven-
4746
4847
- name: Build core library artifacts
49-
run: mise exec -- ./mvnw install -DskipTests -Dspotless.check.skip=true -Dcoverage.skip=true -Dcheckstyle.skip=true -Dwarnings=-nowarn -pl '!integration-tests'
48+
run: mise exec -- ./mvnw install -DskipTests -Dcoverage.skip=true -Dcheckstyle.skip=true -Dwarnings=-nowarn -pl '!integration-tests'
5049

5150
- name: Install parent POMs
5251
run: |
5352
cd integration-tests
54-
mise exec -- ../mvnw clean install -N -Dspotless.skip=true
55-
cd it-exporter
56-
mise exec -- ../../mvnw install -N -Dspotless.skip=true
57-
53+
mise exec -- ../mvnw clean install -N cd it-exporter
54+
mise exec -- ../../mvnw install -N
5855
- name: Rebuild sample apps targeting Java ${{ matrix.java-version }}
5956
run: |
6057
cd integration-tests
@@ -64,7 +61,7 @@ jobs:
6461
else
6562
MODULES="it-common,it-exporter/it-exporter-httpserver-sample,it-exporter/it-exporter-servlet-tomcat-sample,it-exporter/it-exporter-servlet-jetty-sample,it-exporter/it-exporter-no-protobuf,it-pushgateway"
6663
fi
67-
mise exec -- ../mvnw clean install -DskipTests -Dspotless.skip=true -Dcoverage.skip=true -Dcheckstyle.skip=true -Dwarnings=-nowarn \
64+
mise exec -- ../mvnw clean install -DskipTests -Dcoverage.skip=true -Dcheckstyle.skip=true -Dwarnings=-nowarn \
6865
-Djava.version=${{ matrix.java-version }} \
6966
-Dmaven.compiler.release=${{ matrix.java-version }} \
7067
-pl $MODULES
@@ -80,5 +77,5 @@ jobs:
8077
else
8178
TEST_MODULES="it-exporter/it-exporter-test,it-exporter/it-no-protobuf-test,it-pushgateway"
8279
fi
83-
mise exec -- ../mvnw verify -T 2C -Dspotless.skip=true -Dcoverage.skip=true -Dcheckstyle.skip=true -Dwarnings=-nowarn \
80+
mise exec -- ../mvnw verify -T 2C -Dcoverage.skip=true -Dcheckstyle.skip=true -Dwarnings=-nowarn \
8481
-pl $TEST_MODULES

.github/workflows/multi-version-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ jobs:
3636
${{ runner.os }}-maven-
3737
3838
- name: Build and test on Java ${{ matrix.java }}
39-
run: ./mvnw clean install -Dtest.java.version=${{ matrix.java }} -Dspotless.skip=true -Dcheckstyle.skip=true -Dwarnings=-nowarn -Dcoverage.skip=true
39+
run: ./mvnw clean install -Dtest.java.version=${{ matrix.java }} -Dcheckstyle.skip=true -Dwarnings=-nowarn -Dcoverage.skip=true

.github/workflows/release-please.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ on:
77
- main
88

99
permissions:
10+
actions: write
1011
contents: write
12+
issues: write
1113
pull-requests: write
1214

1315
jobs:
@@ -21,3 +23,11 @@ jobs:
2123
token: ${{ secrets.GITHUB_TOKEN }}
2224
config-file: .github/config/release-please-config.json
2325
manifest-file: .github/config/.release-please-manifest.json
26+
27+
- name: Trigger deploy to Maven Central
28+
if: ${{ steps.release-please.outputs.releases_created == 'true' }}
29+
env:
30+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
run: >
32+
gh workflow run release.yml
33+
-f tag=${{ steps.release-please.outputs.tag_name }}

.github/workflows/release.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
name: Deploy to Maven Central
33

44
on:
5-
push:
6-
tags:
7-
- "v*.*.*"
5+
workflow_dispatch:
6+
inputs:
7+
tag:
8+
description: "Release tag to deploy (e.g. v1.5.1)"
9+
required: true
810

911
jobs:
1012
deploy:
@@ -22,6 +24,7 @@ jobs:
2224
- name: Checkout Plugin Repository
2325
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2426
with:
27+
ref: ${{ inputs.tag }}
2528
persist-credentials: false
2629

2730
- uses: jdx/mise-action@5228313ee0372e111a38da051671ca30fc5a96db # v3.6.3

0 commit comments

Comments
 (0)