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

When overwriting a route: prompt for yes/no or require --force #45

Closed
rdallman opened this issue Jul 27, 2017 · 8 comments
Closed

When overwriting a route: prompt for yes/no or require --force #45

rdallman opened this issue Jul 27, 2017 · 8 comments

Comments

@rdallman
Copy link
Contributor

In gitlab by @carimura on May 26, 2017, 11:07

especially if overwriting with a different function name, older version, whatever. Just feels pretty destructive as is.

@rdallman
Copy link
Contributor Author

In gitlab by @treeder on May 26, 2017, 11:10

This happens so often, seems like it would be an annoyance to force this.

@rdallman
Copy link
Contributor Author

In gitlab by @carimura on May 26, 2017, 11:14

I'm worried about destruction of production apps on accident.... so...easy.

@rdallman
Copy link
Contributor Author

In gitlab by @hibooboo2 on May 26, 2017, 11:17

Could have a flag that you put on apps / routes that label them as prod and require confirmation / force...

@rdallman
Copy link
Contributor Author

In gitlab by @treeder on May 26, 2017, 11:52

Wouldn't everyone just always use --force then? The only time you wouldn't would be the first time you create the route.

@rdallman
Copy link
Contributor Author

In gitlab by @carimura on May 26, 2017, 11:53

@hibooboo2 that feels like an interesting middle ground... @treeder I wouldn't want my prod routes easily overwritable, especially if the name of the function is something completely different than what it was before.

@rdallman
Copy link
Contributor Author

In gitlab by @hibooboo2 on May 26, 2017, 11:56

@treeder If users choose to always --force that is on them. Take git for example. you can git push or you can git push --force

@rdallman
Copy link
Contributor Author

In gitlab by @treeder on May 26, 2017, 12:11

@hibooboo2 Totally different things. Although if git push --force was required to do any push, then maybe this would be similar, but that would make git really annoying.

Setting a flag on production to allow pushes without --force might be OK, but again, then you just add --force to your scripts and it wouldn't prevent anything.

The real way to prevent mistakes is to to push to production through CI/CD. Most likely that would be the only way for an important app. And only the CI user would have access to push to prod.

@rdallman
Copy link
Contributor Author

In gitlab by @hibooboo2 on May 26, 2017, 12:44

This is true that that is a better way... My point was just that gits --force has to be used for destructive things. So maybe you only need to force if the image name changed for a route or the timeout or the format etc.. but if it is just bumping the image to a new version it doesn't require force...
That kinda thing.

@treeder treeder closed this as completed Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants