Open grounded042 opened 5 years ago
Hi @grounded042 - did you have any workflows/invocations created when executing these commands?
👋
If I run fission-workflows wfi get
without any workflows/invocations created I don't get any errors. But as soon as I've run one or more workflows it gets the error.
Thanks for the info @grounded042 ! I can look into it, unless you want to take a shot at it yourself 😉
If I've got some time I can take a look - I did briefly yesterday but ended up getting lost in protobuf world :)
Ugh, the Protobuf is silly sometimes :) What is the version of the Fission Workflows deployment you were using? It might be that there is a diff in the Protobuf definitions between the CLI and the workflow engine builds that you are using. In that case there is not much that we can, other than outputting a more helpful error, and maybe add a warning to the CLI when there is a version mismatch.
$ fission-workflows version
client: {"Version":"0.6.0","GitDate":"2018-10-15T16:47:17Z","BuildDate":"2018-10-15T16:47:17Z","GitCommit":"78c053231958e0709e9a668a1557968d9a7ec46b"}
server: {"Version":"0.6.0","GitDate":"2018-10-15T16:47:17Z","BuildDate":"2018-10-15T16:47:17Z","GitCommit":"78c053231958e0709e9a668a1557968d9a7ec46b"}
@erwinvaneyk I was able to make some progress on this, but I'm not sure where to look to fix it. When it gets to reading the protobuf response into an object (https://github.com/fission/fission-workflows/blob/master/pkg/apiserver/httpclient/httpclient.go#L96) it panics because there is a null value in there. For example, this will reliably reproduce the problem:
package main
import (
"bytes"
"fmt"
"github.com/fission/fission-workflows/pkg/types"
"github.com/golang/protobuf/jsonpb"
)
func main() {
fine := bytes.NewReader([]byte(`{"spec":{"inputs":{}}}`))
willPanic := bytes.NewReader([]byte(`{"spec":{"inputs":{"default":{"value":{"@type":"types.fission.io/google.protobuf.BytesValue","value":null}}}}}`))
fineResult := &types.WorkflowInvocation{}
err := jsonpb.Unmarshal(fine, fineResult)
if err != nil {
fmt.Println("error unmarshaling the `fine` json protobuf:", err.Error())
return
}
fmt.Println("fine:", fineResult)
willPanicResult := &types.WorkflowInvocation{}
err = jsonpb.Unmarshal(willPanic, willPanicResult)
if err != nil {
fmt.Println("error unmarshaling the `willPanic` json protobuf:", err.Error())
return
}
fmt.Println("willPanic:", willPanicResult)
}
The willPanic
variable in there is a small snippet of what I get back according to debugging and also when I hit http://<address>/proxy/workflows-apiserver/invocation/<invocation-id>
I'm assuming that whatever is marshaling that object to send it along is what needs to be fixed, but if I'm following things correctly it's just pulling that straight from the store and I didn't have the time to figure out what was putting that object there or how it marshaled it either.
Fission / Workflows Version
k8s Version
v1.13.2
Commands Run
after getting the fortunewhale example setup
Expected Output
It should output a list of invocations
Other Notes
I poked around a little bit and it seems like it gets the list of invocations, but then errors trying to get the details of one. I was able to verify this by running
$ fission-workflows wfi get wi-31ad7292-51ec-4593-bd71-73e903771ec8
which returns a similar error: