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

Support functions without events in CloudFront remove logging #6645

Merged
merged 2 commits into from
Sep 6, 2019

Conversation

pmuens
Copy link
Contributor

@pmuens pmuens commented Sep 6, 2019

What did you implement:

Fixes a bug where a function with 0 events caused the removal to fail.

How did you implement it:

Add a check if the function has events defined in the CloudFront removal logger. Also added a regression test.

How can we verify it:

Deploy and remove the following service (the removal fails without this fix):

service: test-${self:custom.idx}

provider:
  name: aws
  runtime: nodejs10.x
  versionFunctions: false

custom:
  idx: 0

functions:
  hello:
    handler: handler.greeter

Todos:

Note: Run npm run test-ci to run all validation checks on proposed changes

  • Write tests and confirm existing functionality is not broken.
    Validate via npm test
  • Ensure there are no lint errors.
    Validate via npm run lint-updated
    Note: Some reported issues can be automatically fixed by running npm run lint:fix
  • Ensure introduced changes match Prettier formatting.
    Validate via npm run prettier-check-updated
    Note: All reported issues can be automatically fixed by running npm run prettify-updated
  • 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

@pmuens pmuens added this to the 1.52.0 milestone Sep 6, 2019
@pmuens pmuens requested a review from medikoo September 6, 2019 11:25
@pmuens pmuens self-assigned this Sep 6, 2019
medikoo
medikoo approved these changes Sep 6, 2019
@pmuens pmuens merged commit af8f1a3 into master Sep 6, 2019
@pmuens pmuens deleted the cloudfront-event-removal-bug branch September 6, 2019 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants