Skip to content

test: assert Ready metric still emits for generic objects that define one#213

Open
DerekFrank wants to merge 1 commit into
awslabs:mainfrom
DerekFrank:test-node-ready-metric
Open

test: assert Ready metric still emits for generic objects that define one#213
DerekFrank wants to merge 1 commit into
awslabs:mainfrom
DerekFrank:test-node-ready-metric

Conversation

@DerekFrank

Copy link
Copy Markdown
Contributor

Follow-up to #212.

#212 stopped the GenericObjectController from fabricating a phantom Ready=Unknown metric for objects that don't define a Ready condition, and added a test for that absent-Ready case.

This adds the complementary case: an object that carries a real, persisted Ready condition (e.g. corev1.Node, whose Ready is set by kubelet) must still emit its Ready metric. This confirms the WithObservedOnly change filters only fabricated conditions, not ones actually present on the object — i.e. no regression to the Node/NodeClaim/NodePool Ready metrics that legitimately flow through this path.

Test-only; passes against current main.

… one

Follow-up to awslabs#212. That PR stopped the GenericObjectController from fabricating
a phantom Ready=Unknown metric for objects without a Ready condition, and tested
the absent-Ready case. This adds the complementary case: an object that carries a
real, persisted Ready condition (e.g. corev1.Node) must still emit its Ready
metric — confirming the observed-only change filters only fabricated conditions,
not present ones.
@DerekFrank DerekFrank requested a review from a team as a code owner July 9, 2026 21:18

@jmdeal jmdeal 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.

LGTM 🚀

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.

2 participants