fix(cli): add V2 asset support for logs and check-run-data retrieval [AI-61]#1248
fix(cli): add V2 asset support for logs and check-run-data retrieval [AI-61]#1248martzoukos merged 2 commits intomainfrom
Conversation
sorccu
left a comment
There was a problem hiding this comment.
Those failures indicate an incompatible backend change. If accidental, this PR is not needed and the backend needs to be fixed. If on purpose, then we need to rethink these tests.
Fixing the source is definitely the way to go, if the tests broke suddenly and recently. Thank you for researching that. |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
b47a691 to
0e4b443
Compare
|
Hello again @sorccu , armed with more context, I come back with new changes:
The tests seem to go green (save for the Windows one) with minimal changes to the cli tests code, so I think that might have a good solution on our hands. Let me know what you think. |
|
Can you update the title and description to match the latest version of the PR? |

Summary
packages/cli/src/rest/assets.tsso thatcheckly test --verbosedisplays logs and check-run-data for accounts using theLEGACY_RUNNER_ASSETS_V2feature flagconfig.getcrash in empty-account e2e tests by guarding withconfig.hasProblem
monorepo#596 (
feat: add support for v2 assets for BROWSER/MULTI_STEP checks) changed how runners store check result assets. V1 uploaded each asset as a separate S3 file (logPath,checkRunDataPath, etc.). V2 bundles everything into a single ZIP archive with byte-range offsets per entry.The runner side was updated but the CLI was not. The
getAssetsmethod inassets.tsonly handled V1 and V3 formats — when it received a V2 asset,keystayedundefinedand the method silently returned nothing. This meantnpx checkly test --verboseshowed no logs or check-run-data for BrowserCheck and MultiStepCheck runs on affected accounts.The V2 types (
CheckResultAssetsV2,isCheckResultAssetsV2) were already defined in the file but never wired into the retrieval logic.Fix
Added a
getAssetsV2method that:entriesarray (logs.txtfor logs,check-run-data.jsonfor check-run-data)/redirect?link=trueendpointRangerequest to fetch just the needed bytes from the ZIP