Skip to content

BREAK: make destructive action scripts consistent

Angelos Evripiotis requested to merge aevri/safe_noninteractive into master

Description

Make sure that BuildStream doesn't behave differently about destructive things just because it's in non-interactive mode, e.g. being run from a misconfigured workflow helper script.

By default, assume that users opt-out of destructive actions if we are unable to ask them. For the currently affected commands, this means aborting completely.

This seems less surprising than doing the destructive action instead. Also, for folks that find the new behaviour surprising, at least they don't lose work.

Introduce an '--assume-yes' option to affected commands to override this behaviour.

If a command aborts for this reason, print a message suggesting the use of '--assume-yes'. Don't mention the corresponding 'prompt.*' options that also control this behaviour - this would hinder portability of scripts between users with different settings.

Changes proposed in this merge request:

Add --assume-yes options to these commands, and change the non-interactive behaviour:

  • bst workspace close --remove-dir
  • bst workspace reset

This merge request, when approved, will close: #744 (closed), #726 (closed).


  • Depends on !887 (merged), rebase when that lands.
  • Fixup tests to use --assume-yes.
  • Add tests for --assume-yes and prompt.really-workspace-*.
  • Fixup developing.run and junctions.run to use --assume-yes.
  • Fixup spelling of --remove-dirs(sic) in junctions.run while we're there.
  • Update doc/sources/sessions-stored with accumulated changes.
  • Update doc/sources/sessions-stored with changes from this MR.
  • Consider adding man/bst-artifact-server.1, which seems to be missing.
  • Update doc/man with accumulated changes. (!981 (merged))
  • Update doc/man with changes from this MR.
  • Look for other things to fixup, by checking previous changes to cli.
  • Consider adding and missing steps to contributing.rst.
Edited by Angelos Evripiotis

Merge request reports