SteeltoeOSS / Tooling

Steeltoe developer tool collection
https://steeltoe.io/
Apache License 2.0
12 stars 7 forks source link

Require a 'force' option when overriding service arguments #36

Closed ccheetham closed 6 years ago

ccheetham commented 6 years ago

If a service already has existing arguments, the user should be required to indicate intent to replacing them.

E.g. assume a SQL Server service named database with defined docker launch args:

$ st add database mssql-server
$ st args docker database -- -e ACCEPT_EULA=y
Set the 'docker' deployment environment argument(s) for service 'database' to '-e ACCEPT_EULA=y'

The following should fail, but currently it simply overwrites existing args:

$ st args docker database -- -e ACCEPT_EULA=n
Set the 'docker' deployment environment argument(s) for service 'database' to '-e ACCEPT_EULA=n'

A better behavior would be something like:

$ st args docker database -- -e ACCEPT_EULA=n
'docker' deployment environment argument(s) for service 'database' already exist.
Run with '--force' to replace.
$ st args docker database --force -- -e ACCEPT_EULA=n
Set the 'docker' deployment environment argument(s) for service 'database' to '-e ACCEPT_EULA=n'
cf-gitbot commented 6 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/161183553

The labels on this github issue will be updated when the story is started.