argo-rollouts icon indicating copy to clipboard operation
argo-rollouts copied to clipboard

Dashboard crashes when result from AnalysisRun is [NaN]

Open FredrikAugust opened this issue 1 year ago • 2 comments

Checklist:

  • [x] I've included steps to reproduce the bug.
  • [x] I've included the version of argo rollouts.

Describe the bug

When clicking the "Analysis XX-post" button in the dashboard, the dashboard crashes. The console logs are

SyntaxError: Unexpected token 'N', "[NaN]" is not valid JSON
    at JSON.parse (<anonymous>)
    at revision.tsx:209:86
    at Array.map (<anonymous>)
    at c (revision.tsx:201:55)
    at ni (react-dom.production.min.js:157:137)
    at Ii (react-dom.production.min.js:180:154)
    at Ws (react-dom.production.min.js:269:343)
    at Ll (react-dom.production.min.js:250:347)
    at Ml (react-dom.production.min.js:250:278)
    at vl (react-dom.production.min.js:250:138)

Which points to this line of code: https://github.com/argoproj/argo-rollouts/blob/f72e565960e074fd885c14d88334168859c44a66/ui/src/app/components/rollout/revision.tsx#L220

To Reproduce

I have an analysistemplate which queries a linkerd prometheus instance which returns 0 / 0 which in turn becomes [NaN] by the time it hits the analysistemplate.

Expected behavior

It should not crash.

Screenshots

Screenshot 2023-05-05 at 13 18 52 Screenshot 2023-05-05 at 13 19 03

Version

quay.io/argoproj/kubectl-argo-rollouts:v1.4.1

Logs

time="2023-05-05T11:17:03Z" level=info msg="Enqueueing analysis after 4m59.970939132s" analysisrun=init-forms-665c967c8d-18-post namespace=init
time="2023-05-05T11:17:03Z" level=info msg="No status changes. Skipping patch" analysisrun=init-forms-665c967c8d-18-post namespace=init
time="2023-05-05T11:17:03Z" level=info msg="Reconciliation completed" analysisrun=init-forms-665c967c8d-18-post namespace=init time_ms=1.374922
time="2023-05-05T11:17:03Z" level=info msg="Patch status successfully" analysisrun=init-identity-f98d58899-5-post namespace=init
time="2023-05-05T11:17:03Z" level=info msg="Reconciliation completed" analysisrun=init-identity-f98d58899-5-post namespace=init time_ms=38.626467
time="2023-05-05T11:17:03Z" level=info msg="Started syncing Analysis at (2023-05-05 11:17:03.039851646 +0000 UTC m=+769134.470830621)" analysisrun=init-identity-f98d58899-5-post namespace=init
time="2023-05-05T11:17:03Z" level=info msg="Taking 0 Measurement(s)..." analysisrun=init-identity-f98d58899-5-post namespace=init
time="2023-05-05T11:17:03Z" level=info msg="Enqueueing analysis after 4m59.959520256s" analysisrun=init-identity-f98d58899-5-post namespace=init
time="2023-05-05T11:17:03Z" level=info msg="No status changes. Skipping patch" analysisrun=init-identity-f98d58899-5-post namespace=init
time="2023-05-05T11:17:03Z" level=info msg="Reconciliation completed" analysisrun=init-identity-f98d58899-5-post namespace=init time_ms=1.241185

Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritize the issues with the most 👍.

FredrikAugust avatar May 05 '23 11:05 FredrikAugust

This issue is stale because it has been open 60 days with no activity.

github-actions[bot] avatar Jul 05 '23 02:07 github-actions[bot]

Just want to add that it is not only NaN, we also get the same error with

      Started At:   2023-10-25T09:53:34Z
      Value:        [+Inf]

or

      Phase:        Error
      Started At:   2023-10-23T11:45:57Z
      Message:        Post "http://domain.com/prometheus/api/v1/query": context deadline exceeded

for example

fernandosiq-dh avatar Nov 10 '23 10:11 fernandosiq-dh