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

Use PUT verb for function updates and update messages #123

Merged
merged 2 commits into from
Sep 27, 2017
Merged

Use PUT verb for function updates and update messages #123

merged 2 commits into from
Sep 27, 2017

Conversation

johnmccabe
Copy link
Contributor

@johnmccabe johnmccabe commented Sep 26, 2017

This PR is part of a group of 3:

Description

This commit switches the verb used for updates from the non-HTTP UPDATE to PUT.

It also updates the message returned from the deploy action depending on whether its a deploy or update:

$ ./faas-cli-darwin deploy -f ./samples.yml --replace=false --update
Updating: ruby-echo.
Updated.
URL: http://localhost:8080/function/ruby-echo

Motivation and Context

UPDATE is not a valid HTTP verb, the correct verb to use for updates is PUT (as pointed out by @imeoer - thx!)

How Has This Been Tested?

Tested performing a range of updates on a local swarm, changing envvars etc.

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.

@alexellis
Copy link
Member

Can we co-ordinate PRs across faas-provider, faas-netes and faas?

@johnmccabe
Copy link
Contributor Author

@alexellis I've raised PRs in faas/faas-cli and faas-provider - I don't think faas-netes, or any of the integrations need to be changed to pick up the change in verb.

@johnmccabe johnmccabe changed the title [WIP] Use PUT verb for function updates. Use PUT verb for function updates. Sep 26, 2017
As discussed in openfaas/faas#208, this commit switches the verb used
for updates from the non-HTTP UPDATE to PUT.

Signed-off-by: John McCabe <[email protected]>
Prior to this commit updates would result in the cli printing a
deploying message when performing an update. This commit returns an
appropriate message to the user depending on the action being performed.

Signed-off-by: John McCabe <[email protected]>
@johnmccabe johnmccabe changed the title Use PUT verb for function updates. Use PUT verb for function updates and update messages Sep 26, 2017
@alexellis alexellis merged commit ff2f1c3 into openfaas:master Sep 27, 2017
@alexellis
Copy link
Member

LGTM

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.

2 participants