Remove multiple functions with `faas-cli remove` by name
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 816
- Forks
- 230
- Avg merge
- 6h 4m
- Merged PRs (30d)
- 1
Description
It is not entirely clear whether multiple functions can be removed with a single faas-cli remove invocation. Suppose I have the following functions:
$ faas-cli version
___ _____ ____
/ _ \ _ __ ___ _ __ | ___|_ _ __ _/ ___|
| | | | '_ \ / _ \ '_ \| |_ / _` |/ _` \___ \
| |_| | |_) | __/ | | | _| (_| | (_| |___) |
\___/| .__/ \___|_| |_|_| \__,_|\__,_|____/
|_|
CLI:
commit: 619282afd0dd2520a7669ec9396282ce2348a35f
version: 0.17.7
Gateway
uri: http://[...]
version: 0.27.12
sha: 4e20249bc0703954244d4be98eaa6c2bcb68cb83
Provider
name: faas-netes-ce
orchestration: kubernetes
version: 0.18.16
sha: cac64e04f91db67b75d055d3ee4d286b303575db
Your faas-cli version (0.17.7) may be out of date. Version: 0.17.8 is now available on GitHub.
$ faas-cli list
Function Invocations Replicas
figlet 103819 1
ocr 8 1
shasum 825 1
Then I run the following command:
$ faas-cli remove figlet shasum ocr
Deleting: figlet.
Removing old function.
After some seconds, this is the result:
$ faas-cli list
Function Invocations Replicas
ocr 8 1
shasum 825 1
When I run faas-cli remove --help, the help message says that it is possible to remove multiple functions, but only if they are specified via a YAML config. If I specify functions by name, I can remove only one function at a time. I think it would be both easy and useful to add support for removing multiple functions in the latter mode.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the faas-cli remove command and its --help output, comparing named arguments with YAML-config behavior. Trace how multiple names are handled, then verify that faas-cli remove figlet shasum ocr removes all three while existing single-name and YAML modes remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100