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

Add option to create stack if missing on change command #41

Open
flomotlik opened this issue Mar 22, 2017 · 6 comments
Open

Add option to create stack if missing on change command #41

flomotlik opened this issue Mar 22, 2017 · 6 comments

Comments

@flomotlik
Copy link
Collaborator

Especially for CI it can be helpful to create the stack if it doesn't already exist.

This should be a separate option for change, e.g. --create-if-missing so its clear that this isn't the best way to do things, but is possible.

@flomotlik flomotlik added this to the 0.4.0 milestone Mar 22, 2017
@flomotlik flomotlik modified the milestone: 0.4.0 Mar 30, 2017
@muja
Copy link
Contributor

muja commented Mar 7, 2018

How about a different command called upsert?

@flomotlik
Copy link
Collaborator Author

I should have closed this by now. I've changed my mind on this one and imho every command (including deploying if it doesn't exist) should be a separate command you have to call. I want every command in Formica to be explicit, so there are never any surprises. A little more cumbersome, but much safer.

@muja
Copy link
Contributor

muja commented Mar 11, 2018

I understand your sentiment for deployment, but submitting a changeset is not as dangerous as deploying - one can always review it and change their mind. I think you might want to consider being a bit more lax about that. You could also, on a command like upsert, emit a very loud output saying "CREATED" or "UPDATED" so it's unmissable.

Anyone who'd choose to use upsert is probably familiar with its risks, but it doesn't change the fact that it'd be a very nice feature to have.

@flomotlik
Copy link
Collaborator Author

Anyone who'd choose to use upsert is probably familiar with its risks, but it doesn't change the fact that it'd be a very nice feature to have.

I agree with it being a nice feature to have, but for me one of the most important parts of Formica (and my general toolset) is forcing best practices (at least what I consider best practices) and that for me includes having change/deploy to be two separate steps so people don't accidentally deploy something. Its less convenient no doubt, but I'm really strongly in favor of making sure that tools push everyone to really inspect the changes that are about to happen and my fear is that people will just use upsert blindly, which I don't want.

Completely get the sentiment, its inconvenient for me regularly as well, but I consider that inconvenience a feature, not a bug.

@muja
Copy link
Contributor

muja commented Mar 12, 2018

I think you're confusing something. Isn't upsert short for change || new instead of change && deploy. I definitely understand that change && deploy shouldn't be introduced, but I don't understand the problems with change || new (change the stack if it exists, otherwise create it). No deploy involved.

@flomotlik
Copy link
Collaborator Author

Yup you're right my bad. Mixed up different issues here. Its probably going to be a flag on change like ---create-missing or something like that. I'll reopen the issue. I'm not working on it at the moment, but maybe at some point in the future or with a PR.

@flomotlik flomotlik reopened this Mar 12, 2018
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

2 participants