Skip to content

Add RCA support for test session error groups#1303

Merged
thebiglabasky merged 1 commit into
mainfrom
herve/rca-test-session-error-groups
May 19, 2026
Merged

Add RCA support for test session error groups#1303
thebiglabasky merged 1 commit into
mainfrom
herve/rca-test-session-error-groups

Conversation

@thebiglabasky
Copy link
Copy Markdown
Contributor

@thebiglabasky thebiglabasky commented May 19, 2026

What changed

Adds checkly rca run --test-session-error-group <id> support alongside the existing --error-group flow.

  • Adds a REST client for test session error groups.
  • Calls POST /v1/root-cause-analyses/test-session-error-groups/{testSessionErrorGroupId} for the new source type.
  • Keeps the existing error-group path intact.
  • Uses a generic normalizeFlagAliases() helper for the multi-character -te alias instead of command-local argv rewriting.
  • Updates pending RCA output for terminal, Markdown, and JSON, including aligned terminal labels for the longer test-session label.
  • Adds formatter coverage plus flag-alias helper coverage.

Release-transition import note

Simo mentioned that new local imports should use .js extensions before the next major release. New or modified local imports in this PR now use .js extensions, including ./test-session-error-groups.js, ../../helpers/flags.js, and the new helper test import.

Validation

  • npx eslint packages/cli/src/commands/rca/run.ts packages/cli/src/formatters/rca.ts packages/cli/src/formatters/__tests__/rca.spec.ts packages/cli/src/rest/api.ts packages/cli/src/rest/rca.ts packages/cli/src/rest/test-session-error-groups.ts packages/cli/src/helpers/flags.ts packages/cli/src/helpers/__tests__/flags.spec.ts
  • npm exec --workspace packages/cli -- vitest --run src/formatters/__tests__/rca.spec.ts src/helpers/__tests__/flags.spec.ts
  • npm run prepack --workspace packages/cli

npm run prepare:dist --workspace packages/cli currently fails on an unrelated existing issue in src/auth/index.ts: jwt-decode has no exported member jwtDecode in the installed dependency/type shape.

@thebiglabasky thebiglabasky force-pushed the herve/rca-test-session-error-groups branch 2 times, most recently from 1aaf988 to b84ba54 Compare May 19, 2026 14:25
@thebiglabasky thebiglabasky force-pushed the herve/rca-test-session-error-groups branch from b84ba54 to 92b5a98 Compare May 19, 2026 14:33
@thebiglabasky thebiglabasky marked this pull request as ready for review May 19, 2026 14:34
import chalk from 'chalk'
import { AuthCommand } from '../authCommand'
import { outputFlag } from '../../helpers/flags'
import { normalizeFlagAliases, outputFlag } from '../../helpers/flags.js'
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.

worth noting the js imports ? in an agents.md

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's been an ask from @sorccu until we make the big major upgrade. That's how I understood it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

So I don't think this will stay like this for long

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.

👍

@thebiglabasky thebiglabasky merged commit 94cac85 into main May 19, 2026
6 checks passed
@thebiglabasky thebiglabasky deleted the herve/rca-test-session-error-groups branch May 19, 2026 15:42
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