Skip to content

chore: add node-exporter validation before version bump#9019

Open
chmill-zz wants to merge 6 commits into
mainfrom
furthervalidationNE
Open

chore: add node-exporter validation before version bump#9019
chmill-zz wants to merge 6 commits into
mainfrom
furthervalidationNE

Conversation

@chmill-zz

Copy link
Copy Markdown
Contributor

What this does

  • parses the node-exporter scrape as Prometheus exposition data instead of checking for any node_ text
  • validates every node-exporter metric family retained by the AKS default Prometheus profile
  • verifies the service is persistently enabled and remains active after scraping
  • adds focused unit coverage for valid and missing metric families

Why

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 TestValidateNodeExporterMetrics
  • go test . -run ^
  • go test ./components
  • go vet .
  • git diff --check

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 /metrics output using Prometheus text exposition parsing and validate a fixed set of required metric families.
  • Tighten the systemd enablement check to require a persistently enabled unit 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.

Comment thread e2e/validators.go Outdated
Copilot AI review requested due to automatic review settings July 23, 2026 04:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread e2e/validators.go Outdated
Copilot AI review requested due to automatic review settings July 23, 2026 04:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread e2e/validators.go Outdated
Copilot AI review requested due to automatic review settings July 23, 2026 04:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Comment thread e2e/go.mod Outdated
Copilot AI review requested due to automatic review settings July 23, 2026 09:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread e2e/validators.go
Comment thread e2e/validators.go Outdated
Comment thread e2e/validators_node_exporter_test.go
Copilot AI review requested due to automatic review settings July 23, 2026 18:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants