Commit 62fde99
Fix PrometheusMetricsTest on source tarball (#8702)
When you run the tests from the sources in the source release tarball there is no git reference and we are publishing on the metrics a placeholder.
`pulsar_version_info{cluster="test",version="2.7.0",commit="${git.commit.id}"} `
I noticed the problem because PrometheusMetricsTest.java is failing on 2.7.0 sources
The fix is to detect this fact an publish only an empty string.
The change affects PulsarVersion, that in turn is used in Prometheus metrics endpoint
(cherry picked from commit 55e40fe)1 parent 35ca55c commit 62fde99
File tree
2 files changed
+6
-1
lines changed- pulsar-broker/src/test/java/org/apache/pulsar/broker/stats
- pulsar-common/src/main/java-templates/org/apache/pulsar
2 files changed
+6
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
568 | | - | |
| 568 | + | |
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| |||
0 commit comments