Skip to content

test(prometheus.exporter.cadvisor): Demonstrate the v0.60.5 health-state fix (POC) - #7081

Closed
dehaansa wants to merge 4 commits into
update-cadvisor-v0.60.5from
test-cadvisor-health-state
Closed

dehaansa wants to merge 4 commits into
update-cadvisor-v0.60.5from
test-cadvisor-health-state

Conversation

@dehaansa

Copy link
Copy Markdown
Contributor

Brief description of Pull Request

POC: a Docker-socket integration test that demonstrates the cAdvisor v0.60.5 fix for container_health_state (google/cadvisor#3760).

Pull Request Details

This is a proof of concept and is not planned to merge.

It shows that the v0.60.5 update in #7079 fixes container_health_state: a container with no Docker HEALTHCHECK now reports -1 instead of 0, so it is no longer indistinguishable from an unhealthy container. That single upstream change (google/cadvisor#3760) covers both #6926 and #6928.

The reason it is not planned to merge: validating this behavior needs a Docker-socket-based integration test (cAdvisor reads container health from the Docker API), and we do not want to keep a Docker integration test for this component. The maintained cAdvisor test is the Kubernetes one in #7039.

Stacked on #7079 so the test runs with the fix present.

Issue(s) fixed by this Pull Request

Notes to the Reviewer

PR Checklist

  • Documentation added
  • Tests updated
  • Config converters updated
  • This pull request was substantially generated with AI assistance (see the GenAI policy)

dehaansa and others added 4 commits September 10, 2026 11:35
Validate the cAdvisor v0.60.5 fix for container_health_state
(google/cadvisor#3760). A sibling container with no HEALTHCHECK must report
-1 instead of 0, which distinguishes it from an unhealthy container
(issues #6926 and #6928). Add a Docker-socket-based test with two sibling
containers and an AssertMetricValue helper that checks an exact sample value.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…C checks

Extend the cAdvisor docker POC to demonstrate two more v0.60.5 behaviours:

- container_fs_usage_bytes and container_fs_limit_bytes are populated again,
  exercising the explicit filesystem-plugin wiring.
- a container that declares a collector via io.cadvisor.metric.prometheus
  labels has its endpoint scraped, surfacing test_app_metric. This exercises
  the CollectorManagerFactory wiring for application metrics.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…cker POC

Add a plain image label to the app-metrics fixture and assert it surfaces as
container_label_com_grafana_cadvisor_test on the container's metrics. This
exercises cAdvisor's Docker container-label path, which the raw cgroup driver
cannot provide.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dehaansa dehaansa closed this Sep 10, 2026
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.

1 participant