Skip to content
This repository has been archived by the owner on Mar 13, 2021. It is now read-only.

riff function create should optionally wait until the service reaches a success or error state #682

Closed
glyn opened this issue Aug 17, 2018 · 0 comments
Assignees
Labels

Comments

@glyn
Copy link
Contributor

glyn commented Aug 17, 2018

By default, riff function create logs success after creating the ksvc:

$ riff function create ...
...
riff function create completed successfully

Subsequently, problems may occur and the ksvc may never reach a good state. The status may be checked using riff service status.

So that the user does not need to check the service status manually, a --wait switch is introduced which causes the command to block until the service reaches either a successful or an error state.

An example of success:

$ riff function create node square ... --wait
...
riff function create completed successfully

An example of an error:

$ riff function create node square ... --namespace badnamespace --wait
...
Error: function create failed: RevisionMissing: Configuration "square" does not have any ready Revision.; Revision "square-00001" failed with message: "build step \"build-step-build-and-push\" exited with code 1 (image: \"docker-pullable://gcr.io/kaniko-project/executor@sha256:4ba457d5c73a085358d2062152dc739ff2e96f4290412136a1efae8dca1a7501\"); for logs run: kubectl -n default logs square-00001-d2vxs -c build-step-build-and-push".

The wording of the completion message when --wait and --verbose are not specified, should also be adjusted, e.g.:

$ riff function create node square ...
...
riff function create completed successfully
Issue `riff service status square` to see the status of the function
@jldec jldec added the riff-cli label Aug 23, 2018
@glyn glyn self-assigned this Aug 23, 2018
glyn added a commit to glyn/riff that referenced this issue Aug 23, 2018
glyn added a commit to glyn/riff that referenced this issue Aug 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants