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

Fix gateway overriding for faas-cli remove #268

Merged
merged 1 commit into from Dec 29, 2017
Merged

Fix gateway overriding for faas-cli remove #268

merged 1 commit into from Dec 29, 2017

Conversation

stefanprodan
Copy link
Contributor

@stefanprodan stefanprodan commented Dec 27, 2017

Description

fix #267

Motivation and Context

  • I have raised an issue to propose this change (required)

How Has This Been Tested?

Tested on Docker Swarm 17.09.1-ce with faas-swarm openfaas/faas#460

Direct override

./faas-cli remove func_markdown --gateway=http://<GCP-IP>:8080
Deleting: func_markdown.
Removing old function.

Stack override

./faas-cli deploy -f ./sample/hmac.yml --gateway=http://<GCP-IP>:8080
Deploying: hmac.
No existing function to remove
Deployed.
200 OK

./faas-cli remove -f ./sample/hmac.yml --gateway=http://<GCP-IP>:8080
Deleting: hmac.
Removing old function.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Copy link
Member

@alexellis alexellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking at this Stefan. The code looks good but please could you full out the whole template for the PR including the scenarios used for testing?

@alexellis
Copy link
Member

Ping + @dvdmuckle

@stefanprodan
Copy link
Contributor Author

@alexellis done

@alexellis
Copy link
Member

The testing only shows one of the three scenarios. What about deleting from a local gateway (default) and when the YAML file has an override gateway?

@stefanprodan
Copy link
Contributor Author

The code has been taken from list. I've tested with the stack override as well, description updated.

@alexellis
Copy link
Member

Is the output correct?

I think the scenarios are:

  • YAML file, no args, defaults
  • YAML file with override in file, no args
  • YAML file with override and override on args
  • YAML file with no override and override on args
  • no YAML file with args override

There may be some other scenarios too. This is an area that's been tricky to manage with the three data-sources - that's why the function was added to list that you mentioned.

Thanks for working on this 👍

@alexellis alexellis merged commit 644f45d into openfaas:master Dec 29, 2017
@alexellis
Copy link
Member

Looks like more testing is still needed?

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

Successfully merging this pull request may close these issues.

faas-cli remove doesn't allow overriding gateway specified in file
2 participants