rebuild Go environment not working
In my practise I wolud like to build an Go environment that contains third libray such like AWS-S3-GO-SDK, as I am a newer for Fission and Go,I started from build a pure image that do not resolve say AWS-S3-GO-SDK, and I followed the tutorial https://github.com/fission/environments/blob/master/go/README.md.
Here is my CLI
docker build -t USER/go-env --build-arg GO_VERSION=1.16 --build-arg UBUNTU_VERSION=20.04 -f Dockerfile-1.1x . && docker push USER/go-env
cd builder && docker build -t USER/go-builder --build-arg GO_VERSION=1.16 -f Dockerfile-1.1x . && docker push USER/go-builder
fission env create --name go --image USER/go-env --builder USER/go-builder --version 2
fission fn create --name test01-go --env go --src hello.go --entrypoint Handler
// hello.go
package main
import (
"net/http"
)
// Handler is the entry point for this fission function
func Handler(w http.ResponseWriter, r *http.Request) {
msg := "Hello, world!\n"
w.Write([]byte(msg))
}
kubectl get pods,svc -n fission-function
# environment pod is running
fission fn test --name test01-go
the output is
Error: error executing HTTP request: Get "http://127.0.0.1:17715/fission-function/test01-go": context deadline exceeded
can not find useful info from the kubectl pod logs
2023/04/01 09:54:22 listening on 8888 ...
When I use tutorial https://fission.io/docs/usage/languages/go/ (do not build the go-env and go-builder by myself) the fission fn test --name test01-go works well.
fission environment create --name go --image fission/go-env-1.16 --builder fission/go-builder-1.16
fission fn create --name test02-go --env go --src hello.go --entrypoint Handler
This repository is not up-to-date and it lacks community and support. I recommend you not to use Fission for this reason as I have ran into many similar problems with this tool. Their example repo is also full of typos and errors which I tried to fix and submitted a pull request, but yet again, no activity! @Fission 👎👎👎👎👎👎👎👎👎👎👎
@BTYHunter Please try latest Go environment.