Skip to content

fix: NaN metric values cause test failure - #109

Merged
haardikk21 merged 1 commit into
mainfrom
meyer9/fix-nan-values
Sep 24, 2025
Merged

haardikk21 merged 1 commit into
mainfrom
meyer9/fix-nan-values

Conversation

@meyer9

@meyer9 meyer9 commented Sep 23, 2025

Copy link
Copy Markdown
Collaborator

Description

NaN values cause metrics to not be written and eventually end up causing a crash. Fixes this issue by ignoring NaN values.

Testing

Added test for NaN values here

@cb-heimdall

cb-heimdall commented Sep 23, 2025 •

Copy link
Copy Markdown
Collaborator

✅ Heimdall Review Status

Requirement Status More Info
Reviews ✅ 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@meyer9
meyer9 force-pushed the meyer9/fix-nan-values branch from 1d60381 to b9652a7 Compare September 23, 2025 20:51
}
}
averageChange := (sum - prevSum) / (count - prevCount)
m.ExecutionMetrics[name] = value

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

this was only meant for debugging, but it was storing the entire prometheus object as json, so removed since it's not needed.

@cb-heimdall

Copy link
Copy Markdown
Collaborator

Review Error for haardikk21 @ 2025-09-24 12:13:57 UTC
User failed mfa authentication, see go/mfa-help

@haardikk21
haardikk21 self-requested a review September 24, 2025 12:14
@haardikk21
haardikk21 merged commit f682548 into main Sep 24, 2025
9 checks passed
@haardikk21
haardikk21 deleted the meyer9/fix-nan-values branch September 24, 2025 12:17
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.

3 participants