Skip to content

fix(ui): tolerate non-JSON AnalysisRun measurement values - #6802

Closed
utkarshcmu wants to merge 1 commit into
akuity:mainfrom
utkarshcmu:fix/4630-non-json-measurement-value
Closed

fix(ui): tolerate non-JSON AnalysisRun measurement values#6802
utkarshcmu wants to merge 1 commit into
akuity:mainfrom
utkarshcmu:fix/4630-non-json-measurement-value

Conversation

@utkarshcmu

Copy link
Copy Markdown
Contributor

Description

Closes #4630

Argo Rollouts' web provider passes a plain text response body through unchanged, so an AnalysisRun measurement value is not guaranteed to be JSON. transformMeasurementValue called JSON.parse without a guard, so clicking an AnalysisRun under a Stage's Verifications tab failed with SyntaxError: Unexpected token 'P', "PASS" is not valid JSON and the analysis modal did not render at all.

An unparseable value is now treated as a non-chartable table value, surfacing the raw string rather than discarding it. This is consistent with how the function already handles unsupported formats a few lines below (// unsupported formats are stringified and put into table).

Verified the added tests fail without the fix, reproducing the reporter's exact SyntaxError, and pass with it. Full UI suite passes (190 tests); lint-ui and typecheck-ui are clean.

Checklist

Eligibility

  • Linked to an existing issue with no blocking labels (kind/proposal, needs discussion, needs research, maintainer only, area/security, size/large, size/x-large, size/xx-large).
  • Changes documentation only.
  • Changes ten lines or fewer.

Quality

  • Adds or updates corresponding tests.
  • Adds or updates corresponding documentation.

AI Use Disclosure

This PR was written:

  • By a human without AI assistance.
  • By a human with AI assistance. A human has reviewed every line prior to opening the PR.
  • By an AI with human supervision. A human has reviewed every line prior to opening the PR.
  • Entirely by an AI. No human has reviewed this prior to opening the PR.

Sign-Off

All commits:

  • Are signed off by their author (git commit -s) (required)
  • Are cryptographically signed (git commit -S) (encouraged)

🤖 Generated with Claude Code

Argo Rollouts' web provider passes a plain text response body through
unchanged, so a measurement value is not guaranteed to be JSON.
transformMeasurementValue called JSON.parse without a guard, which threw a
SyntaxError and stopped the analysis modal from rendering at all -- clicking
an AnalysisRun under a Stage's Verifications tab failed with
"SyntaxError: Unexpected token 'P', \"PASS\" is not valid JSON".

Treat an unparseable value as a non-chartable table value, consistent with
how the function already handles unsupported formats.

Signed-off-by: Utkarsh Bhatnagar <utkarsh.cmu@gmail.com>
@utkarshcmu
utkarshcmu requested a review from a team as a code owner August 12, 2026 14:51
@netlify

netlify Bot commented Aug 12, 2026

Copy link
Copy Markdown

Deploy Preview for docs-kargo-io ready!

Name Link
🔨 Latest commit 4571f75
🔍 Latest deploy log https://app.netlify.com/projects/docs-kargo-io/deploys/6a7c886487dbe00008836547
😎 Deploy Preview https://deploy-preview-6802.docs.kargo.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kargo-governance-bot kargo-governance-bot Bot added area/ui Affects the UI kind/bug Something isn't working as intended; If unsure that something IS a bug, start a discussion instead needs/priority Priority has not yet been determined; a good signal that maintainers aren't fully committed labels Aug 12, 2026
@utkarshcmu

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate — #6758 addresses the same issue and was opened first. Apologies for the noise; I missed the existing PR when picking this up.

@utkarshcmu utkarshcmu closed this Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ui Affects the UI kind/bug Something isn't working as intended; If unsure that something IS a bug, start a discussion instead needs/priority Priority has not yet been determined; a good signal that maintainers aren't fully committed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot view AnalysisRun result in UI - not a valid JSON

1 participant