canonical / canonical/testflinger

Testflinger CLI Multi-Value Argument Inconsistencies

Open
#980 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
26
Forks
49
Avg merge
4d 8h
Merged PRs (30d)
16

Description

Some of these "issues" are in the works, and so aren't real problems yet. However, that for example the `--key` argument; the example help string indicates that the expected syntax will be what has been fixed to match in the `curses` branch. (Note: curses branch does not use curses, it was poorly named)

Testflinger CLI has **3 different ways** to pass multiple values.

Summary of all variants found (Style (branch): example):
- Repeated flag referenced in help text for `reserve` subcommand: `--key lp:user --key gh:user`
- action="append"
- singular
- Space-separated (`main`): `--agents agent1 agent2`
- action="extend" + nargs="+"
- plural
- Comma-separated (`status-list`): `--fields name,status,location`
- No action= or nargs= specified
- plural
- `default="name,status,location,provision_type,comment"`
- Single string value
- Code manually splits on comma in processing: `fields = [f.strip() for f in self.args.fields.split(",")]`

Contributor guide

Open the contributing guide

Research direction

Start by locating the CLI argument definitions for the reserve, main, and status-list subcommands, then compare them with the behavior described for the curses branch. A maintainer decision is needed on one multi-value convention before changing help text, parsing, and processing. Done means the affected arguments use the agreed convention consistently and their examples match it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.