openfaas / faas-cli

Official CLI for OpenFaaS
https://www.openfaas.com/
Other
798 stars 224 forks source link

CLI release `0.16.32`: runtime error when invoking faas up #1001

Closed alfranz closed 3 months ago

alfranz commented 3 months ago

Expected Behaviour

With the version 0.16.30 of the CLI, the faas up command builds, pushes and deploys my function image as expected.

Current Behaviour

With the latest faas-cli release 0.16.32 I get this error when invoking faas up

[0] > Building customfunction.
Skipping "build" folder
Skipping "template" folder
Building: ghcr.io/alfranz/customfunction:latest with dockerfile template. Please wait..
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x79d2b8]

goroutine 5 [running]:
github.com/openfaas/faas-cli/builder.BuildImage({0xc0000ac300, 0x21}, {0xd2d870, 0x1}, {0xc000[14](https://github.com/alfranz/customfunction/actions/runs/[REDACTED]#step:6:15)7830, 0xa}, {0xc000147850, 0xa}, 0x0, 0x0, ...)
    /go/src/github.com/openfaas/faas-cli/builder/build.go:126 +0x878
github.com/openfaas/faas-cli/commands.build.func1(0x0)
    /go/src/github.com/openfaas/faas-cli/commands/build.go:251 +0x790
created by github.com/openfaas/faas-cli/commands.build in goroutine 1
    /go/src/github.com/openfaas/faas-cli/commands/build.go:240 +0xcb
Error: Process completed with exit code 2.

Why do you need this?

I want to deploy my function with the latest release of the CLI.

Who is this for?

What company is this for? Are you listed in the ADOPTERS.md file?

Are you a GitHub Sponsor (Yes/No?)

Check at: https://github.com/sponsors/openfaas

List All Possible Solutions and Workarounds

Install older version of the CLI

curl -sSL https://github.com/openfaas/faas-cli/releases/download/0.16.30/faas-cli -o faas-cli && chmod +x faas-cli && sudo mv faas-cli /usr/local/bin/

Which Solution Do You Recommend?

Install older CLI version.

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context

Your Environment

Running in Github Actions

Ubuntu 22.0[4] LTS
Run docker version 
Client: Docker Engine - Community
 Version:           26.1.3
 API version:       1.45
 Go version:        go1.21.10
 Git commit:        b[7]
 Built:             Thu May 16 0[8]
 OS/Arch:           linux/amd64
 Context:           default
Server: Docker Engine - Community
 Engine:
  Version:          26.1.3
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.10
  Git commit:       8e[9]
  Built:            Thu May 16 08:33:29 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.19
  GitCommit:        2bf793ef6dc9a18e00cb[12]
 runc:
  Version:          1.7.19
  GitCommit:        v1.1.[13]
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
alexellis commented 3 months ago

Hi @alfranz we'll take a look.

Are you using OpenFaaS CE at Zalando?

alfranz commented 3 months ago

Hi @alfranz we'll take a look.

Are you using OpenFaaS CE at Zalando?

Not that I know of ... I saw this issue in a private project of mine.

alexellis commented 3 months ago

We have a weekly call on Wednesdays, if you'd like to come along we'd be interested to hear how you're using faasd in your project

https://docs.openfaas.com/community/