Skip to content

Commit 71cf428

Browse files
committed
Update release docs
1 parent 53d622b commit 71cf428

File tree

1 file changed

+44
-2
lines changed

1 file changed

+44
-2
lines changed

MAINTAINER_NOTES.md

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,57 @@ Use the [Versions Maven Plugin](https://www.mojohaus.org/versions-maven-plugin/i
88
./mvnw versions:use-latest-releases
99
```
1010

11+
The versions plugin does not catch the `otel.version` in `prometheus-metrics-exporter-opentelemetry`. This needs to be updated manually.
12+
13+
## Update Shaded Dependencies
14+
15+
There are two modules for shaded dependencies:
16+
* `prometheus-metrics-shaded-opentelemetry`: OpenTelemetry data model.
17+
* `prometheus-metrics-shaded-protobuf`: Google's protobuf library.
18+
19+
The shaded modules are commented out in the root `pom.xml`. Instead of using the shaded dependencies from the project, we use the latest shaded dependencies from Maven central (or from the local Maven repository in `~/.m2/repository/`). This way we can `include` the shaded package name directly. We find this easier than importing the original package name and have it renamed at build time.
20+
21+
In order to update dependencies of the shaded modules (like Google's protobuf library or the OpenTelemetry library), do the following:
22+
23+
Step 1: Install updated versions of the shaded dependencies in your local Maven repository.
24+
25+
* Update the dependency versions in the shaded modules (both `*.version` and `*.version.string`).
26+
* `cd ./prometheus-metrics-shaded-dependencies ; ../mvnw install ; cd ..`
27+
28+
Step 2: Update `prometheus-metrics-expositon-formats`
29+
30+
* Change the version of the `prometheus-metrics-shaded-protobuf` dependency in `pom.xml` to `${project.version}`.
31+
* Update `PROTOBUF_VERSION_STRING` in `generate-protobuf.sh` and run the script to update the source code.
32+
* Use find-and-replace to update the version numbers in the imported package names in the source code of `prometheus-metrics-exposition-formats` and `prometheus-metrics-core`.
33+
34+
Step 3: Update `prometheus-metrics-exporter-opentelemetry`
35+
36+
* Change the version of the `prometheus-metrics-shaded-opentelemetry` dependency in `pom.xml` to `${project.version}`.
37+
* Use find-and-replace to update the version numbers in the imported package names in the source code of `prometheus-metrics-exporter-opentelemetry`.
38+
39+
Step 4: Release
40+
41+
_see below_
42+
1143
## Release
1244

45+
Create a commit to temporarily add shaded dependencies to the project:
46+
47+
* Add the `prometheus-metrics-shaded-dependencies` module to the root `pom.xml`.
48+
* Change the versions of the shaded dependencies to `${project.version}` in `prometheus-metrics-exporter-opentelemetry` and `prometheus-metrics-exposition-formats`.
49+
50+
Release:
51+
1352
```
1453
./mvnw release:prepare -DreleaseVersion=1.2.0 -DdevelopmentVersion=1.3.0-SNAPSHOT
1554
./mvnw release:perform -DreleaseVersion=1.2.0 -DdevelopmentVersion=1.3.0-SNAPSHOT
1655
```
1756

18-
`release:prepare` does Github tags and commits, while `release:perform` signs the artifacts and uploads them to the staging repositoring on [https://oss.sonatype.org](https://oss.sonatype.org).
57+
`release:prepare` does GitHub tags and commits, while `release:perform` signs the artifacts and uploads them to the staging repositoring on [https://oss.sonatype.org](https://oss.sonatype.org).
1958

2059
After that, manually verify the uploaded artifacts on [https://oss.sonatype.org/#stagingRepositories](https://oss.sonatype.org/#stagingRepositories), click `Close` to trigger Sonatype's verification, and then `Release`.
2160

22-
Note: We release only the parent module and the modules starting with simpleclient. Currently, we manually remove the benchmark and integration test modules. Todo: Instead of manually removing these modules, we should reconfigure the build to make sure that these modules aren't released.
61+
Create a commit to remove dependencies from the build (undoing the first step):
62+
63+
* Comment out the `prometheus-metrics-shaded-dependencies` module to the root `pom.xml`.
64+
* Change the versions of the shaded dependencies to the latest released version on Maven Central in `prometheus-metrics-exporter-opentelemetry` and `prometheus-metrics-exposition-formats`.

0 commit comments

Comments
 (0)