Skip to content

Commit 80e366b

Browse files
committed
fix: increase remove timeout to 120s
1 parent 8143ea1 commit 80e366b

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

client.go

-3
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,6 @@ func (c *Client) Create(cfg Function) (err error) {
368368
// not contain a populated Image.
369369
func (c *Client) Build(path string) (err error) {
370370

371-
fmt.Println("Building function image")
372-
373371
f, err := NewFunction(path)
374372
if err != nil {
375373
return
@@ -411,7 +409,6 @@ func (c *Client) Deploy(path string) (err error) {
411409
}
412410

413411
// Push the image for the named service to the configured registry
414-
fmt.Println("Pushing function image to the registry")
415412
imageDigest, err := c.pusher.Push(f)
416413
if err != nil {
417414
return

knative/remover.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import (
77
"github.com/boson-project/func/k8s"
88
)
99

10+
const RemoveTimeout = 120 * time.Second
11+
1012
func NewRemover(namespaceOverride string) (remover *Remover, err error) {
1113
remover = &Remover{}
1214
namespace, err := GetNamespace(namespaceOverride)
@@ -37,7 +39,7 @@ func (remover *Remover) Remove(name string) (err error) {
3739

3840
fmt.Printf("Removing Knative Service: %v\n", serviceName)
3941

40-
err = client.DeleteService(serviceName, time.Second*60)
42+
err = client.DeleteService(serviceName, RemoveTimeout)
4143
if err != nil {
4244
err = fmt.Errorf("knative remover failed to delete the service: %v", err)
4345
}

0 commit comments

Comments
 (0)