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

Fail "build" if Docker CLI throws an error #138

Closed
alexellis opened this issue Oct 3, 2017 · 5 comments
Closed

Fail "build" if Docker CLI throws an error #138

alexellis opened this issue Oct 3, 2017 · 5 comments

Comments

@alexellis
Copy link
Member

alexellis commented Oct 3, 2017

Expected Behaviour

We need to "stop the world" if a faas-cli build throws an error.

Current Behaviour

Error is swallowed and hard to see.

Possible Solution

At the least just log.Fatal() and emit non-zero exit code.

Better - print a message in red with the aec library we use for "version"/"new" commands.

Steps to Reproduce (for bugs)

Use a Dockerfile with a bad instruction and do faas-cli build

@shorsher
Copy link
Contributor

shorsher commented Oct 3, 2017

I’ll give this one a shot 🙌🏼🙌🏼

@alexellis
Copy link
Member Author

Please provide output from testing in the PR (positive and negative) along with what happens if you have multiple functions or a single. GIFs are also very good for showing new behavior. Looking forward to seeing this.

@shorsher
Copy link
Contributor

shorsher commented Oct 3, 2017

So it seems the only way to get the error status is in ExecCommand(), would you like to handle any errors there? The push command also utilizes ExecCommand() so that might be the best option.

@alexellis
Copy link
Member Author

I think you can check for Exit code on the command object

@alexellis
Copy link
Member Author

Fixed in 139. With some notes on a v2 implementation.

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