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

Update handler name when deploy a single function #5301

Merged
merged 3 commits into from
Oct 13, 2018

Conversation

bzemms
Copy link
Contributor

@bzemms bzemms commented Sep 16, 2018

What did you implement:

In this PR I fixed an issue (or a not implemented feature), according the function handler name of an AWS Lambda, while deploying a single function. (using deploy -f / --function)

Former to that fix, when deploying a single function even if you change the code and the handler file / handler method , changing the handler name in the serverless.yml was not affected.

(BTW other configuration such as memorySize, description, timeout, etc.. are affected as expected)

Closes #XXXXX

How did you implement it:

As done for others configuration ( such as memorySize, description, timeout, etc..)
while updateFunctionConfiguration() {...} in /lib/plugins/aws/deployFunction/index.js - I did implement the same logic to take the handler name from the functionObj and added it to params of the callUpdateFunctionConfiguration method

How can we verify it:

  1. Deploy a simple sls stack with one function to aws.
  2. Change the handler name in the serverless.yml (e.g to point on an other method)
  3. Deploy this single function using -f / --function cmd line option.
  4. Check in the AWS Lambda console that the new handler name appear in the configuration

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

bzemms and others added 2 commits September 16, 2018 16:20
Allow to update the handler when using `deploy -f / --function`
@bzemms bzemms changed the title Patch 1 Update handler name when deploy a single function Sep 16, 2018
@iharush
Copy link

iharush commented Oct 4, 2018

+1 Will be very helpful

Copy link
Contributor

@horike37 horike37 left a comment

Choose a reason for hiding this comment

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

@bzemms
Great work 👍 It works as expected on my end.
I think this is a promising solution 🥇 LGTM.

@horike37 horike37 merged commit 449e269 into serverless:master Oct 13, 2018
@horike37 horike37 added this to the 1.33.0 milestone Oct 13, 2018
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.

3 participants