Skip to content

chore(deps): lift the prometheus/common hold and bump to v0.74.0 - #130

Merged
gjed merged 4 commits into
mainfrom
lift-prometheus-common-hold
Nov 15, 2026
Merged

gjed merged 4 commits into
mainfrom
lift-prometheus-common-hold

Conversation

@gjed

@gjed gjed commented Nov 15, 2026

Copy link
Copy Markdown
Owner

Closes #109

Lifts the github.com/prometheus/common hold added in #105 and bumps it to v0.74.0, which ships Prometheus text format 1.0.0 negotiation (prometheus/common#1035, listed in the v0.74.0 release notes).

Changes

  • renovate.json: remove the github.com/prometheus/common packageRule.
  • go.mod/go.sum: prometheus/common v0.72.1 → v0.74.0. MVS also adds github.com/pandatix/go-abnf v0.5.5 (indirect, required by expfmt in v0.74.0) and raises go.yaml.in/yaml/v2 v2.4.4 → v2.4.5 (required by v0.74.0). go mod tidy drops stale go.sum lines it already reports on main.
  • tests/integration/prometheus_live_check_test.go: the openmetrics case scrapes with the Prometheus v3.16.0 default Accept header instead of a lone OpenMetrics clause.
  • OpenSpec metric-export and weaver-schema specs and docs/metrics.md: /metrics name escaping follows the matching Accept clause (change archived as 2026-11-15-lift-prometheus-common-hold).

/metrics behaviour, main vs this PR

Accept main (v0.72.1) this PR (v0.74.0)
text/plain;version=1.0.0;escaping=allow-utf-8 text 0.0.4, github.pr.count text 1.0.0, github.pr.count
Prometheus 3.x default (OpenMetrics 1.0.0, 0.0.1, text 1.0.0, text 0.0.4, */*) text 0.0.4, github.pr.count text 1.0.0, github.pr.count
application/openmetrics-text;version=1.0.0;escaping=allow-utf-8 only text 0.0.4, github.pr.count text 0.0.4, github_pr_count
none text 0.0.4, github_pr_count unchanged
text/plain;version=0.0.4 text 0.0.4, github_pr_count unchanged

The OpenMetrics-only row changes: since prometheus/common#1008 (v0.73.0) the escaping comes only from the Accept clause that matches a served format. /metrics serves no OpenMetrics, so that clause matches nothing and the fallback uses the default underscore escaping. A scraper sending only OpenMetrics needs PrometheusText1.0.0 in scrape_protocols. Enabling OpenMetrics is not an option: under NoTranslation it types every counter unknown, and Prometheus 3.x would pick it by default.

OTLP export is unaffected: expfmt is used only by the /metrics handler.

Validation

  • go build ./..., go test ./..., make check-schema, make generate (no diff)
  • go test -tags integration ./tests/integration/... with weaver 0.28.0: 23/23 pass, including TestPrometheusLiveCheck_NamesAndTypes (openmetrics, text) and TestPrometheusLiveCheck_SuffixedNameDetected
  • make test-e2e: TestDashboardQueries (self-telemetry on/off), TestDashboardContinuity, logs tests pass
  • renovate-config-validator renovate.json: valid
  • curl against a locally running binary with the bridge enabled, for every row above

gjed added 2 commits November 15, 2026 10:56
prometheus/common v0.74.0 ships text format 1.0.0 negotiation
(prometheus/common#1035), so Prometheus 3.x's default scrape matches
text/plain;version=1.0.0;escaping=allow-utf-8 and /metrics serves
github.pr.count again instead of github_pr_count. Remove the
allowedVersions <0.73.0 rule added in #105.

Escaping is taken only from the matching Accept clause since v0.73.0
(prometheus/common#1008). /metrics does not serve OpenMetrics, so an
OpenMetrics-only Accept matches no format and gets underscore names.
The openmetrics live-check case now scrapes with the Prometheus
v3.16.0 default header, which also offers text 1.0.0.

go mod tidy adds github.com/pandatix/go-abnf v0.5.5 and raises
go.yaml.in/yaml/v2 to v2.4.5, both required by common v0.74.0, and
drops stale go.sum lines.

Closes #109
prometheus/common v0.74.0 takes the escaping only from the Accept clause
that matches a served format. /metrics serves no OpenMetrics, so an
OpenMetrics-only Accept, no Accept, or text 0.0.4 gets underscore-escaped
names. Reword the metric-export and weaver-schema scenarios to the
Prometheus 3.x default Accept header, add the OpenMetrics-only and legacy
scenarios, and document the case in docs/metrics.md.

Refs #109
@gjed gjed self-assigned this Nov 15, 2026
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Test Coverage

Total coverage: 85.4%

@gjed gjed left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

reviewer is the PR author — review event submitted as COMMENT.

Review effort: Standard
Findings: 1 Medium severity · 1 Low severity

Open (2)
What changed in this PR

Removes the Renovate hold on github.com/prometheus/common and bumps it from v0.72.1 to v0.74.0, which adds Prometheus text format 1.0.0 negotiation, so /metrics keeps serving UTF-8 names to the Prometheus 3.x default scrape while OpenMetrics-only scrapers now get underscore-escaped names.

Changes:

  • Drops the github.com/prometheus/common allowedVersions: <0.73.0 packageRule.
  • Bumps prometheus/common to v0.74.0; MVS adds pandatix/go-abnf v0.5.5 (indirect) and raises go.yaml.in/yaml/v2 to v2.4.5; go mod tidy prunes stale go.sum lines.
  • The openmetrics live-check case now scrapes with the full Prometheus v3.16.0 default Accept header.
  • metric-export and weaver-schema specs and docs/metrics.md describe escaping per matched Accept clause, with new OpenMetrics-only and legacy scenarios; OpenSpec change archived.
File Description
renovate.json Removes the prometheus/common hold rule
go.mod prometheus/common v0.74.0, adds indirect pandatix/go-abnf
go.sum New checksums, stale entries pruned
tests/integration/prometheus_live_check_test.go openmetrics case uses the Prometheus v3.16.0 default Accept header
docs/metrics.md Documents escaping by matched Accept clause and the scrape_protocols fix
openspec/specs/metric-export/spec.md Escaping requirement plus OpenMetrics-only and legacy scenarios
openspec/specs/weaver-schema/spec.md Live-check scrape headers updated
openspec/changes/archive/2026-11-15-lift-prometheus-common-hold/* Archived proposal, tasks and delta specs

Comment thread openspec/specs/metric-export/spec.md Resolved
gjed added 2 commits November 15, 2026 11:19
Scrape /metrics with the text 1.0.0, Prometheus default, OpenMetrics-only,
text 0.0.4 and empty Accept headers and assert the Content-Type and
github.pr.count vs github_pr_count, so a prometheus/common bump that
changes negotiation fails CI.
expfmt sorts Accept clauses by q before matching, so the escaping comes
from the highest-ranked matching clause, not the first listed.
@gjed
gjed merged commit 0d9a94b into main Nov 15, 2026
14 checks passed
@gjed
gjed deleted the lift-prometheus-common-hold branch November 15, 2026 10:33
@gjed-release

gjed-release Bot commented Nov 16, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 0.17.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(deps): lift the prometheus/common v0.73.0 hold

1 participant