Skip to content

FFM-10325 Fix issue with detecting empty evaluation/target metrics #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 3, 2024

Conversation

erdirowlands
Copy link
Contributor

@erdirowlands erdirowlands commented Jan 3, 2024

What

Tidies up logic around checking if there are valid metrics to process. This also ensures that metrics are processed and sent when a target hasn't been used for an evaluation.

Also fixes an issue where we log 5002 on SSE heartbeat events

Why

A customer reported that when evaluating without a target, their flag metrics were not being reported.

Testing

  • TestGrid metrics suite

  • Manual sample script:

    • Evaluation with target
    • Evaluation with undefined target
    • No evaluations
  • SSE Testing:

    • Heartbeats are logged separately
    • Regular events are processed and logged correctly

@@ -101,11 +101,6 @@ export const MetricsProcessor = (
};

const _summarize = (): Metrics | unknown => {
if (!data) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

data is initialized when it is declared so this will always be true

return;
}

const metrics: Metrics = _summarize();

if (metrics && metrics.metricsData.length && metrics.targetData.length) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can safely remove this check, because the earlier data check now works correctly.

@erdirowlands erdirowlands merged commit 72ad693 into main Jan 3, 2024
@erdirowlands erdirowlands deleted the FFM-10325 branch January 3, 2024 14:53
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