lucabello / noctua

Helper tool for Canonical's Observability CI.
Apache License 2.0
0 stars 0 forks source link

dry-run commands should use the actual command to be executed, not a text approximation #1

Open ca-scribner opened 1 week ago

ca-scribner commented 1 week ago

dry-runs like here are great but have no guarantee that they're in sync with the real code. Instead, what about using something like:

cmd = sh.COMMAND.bake(args)
print(f"executing {cmd}")
if not dry_run:
    cmd()
lucabello commented 1 week ago

It would be interesting to check if we can disable some sh commands entirely somehow, so that we wouldn't even need to pass down the dry_run flag.