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

Added Support for referencing custom configuration in CodeDeploy #848

Merged
merged 8 commits into from
Apr 16, 2019

Conversation

Buffer0x7cd
Copy link
Contributor

@Buffer0x7cd Buffer0x7cd commented Mar 9, 2019

Issue #, if available:
#836
Description of changes:
Added a list of predefined configurations provided by CodeDeploy. If the user provided configuration is one of the predefined configurations then the generate Cloudformation will have "CodeDeployDefault.Lambda as a prefix, but if it's a custom CodeDeploy Configuration then the Prefix will not be added
Description of how you validated changes:
Added relevant unit tests and the end to end tests.
Checklist:

  • [ x] Write/update tests
  • [ x] make pr passes
  • Update documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-io
Copy link

codecov-io commented Mar 9, 2019

Codecov Report

Merging #848 into develop will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #848      +/-   ##
===========================================
+ Coverage    94.62%   94.65%   +0.02%     
===========================================
  Files           69       69              
  Lines         2997     3011      +14     
  Branches       554      559       +5     
===========================================
+ Hits          2836     2850      +14     
  Misses          85       85              
  Partials        76       76
Impacted Files Coverage Δ
...el/preferences/deployment_preference_collection.py 90.9% <100%> (+2.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7b16fbb...0b67e7a. Read the comment docs.

@Buffer0x7cd
Copy link
Contributor Author

@jlhood There were few tests that are using custom deployments type in deployment preference and expecting the generated cloudformation to have CodeDeployDefault.Lambda prefix(https://github.com/awslabs/serverless-application-model/blob/805cc85bc26cfda16e9611c047e38f78560ad6e6/tests/translator/model/preferences/test_deployment_preference_collection.py#L66) While few of them are having a typo(https://github.com/awslabs/serverless-application-model/blob/805cc85bc26cfda16e9611c047e38f78560ad6e6/tests/translator/input/function_with_deployment_preference.yaml#L10). Due to this, I needed to update those test cases so that they can work with the changes introduced in this PR.

Copy link
Contributor

@jlhood jlhood left a comment

Choose a reason for hiding this comment

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

Really excited about this change! Thanks so much. I called out one issue that needs to be addressed before we can merge this.

Copy link
Contributor

@jlhood jlhood 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 updating! I think I have a simpler way to do the recursive replacement. Let me know what you think!

Copy link
Contributor

@jlhood jlhood left a comment

Choose a reason for hiding this comment

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

Great job with this! Just a few minor cleanups to get tests passing. Also, could you make a small update to the safe deployments documentation page noting that custom deployment configurations are supported?

https://github.com/awslabs/serverless-application-model/blob/develop/docs/safe_lambda_deployments.rst

Thanks so much for iterating on this PR. It's super close. Looking forward to having this feature in SAM!

@keetonian keetonian merged commit 166304b into aws:develop Apr 16, 2019
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.

None yet

6 participants