gateway url parameter priority not as described
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 816
- Forks
- 230
- Avg merge
- 6h 4m
- Merged PRs (30d)
- 1
Description
Using faas list in a directory where there is a stack.yml file, the gateway URL is always taken from the yml file. The --gateway parameter and the $OPENFAAS_URL values are not used as is described in the readme
Expected Behaviour
Expect the parameter to always be taken if it is provided as is described in the readme about priority.
Current Behaviour
If a stack.yml is present in the directory where the faas-cli is run, the values in that file will always take precedence
Possible Solution
Adjust the getGatewayURL func to return as soon as it finds a match following the priority listed in the readme
OR
update the readme to indicate that the stack.yml file values, if present, override all other options
Steps to Reproduce (for bugs)
- Create
stack.ymlfile - Edit the
gatewayfield to something else - Run
faas list, or other command that connects to the gateway - Observe that the command cannot connect and is pointed to the value in the
stack.yml - Pass the
-gflag to the same command and observe that the value from thestack.ymlis still used
Context
Troubleshooting why the cli could not connect to a new cluster when using a directory where previous functions had been developed prior.
Your Environment
- FaaS-CLI version ( Full output from:
faas-cli version):
$ faas version
CLI:
commit: a141dedf94ffeed84412365fd591bdc8999c5a1b
version: 0.8.3
- Docker version ( Full output from:
docker version):
$ docker version
Client:
Version: 18.06.1-ce
API version: 1.38
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:25:03 2018
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.06.1-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: e68fc7a
Built: Tue Aug 21 17:23:27 2018
OS/Arch: linux/amd64
Experimental: false
- Are you using Docker Swarm (FaaS-swarm ) or Kubernetes (FaaS-netes)?
Swarm - Operating System and version (e.g. Linux, Windows, MacOS):
Linux Pop!_os 18.06 - Link to your project or a code example to reproduce issue:
N/A
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 by tracing the getGatewayURL function and reviewing the gateway-priority description in the README. Reproduce the issue with a stack.yml file, faas list, and the -g flag, then verify that the implemented precedence matches the documented behavior. Done means the conflicting gateway sources behave consistently with the README.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100