← Back to issue list

docs: fix parameter names showing as None in CLI usage docs

View original Github issue

Metadata

Project
charmcraft
Number
#2671
Type
pull request
State
open
Author
Copilot
Labels
Created
Updated
Closed

Current evaluation

Fixes gen_cli_docs.py so required-argument metavars fall back to argparse conventions (dest / dest.upper()) instead of rendering as <None> in CLI usage docs. +10/-1 in one file; approved, CI green except pre-existing infra failures; unmerged ~51 days.

Suggested action: needs review

Reason: The PR is approved with 0 unresolved comments and the underlying bug is verified still present at HEAD (action.metavar used directly in required.append, issues #2578 and #2642 both still open), so it is ready to land and just needs a maintainer to merge. Failing CI checks (snap-store-tests, snap-tests 20.04/22.04/25.10/26.04, OSV-scanner) are documented in the body as pre-existing infrastructure/upstream issues (expired Charmhub credentials, craft_providers snapd init per #2509, transient apt failures), not regressions from this change. Slight uncertainty remains on why an approved PR has sat unmerged for ~51 days and on whether the OSV-scanner failure is truly pre-existing.

Impact: 30 Quick Win: 27.0 Staleness: 40 Complexity: 10 Confidence: 80

Issue body

- [x] Investigated CI failures on main and open PRs - [x] Found and fixed bug in `tools/docs/gen_cli_docs.py`: required argument metavars show as `<None>` in usage strings when `metavar` is not explicitly set (fixes #2578, #2642) - [x] Fix falls back to argparse convention: positional args use `dest`, optional args use `dest.upper()` - [x] Code review and CodeQL security scan both pass - [x] Draft PR #2671 created - [x] CI is in `action_required` state (needs maintainer approval - standard for Copilot PRs) **Other CI failures found on main (documented below, no simple fix in charmcraft):** - [x] `snap-store-tests` failing: Charmhub credentials expired (infrastructure issue) - [x] `snap-tests (ubuntu-22.04/20.04)`: `smoketests/different-dir-metadata` fails due to craft_providers snapd initialization issue (upstream issue in craft_providers; see PR #2509) - [x] `snap-tests (ubuntu-26.04)`: Transient apt package unavailability on Ubuntu devel daily builds (`gcc` and `python3-dev` not found) — not fixable in charmcraft - [x] Spread tests have been failing consistently since at least March 2026 (all due to upstream issues)

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 30
Quick Win: 27.0
Staleness: 40
Complexity: 10
Confidence: 80
needs review Fixes gen_cli_docs.py so required-argument metavars fall back to argparse conventions (dest / dest.upper()) instead of rendering as <None> in CLI usage docs. +10/-1 in one file; approved, CI green except pre-existing infra failures; unmerged ~51 days.
qwen/qwen3.8-27b
Impact: 25
Quick Win: 22.5
Staleness: 45
Complexity: 10
Confidence: 80
needs review Fixes gen_cli_docs.py so required argument metavars fall back to argparse conventions (dest / dest.upper()) instead of rendering as <None> in CLI usage docs. +10/-1, approved, 0 unresolved comments; CI in action_required state awaiting maintainer approval.
qwen3.6-35b-a3b-mtp-q6
Staleness: 35
Complexity: 10
Confidence: 90
needs review Fixes CLI documentation generation bug where required argument metavars display as <None>. Applies argparse fallback conventions. Approved by reviewer, CI passing except for known infrastructure failures.
qwen3.6-35b-a3b-mtp-q6
Staleness: 45
Complexity: 20
Confidence: 85
needs review Fixes CLI usage docs where required argument metavars display as <None> by falling back to argparse conventions. Currently a draft PR awaiting maintainer approval for CI.
qwen3.6-35b-a3b-mtp-q6
Staleness: 45
Complexity: 20
Confidence: 80
needs review Fixes CLI usage docs where required argument metavars incorrectly display as <None>. Updates gen_cli_docs.py to fallback to argparse conventions. Currently awaiting maintainer approval in CI.
qwen3.6-35b-a3b-mtp-q6
Staleness: 45
Complexity: 10
Confidence: 85
needs review Resolves CLI documentation bug where required argument metavars render as None. Applies argparse fallback conventions for dest and dest.upper(). Code review and security scans pass. Awaiting maintainer approval to merge.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: charmcraft#2578 (confidence 90%)

    PR body explicitly states it fixes #2578; issue (usage params show as None) still open and bug verified unfixed at HEAD.

  • Likely Fixed By: charmcraft#2642 (confidence 90%)

    PR body explicitly states it fixes #2642 (release docs show None parameter names); issue still open.

  • Related To: charmcraft#2509 (confidence 60%)

    Cited in PR body as the upstream craft_providers snapd initialization issue behind the snap-tests failures on main.

Related issues

No related issues found above the similarity threshold.