Skip to content

status does not accept the inputs run accepts #640

Description

@haribo

Why

status and run read the same plan with different inputs.

flag run status
--vars yes no
--set yes no
-v yes no
--agent-ttl yes no
--inventory, --limit, --parallel, --json, --insecure, --known-hosts, --secret-file, --secret-env yes yes

A plan whose values come from --set or a --vars file cannot be inspected with status:
the command that exists to answer "what would this plan see?" cannot be given what the
plan sees. It fails on an unbound variable, or silently uses different values.

--dry-run and --check are run-only by design — those are modes, not inputs. The four
above are inputs.

Build

Give status the same input flags as run. loadGlobals already builds the map from
--vars + --set for run; statusCmd calls the same loader without them.

-v and --agent-ttl are the same argument in a weaker form: one is output detail, the
other a transport knob, and neither has a reason to differ between the two commands.

Worth deciding while there: whether the two commands should share a single flag-set
definition rather than each declaring its own. They have drifted once; they will drift
again.

Validation

  • shellf status --set k=v … resolves a plan using ${k}, and produces the same resolved
    values as run --dry-run on the same inputs — asserted by comparing the two reports, not
    by reading the code.
  • A plan needing no variables behaves exactly as before.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugdefect or malfunction

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions