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

riff function build --verbose reports failure after unsuccessful create, even if the problem is resolved #699

Closed
jldec opened this issue Aug 28, 2018 · 1 comment
Assignees
Milestone

Comments

@jldec
Copy link
Contributor

jldec commented Aug 28, 2018

steps to reproduce:

first apply a bad secret for pushing to dockerhub or gcr, then

$ riff function create node square   --git-repo https://github.com/trisberg/node-fun-square.git   --artifact square.js   --image $DOCKER_ID/node-fun-square --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:501056bf52f3a96f151ccbeb028715330d5d5aa6647e7572ce6c6c55f91ab374\"); for logs run: kubectl -n default logs square-00001-lgn8h -c build-step-build-and-push".

$ kubectl -n default logs square-00001-lgn8h -c build-step-build-and-push
time="2018-08-28T15:55:41Z" level=info msg="Unpacking filesystem of projectriff/node-function-invoker:0.0.8..."
time="2018-08-28T15:55:41Z" level=error msg="no token in bearer response:\n{\"details\":\"incorrect username or password\"}\n"

now apply a working secret, and then

$ riff function build square --verbose
Error: function create failed: RevisionMissing: Configuration "square" does not have any ready Revision.

$ riff service status square
Last Transition Time:        2018-08-28T16:59:22+01:00
Status:                      True
Type:                        Ready

$ riff service invoke square -- -d 11 -H 'Content-Type: text/plain' -w "\n"
curl http://localhost:32380 -H 'Host: square.default.example.com' -d 11 -H 'Content-Type: text/plain' -w '\n'
121
@trisberg
Copy link
Member

looks like the status.conditions from the previous state hang around for a while and gets picked up in the loop. I even added a check for the status.observedGeneration but that can change and the old status.conditions are still present. Not sure what to look for at this point.

trisberg added a commit to trisberg/riff that referenced this issue Aug 28, 2018
- check for the observedGeneration

- check all status.conditions for Unknown state

Fixes projectriff#699
@trisberg trisberg added this to the Current milestone Aug 28, 2018
trisberg added a commit to trisberg/riff that referenced this issue Aug 28, 2018
- check for the observedGeneration

- check all status.conditions for Unknown state

Fixes projectriff#699
@glyn glyn closed this as completed in #701 Aug 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants