Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rose suite-run --new: prompt for confirmation #1536

Closed
kaday opened this issue Feb 9, 2015 · 12 comments
Closed

rose suite-run --new: prompt for confirmation #1536

kaday opened this issue Feb 9, 2015 · 12 comments
Milestone

Comments

@kaday
Copy link
Contributor

kaday commented Feb 9, 2015

rose suite-run --new may need a This deletes the logs and they will not be available via rose bush. Are you sure? or added/different functionality.

Moving to or to be done in cylc?

cylc issue: cylc/cylc-flow#1030

@kaday kaday added this to the later milestone Feb 9, 2015
@matthewrmshin matthewrmshin self-assigned this Feb 9, 2015
@matthewrmshin matthewrmshin changed the title Reminder issue: rose suite-run --new rose suite-run --new: prompt for confirmation Feb 9, 2015
@matthewrmshin
Copy link
Member

The reason why it is undesirable to implement this now is that users may have scripts calling rose suite-run --new. An interactive prompt may cause them to hang.

@dpmatthews
Copy link
Member

Currently it's not easy if you want to run a suite from scratch (i.e. clear out existing share & work directories) but want to retain any previous run output for comparison. I wonder if --new should be changed to do this and we then introduce a --clean which matches the current behaviour.

@arjclark
Copy link
Contributor

It makes sense for --new to remain run as if a completely new, from scratch, run that (re)creates the various suite runtime locations. Removing specific things, such as share and work directories, is more of a clean type functionality, so I'm not adverse to a --clean option that would clear out existing work and share directories.

@jonnyhtw
Copy link

jonnyhtw commented May 3, 2016

I would certainly advocate the implementation of an are you sure [y/n] type check to the --new flag if possible, having recently accidentally deleted some data!

Cheers

Jonny

@arjclark
Copy link
Contributor

See cylc/cylc-flow#1885

@arjclark arjclark modified the milestones: some-day, later Nov 28, 2016
@hjoliver
Copy link
Contributor

This issue has recently been raised again at NIWA (ping @jonnyhtw). Evidently users do accidentally delete important data, occasionally, with over-zealous use of --new. I initially argued that --new implies "start from scratch" i.e. delete existing files first, and a command option should not be used if you don't know what it means. But on reflection, maybe --new is not sufficiently indicative of the effect it has ... --nuke would be better 😬 . Point taken on an interactive prompt hanging scripts up, but perhaps a prompt could be optional user global config, or overridden in scripts with a --force option...

@jonnyhtw
Copy link

Thanks @hjoliver

FYI this is already implemented in my branch to my Rose fork here...

https://github.com/jonnyhtw/rose/tree/rose_suite-run_confirmation_when_running_with_--new_flag

Cheers

@jonnyhtw
Copy link

Just another note that rosie delete [suite ID] does already ask the user for a prompt. Admittedly this is unlikely to occur in scripting like rose suite-run but it does serve as an example of the utility of this type of prompting IMHO.

Cheers

@arjclark
Copy link
Contributor

arjclark commented Aug 15, 2017

Just another note that rosie delete [suite ID] does already ask the user for a prompt. Admittedly this is unlikely to occur in scripting like rose suite-run but it does serve as an example of the utility of this type of prompting IMHO.

Yeah... we ended up putting that in as (among other things) the rosie delete command can be used to delete local copies in the roses directory as well as copies in the repository depending on whether or not you used the --local-only option and it was confusing users what they were about to do - thinking they were going to do one thing but missing the option off the end.

While I don't disagree that this could be useful, it'd probably best be revisited when moving rose suite-run functionality into cylc under: cylc/cylc-flow#1885 as that provides the opportunity for an interface revisit rather than changing behaviour of an existing command.

@jonnyhtw
Copy link

While I don't disagree that this could be useful, it'd probably best be revisited when moving rose suite-run functionality into cylc under: cylc/cylc-flow#1885 as that provides the opportunity for an interface revisit rather than changing behaviour of an existing command.

Thanks for this. Sounds like a sensible compromise!

Cheers

Jonny

@oliver-sanders
Copy link
Member

Closed by cylc/cylc-flow#4000 which separates the "install" and "run" concepts.

@jonnyhtw
Copy link

Interested to see all the fun new things in Cylc coming soon! Thanks 😊

@oliver-sanders oliver-sanders modified the milestones: 2.0.0, 2.0b1 Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants