Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • L lavacli
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • lava
  • lavacli
  • Issues
  • #22

Closed
Open
Created May 15, 2023 by Paul Sokolovsky@pfalcon

"lavacli jobs logs --raw" appears to be not raw enough (cannot download multi-megabyte logs)

This is posted based on https://linaro.atlassian.net/browse/TFC-442 . As a quick recap, it's about a CI job submitting a LAVA job producing 200MB log, then trying to download it. This download appears to guaranteedly fail (https://ci.trustedfirmware.org/job/tf-a-builder/2058583/consoleFull):

00:40:04.330 + resilient_cmd sh -c 'lavacli jobs logs --raw 1591316 > /home/buildslave/workspace/tf-a-builder/lava-raw.log'
00:40:04.331 + set +x
00:45:41.078 ERROR: Command 'sh -c lavacli jobs logs --raw 1591316 > /home/buildslave/workspace/tf-a-builder/lava-raw.log' failed 10 times in row

Trying to reproduce it manually (lavacli 1.9), I see exactly the same behavior, it 100% fails:

$ lavacli jobs logs --raw 1591316 > log
Unknown error: while parsing a block collection
  in "<unicode string>", line 1, column 1
did not find expected '-' indicator
  in "<unicode string>", line 2176, column 2

)() I have no idea why the error message like above doesn't show in the CI log (I verified that it's output to stderr and not stdout). But the error message itself appears to be from YAML parsing, which somehow doesn't correspond to the --raw flag. I'd expect that with --raw, any output received from LAVA API would be directly printed, without any attempts at parsing. Likewise, watching the memory usage of the command run locally (which spikes up to 1GB), again it seems that the log is for some reason is accumulated in the memory, whereas for --raw behavior, I would expect it to be "streamed" from LAVA to stdout (chunk by chunk, without any accumulation).

All in all, I suspect that such behavior (attempt at parsing) might be the reason the command 100% fails, and with such a confusing error message. It's pretty clear that 200MB log is just too big, but this ticket is what behavior lavacli has in such cases, and whether we can improve it.

Assignee
Assign to
Time tracking