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

Bump com.google.protobuf:protobuf-java from 4.30.0 to 4.30.1 #1305

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Setup ASDF
uses: equisoft-actions/with-asdf-vm@v2
- uses: jdx/mise-action@v2
- name: Cache local Maven repository
uses: actions/cache@v4
with:
Expand All @@ -24,7 +23,5 @@ jobs:
env:
PROTO_GENERATION: true
REQUIRE_PROTO_UP_TO_DATE: true
run: |
mvn -v
./mvnw clean install
./mvnw javadoc:javadoc -P javadoc # just to check if javadoc is generated
run: mise run ci

2 changes: 0 additions & 2 deletions .tool-versions

This file was deleted.

2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ If you're getting errors when running tests:
- Use `-Dcheckstyle.skip=true` to skip the checkstyle check during development.
- Use `-Dwarnings=-nowarn` to skip the warnings during development.

Combine all with `mvn test -DskipTests=true -Dspotless.check.skip=true -Dcoverage.skip=true -Dcheckstyle.skip=true -Dwarnings=-nowarn`.

## Updating the Protobuf Java Classes

Use `PROTO_GENERATION=true mvn clean install` to generate protobuf classes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;

import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_4_30_0.Metrics;
import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_4_30_1.Metrics;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import com.google.common.io.Resources;
import io.prometheus.client.it.common.ExporterTest;
import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_4_30_0.Metrics;
import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_4_30_1.Metrics;
import java.io.IOException;
import java.net.URISyntaxException;
import java.net.URLEncoder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import static org.assertj.core.api.Assertions.assertThat;

import io.prometheus.client.it.common.ExporterTest;
import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_4_30_0.Metrics;
import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_4_30_1.Metrics;
import java.io.IOException;
import java.net.URL;
import java.util.List;
Expand Down
15 changes: 15 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[env]
PROTO_GENERATION = "true"

[tools]
java = "temurin-17.0.13+11"
protoc = "30.1"

[tasks.ci]
description = "CI Build"
run = [
"./mvnw clean install",
# just to check if javadoc can be generated
"./mvnw javadoc:javadoc -P javadoc"
]
env = { PROTO_GENERATION = "true", REQUIRE_PROTO_UP_TO_DATE = "true" }
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import static org.assertj.core.data.Offset.offset;

import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_4_30_0.Metrics;
import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_4_30_1.Metrics;
import io.prometheus.metrics.expositionformats.internal.PrometheusProtobufWriterImpl;
import io.prometheus.metrics.expositionformats.internal.ProtobufUtil;
import io.prometheus.metrics.model.snapshots.CounterSnapshot;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import io.prometheus.metrics.core.datapoints.DistributionDataPoint;
import io.prometheus.metrics.core.exemplars.ExemplarSamplerConfigTestUtil;
import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_4_30_0.Metrics;
import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_4_30_1.Metrics;
import io.prometheus.metrics.expositionformats.internal.PrometheusProtobufWriterImpl;
import io.prometheus.metrics.expositionformats.internal.ProtobufUtil;
import io.prometheus.metrics.model.snapshots.ClassicHistogramBucket;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;

import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_4_30_0.Metrics;
import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_4_30_1.Metrics;
import io.prometheus.metrics.expositionformats.internal.PrometheusProtobufWriterImpl;
import io.prometheus.metrics.expositionformats.internal.ProtobufUtil;
import io.prometheus.metrics.model.snapshots.Labels;
Expand Down
8 changes: 4 additions & 4 deletions prometheus-metrics-exposition-formats/generate-protobuf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ GENERATED_WITH=$(grep -oP '\/\/ Protobuf Java Version: \K.*' "$TARGET_DIR/${PACK

if [[ $GENERATED_WITH != "$PROTOBUF_VERSION" ]]; then
echo "Generated protobuf sources version $GENERATED_WITH does not match provided version $PROTOBUF_VERSION"
echo "Please update the protoc version .tool-versions to the latest version of https://github.com/protocolbuffers/protobuf/releases"
echo "Please use https://github.com/asdf-vm/asdf - this will use the version specified in .tool-versions"
echo "Generated protobuf sources are not up-to-date. Please run 'PROTO_GENERATION=true mvn clean install' and commit the changes."
echo "Please use https://mise.jdx.dev/ - this will use the version specified in mise.toml"
echo "Generated protobuf sources are not up-to-date. Please run 'mise up && mvn clean install' and commit the changes."
exit 1
fi

STATUS=$(git status --porcelain)
if [[ ${REQUIRE_PROTO_UP_TO_DATE:-false} == "true" && -n "$STATUS" ]]; then
echo "Generated protobuf sources are not up-to-date. Please run 'PROTO_GENERATION=true mvn clean install' and commit the changes."
echo "Please use https://mise.jdx.dev/ - this will use the version specified in mise.toml"
echo "Generated protobuf sources are not up-to-date. Please run 'mvn clean install' and commit the changes."
echo "Local changes:"
echo "$STATUS"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion prometheus-metrics-exposition-formats/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<properties>
<automatic.module.name>io.prometheus.metrics.expositionformats</automatic.module.name>
<protobuf-java.version>4.30.0</protobuf-java.version>
<protobuf-java.version>4.30.1</protobuf-java.version>
</properties>

<dependencies>
Expand Down
Loading
Loading