Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull default templates when running faas-cli build #997

Open
1 of 2 tasks
welteki opened this issue Jun 19, 2024 · 0 comments
Open
1 of 2 tasks

Pull default templates when running faas-cli build #997

welteki opened this issue Jun 19, 2024 · 0 comments

Comments

@welteki
Copy link
Member

welteki commented Jun 19, 2024

Running faas-cli build fails when templates are missing from the template folder. While the command should fail in this case the behaviour is confusing because it also fails for default templates from the official template repo while other commands like faas-cli publish pull the default templates automatically when they are missing.

Expected Behaviour

Pull templates from the official template repo automatically when they are missing.

Current Behaviour

Running faas-cli build does not pull the templates from the official template repo automatically.

Why do you need this?

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

  • Yes
  • No

List All Possible Solutions and Workarounds

Pull the default templates automatically before building.
Workaround: run faas-cli template pull before faas-cli build

Which Solution Do You Recommend?

Make the beaviour consistent with the other commands and expand the template directory automatically.

Steps to Reproduce (for bugs)

  1. Remove the template directory from an existing functions project.
  2. Run faas-cli build
  3. See the build fail because of missing templates.

Context

This issue was discovered while splitting out the GitHub Actions workflow for the openfaas store functions.

Your Environment

  • FaaS-CLI version ( Full output from: faas-cli version ):
CLI:
 commit:  f8c3e0f878eec5c5bcfff315b7cc1f27d56344cc
 version: 0.16.29
  • Docker version ( Full output from: docker version ):
Client: Docker Engine - Community
 Version:           26.1.4
 API version:       1.45
 Go version:        go1.21.11
 Git commit:        5650f9b
 Built:             Wed Jun  5 11:28:57 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          26.1.4
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.11
  Git commit:       de5c9cf
  Built:            Wed Jun  5 11:28:57 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.33
  GitCommit:        d2d58213f83a351ca8f528a95fbd145f5654e957
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
  • Are you using Docker Swarm (FaaS-swarm ) or Kubernetes (FaaS-netes)?

  • Operating System and version (e.g. Linux, Windows, MacOS):

Linux, Ubuntu 22.04.4 LTS
  • Link to your project or a code example to reproduce issue:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant