mirror of https://github.com/knative/func.git
fix: stop build progress loop when build completes (#1133)
This change prevents the incremental build messages that loop while building from continuing during subsequent deploy phases by providing a cancelable context to the `printBuildActivity()` function parameters. Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/974 Signed-off-by: Lance Ball <lball@redhat.com>
This commit is contained in:
parent
ff20f53671
commit
cf5be9a616
|
|
@ -608,7 +608,8 @@ func ensureRuntimeDir(f Function) error {
|
|||
// not contain a populated Image.
|
||||
func (c *Client) Build(ctx context.Context, path string) (err error) {
|
||||
c.progressListener.Increment("Building function image")
|
||||
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
defer cancel()
|
||||
// If not logging verbosely, the ongoing progress of the build will not
|
||||
// be streaming to stdout, and the lack of activity has been seen to cause
|
||||
// users to prematurely exit due to the sluggishness of pulling large images
|
||||
|
|
|
|||
Loading…
Reference in New Issue