chore: add node-exporter validation before version bump#9019
Open
chmill-zz wants to merge 6 commits into
Open
Conversation
chmill-zz
requested review from
AbelHu,
Devinwong,
SriHarsha001,
awesomenix,
calvin197,
cameronmeissner,
djsly,
ganeshkumarashok,
karenychen,
lilypan26,
mxj220,
pdamianov-dev,
phealy,
r2k1,
runzhen,
sulixu,
timmy-wright,
titilambert,
xuexu6666 and
zachary-bailey
as code owners
July 23, 2026 04:01
Contributor
There was a problem hiding this comment.
Pull request overview
This PR strengthens the AgentBaker e2e validation for node-exporter by treating the scrape output as Prometheus exposition format and asserting the presence of specific metric families that represent the AKS default Prometheus scraping contract, establishing a baseline before a future node-exporter version bump.
Changes:
- Parse
/metricsoutput using Prometheus text exposition parsing and validate a fixed set of required metric families. - Tighten the systemd enablement check to require a persistently
enabledunit state and verify the service stays active after scraping. - Add unit tests covering valid metrics text and a missing-required-metric failure case.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
e2e/validators.go |
Reworks node-exporter e2e validation to parse Prometheus exposition format and validate required metric families; adds post-scrape service health check. |
e2e/validators_node_exporter_test.go |
Adds focused unit tests for the node-exporter metrics validation helper. |
e2e/go.mod |
Adds github.com/prometheus/common dependency to support exposition parsing. |
r2k1
reviewed
Jul 23, 2026
djsly
reviewed
Jul 23, 2026
djsly
reviewed
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
node_textWhy
Node-exporter is currently pinned to 1.9.1 and PMC now carries 1.12.1. This establishes the existing metrics contract before taking the multi-minor version update in a separate PR.
Validation
go test . -run TestValidateNodeExporterMetricsgo test . -run ^go test ./componentsgo vet .git diff --check