We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Issue: A yml file is created matching the function name, instead of using the file name, even when the -f or --yaml flag specifies a file name.
-f
--yaml
faas-cli new func2 --lang go --yaml stack.yml Folder: func2 created. ___ _____ ____ / _ \ _ __ ___ _ __ | ___|_ _ __ _/ ___| | | | | '_ \ / _ \ '_ \| |_ / _` |/ _` \___ \ | |_| | |_) | __/ | | | _| (_| | (_| |___) | \___/| .__/ \___|_| |_|_| \__,_|\__,_|____/ |_| Function created in folder: func2 Stack file written: stack.yml
faas-cli new func2 --lang go --yaml stack.yml Folder: func2 created. ___ _____ ____ / _ \ _ __ ___ _ __ | ___|_ _ __ _/ ___| | | | | '_ \ / _ \ '_ \| |_ / _` |/ _` \___ \ | |_| | |_) | __/ | | | _| (_| | (_| |___) | \___/| .__/ \___|_| |_|_| \__,_|\__,_|____/ |_| Function created in folder: func2 Stack file written: func2.yml
Check at: https://github.com/sponsors/openfaas
Supporting the flag
I was unit testing #852, and found this flag was not working.
faas-cli version
CLI: commit: b562392b12a78a11bcff9c6fca5a47146ea2ba0a version: 0.13.15
docker version
Client: Docker Engine - Community Version: 20.10.10 API version: 1.41 Go version: go1.16.9 Git commit: b485636 Built: Mon Oct 25 07:42:59 2021 OS/Arch: linux/amd64 Context: default Experimental: true Server: Docker Engine - Community Engine: Version: 20.10.10 API version: 1.41 (minimum version 1.12) Go version: go1.16.9 Git commit: e2f740d Built: Mon Oct 25 07:41:08 2021 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.4.11 GitCommit: 5b46e404f6b9f661a205e28d59c982d3634148f8 runc: Version: 1.0.2 GitCommit: v1.0.2-0-g52b36a2 docker-init: Version: 0.19.0 GitCommit: de40ad0
Are you using Docker Swarm (FaaS-swarm ) or Kubernetes (FaaS-netes)? Kubernetes
Kubernetes
Operating System and version (e.g. Linux, Windows, MacOS): Linux
Linux
Link to your project or a code example to reproduce issue: n/a
n/a
The text was updated successfully, but these errors were encountered:
Hi @kylos101
This is expected behaviour, the flag is not supported to change the name of a new function when the YAML file doesn't exist yet.
However you do have the --append existing-file.yml feature. Would that satisfy the need you had here?
--append existing-file.yml
faas-cli new --lang python event-finder faas-cli new --lang python emailer --append ./event-finder.yml
Sorry, something went wrong.
Yes, that'll work nicely. Thank you!
No branches or pull requests
Issue: A yml file is created matching the function name, instead of using the file name, even when the
-f
or--yaml
flag specifies a file name.Expected Behaviour
Current Behaviour
Are you a GitHub Sponsor (Yes/No?)
Check at: https://github.com/sponsors/openfaas
List All Possible Solutions and Workarounds
-f
/--yaml
flag as optional for new function creation (if not specified use the function name as the file name)Which Solution Do You Recommend?
Supporting the flag
Steps to Reproduce (for bugs)
Context
I was unit testing #852, and found this flag was not working.
Your Environment
faas-cli version
):docker version
):Are you using Docker Swarm (FaaS-swarm ) or Kubernetes (FaaS-netes)?
Kubernetes
Operating System and version (e.g. Linux, Windows, MacOS):
Linux
Link to your project or a code example to reproduce issue:
n/a
The text was updated successfully, but these errors were encountered: