StackStorm / StackStorm/st2

st2 key list --last 1 does not print truncation note

Open
#4,670 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

SUMMARY

Found by the BATS tests.

st2 key list -n 1 does truncate the result list, but it does not print the truncation note.

Output:

+-----------+------------+--------+-----------+--------------+------+------------------+
| name      | value      | secret | encrypted | scope        | user | expire_timestamp |
+-----------+------------+--------+-----------+--------------+------+------------------+
| name=asdf | value=fdsa | False  | False     | st2kv.system |      |                  |
+-----------+------------+--------+-----------+--------------+------+------------------+
ISSUE TYPE

Pick one below and delete the rest:

  • Bug Report
STACKSTORM VERSION

Paste the output of st2 --version:

st2 3.1dev (b88f9a3), on Python 2.7.12

OS / ENVIRONMENT / INSTALL METHOD

Ubuntu 16.04

STEPS TO REPRODUCE

Ensure that two or more keys exist, then run st2 key list -n 1.

EXPECTED RESULTS

The truncated list and the truncation note should be printed.

ACTUAL RESULTS

The truncation note is not printed.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the st2 key list -n 1 CLI entry point and the BATS tests that exposed the issue. Reproduce the command with at least two keys, then trace how the truncated result and truncation note are handled. Done means the list and its truncation note are both printed, with the relevant BATS test passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.