openfaas / faas-cli

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

Make stack pull in building phase off by default #758

Closed martindekov closed 4 years ago

martindekov commented 4 years ago

Currently --disable-stack-pull is a flag of build command which disables the pulling of templates before build phase. The default behaviour if:

configuration:
  templates:
    - name: golang-middleware

exists the template will try to be fetched every time we build.

Expected Behaviour

Rename --disable-stack-pull to --enable-stack-pull so only when flag is present the build will try to pull templates.

Current Behaviour

Tries to pull templates every time.

Possible Solution

Revert the logic of the flag.

Steps to Reproduce (for bugs)

1.Put configuration with template 2.Build 3.Build again 4.See templates are trying to be fetched every time

Context

Conversation around this was spawn in Slack.

Your Environment

martindekov commented 4 years ago

When adding the feature to the build I though this should be the default case. But we can easily change it.