transform-hub icon indicating copy to clipboard operation
transform-hub copied to clipboard

[CLI/STH] si seq ls does not return valid JSON if number of seq > 100

Open daro1337 opened this issue 2 years ago • 2 comments

Describe the bug I've uploaded a lot of sequences to STH, now running si sequence ls it trims JSON output like following:

  {
    id: 'b3290435-ee94-42a5-9b32-e28a3eefa895',
    config: {
      type: 'kubernetes',
      entrypointPath: 'hello.py',
      version: '0.19.0',
      name: '@scramjet/hello-py',
      id: 'b3290435-ee94-42a5-9b32-e28a3eefa895',
      sequenceDir: '/root/.scramjet_k8s_sequences/b3290435-ee94-42a5-9b32-e28a3eefa895',
      engines: [Object]
    },
    instances: []
  },
  {
    id: 'aba447c4-a221-408c-8679-068c4576cfc0',
    config: {
      type: 'kubernetes',
      entrypointPath: 'hello.js',
      version: '0.19.0',
      name: '@scramjet/hello-js',
      id: 'aba447c4-a221-408c-8679-068c4576cfc0',
      sequenceDir: '/root/.scramjet_k8s_sequences/aba447c4-a221-408c-8679-068c4576cfc0',
      engines: {}
    },
    instances: []
  },
  ... 46 more items
]

Because of this, I can't parse JSON, and i can't see all sequences via CLI :(

I think there is limit around 100 sequences, then ... X more items is added to the output. Probably same issue with si inst ls

Steps to Reproduce

  1. upload 101 sequences (i've got 146)
  2. run si sequence ls

Expected behavior

  • si seq ls returns valid JSOn
  • si seq ls have some kind of pagination

Version (please complete the following information):

  • STH version: 0.24.1
  • node version: 16.x
  • os: kubernetes

Additional information like logs, screenshots etc.

daro1337 avatar Jun 07 '22 07:06 daro1337