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

Release/v1.36.0 #2015

Merged
merged 15 commits into from
May 11, 2021
Merged

Release/v1.36.0 #2015

merged 15 commits into from
May 11, 2021

Conversation

mndeveci
Copy link
Contributor

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

Chih-Hsuan Yen and others added 15 commits May 10, 2021 17:47
* Added SAR Support Check

* Added docstring and Removed Instance Initialization for Class Method
…izeEvery equals zero (aws#1577)

* remove check requiring identity to be required

Check removed to avoid must specify Identity with at least one of Headers, QueryStrings, StageVariables, or Context. error.  This is allowed to be removed from aws console.

* set identity to empty dictionary

Revert back removal of code section and set identity to empty dictionary instead when function_payload_type is "REQUEST" and no identity defined.

* use the correct identity variable

fix issue catched by unit test.

* Update apigateway.py

just set the identity to None

* undo change.

* remove extra spaces

* remove some more spaces

* Update test_translator.py

remove from test case error_api_invalid_auth as this should be valid.

* make the Lambda Authorizer is optional if the authorization caching is not enabled (reference https://docs.aws.amazon.com/apigateway/api-reference/resource/authorizer/#identitySource)

* add unit testing to cover the InvalidResourceException in case if the identity values are not exist, and not cached

* black reformat

Co-authored-by: Mohamed Elasmar <[email protected]>
* fix the request parameter parsing, the value can contain dots

* fix the unit test for python 2.7

* use built in split, instead of concatenating the string
* fix: use instance variables for generating shared api usage plan

* add extra log statements

* fix: Added SAR Support Check (aws#1972)

* Added SAR Support Check

* Added docstring and Removed Instance Initialization for Class Method

* set log level explicitly

* update pyyaml version to get the security update (aws#1974)

* fix: use instance variables for generating shared api usage plan

* add extra log statements

* set log level explicitly

* black formatting

* black formatting

Co-authored-by: Cosh_ <[email protected]>
Co-authored-by: Mohamed Elasmar <[email protected]>
Fixed the incorrectly formatted header for HTTP API section
When customers use auth and define an invalid method in the open api
definition, SAM would return a 'server error'. This was actually
due to SAM attempting to get the method from the path. If the method
was not a supported method and non-lowercase, SAM would attempt to fetch
the lower case method and crash with a KeyError. This PR addresses that
by checking for the valid methods supported.

Co-authored-by: Jacob Fuss <[email protected]>
* Fix for invalid MQ event source managed policy

* Fix for invalid managed policy for MQ, included support for new MQ event source property, updated test cases

* Black reformatting

* Test case changes

* Changed policy name

* Modified test cases with new policy name

* Added resource attributes and unit tests

* Resource attributes initial work

* Passthrough attributes for some resources, updated some tests

* Resolve merge conflicts

* Fixed a typo

* Modified implicit api plugin for resource attributes support

* Partial update of the tests

* Partially updated test cases, black reformatted

* Partially updated test templates

* Partially updated test templates

* Partially updated test templates

* Added event bridge support for passthrough resource attributes

* Partially updated test templates (up to function with amq kms)

* Partially updated test templates (up to sns)

* Partially updated test templates (all the ones left)

* Prevented passthrough resource attributes from changing layer version hashes

* Added test to verify resource passthrough precedence for implicit api

* Modified tests related to lambda layer to revert the hash changes, keeping the hash the same with resource attributes added

* fix: mutable default values in method definitions (aws#1997)

* fix: remove explicit logging level set in single module (aws#1998)

* run automated tests for resource level attribute support

* Skipping metadata in layer hashing

* Refactored the classes for TestTranslatorEndToEnd and TestResourceLevelAttributes to share the same parent class

* Added new translator tests for version and layer resources

* Added new unit tests

* Removed after transform resource plugin

* Black reformatting

* Refactoring implicit api plugin support for DeletionPolicy and UpdateReplacePolicy

* Refactoring to improve code quality

* Added simple documentation

* Black reformatting

* Added input template that was missing

* Refactoring: use sets instead of lists for implicit api plugin

* Changing import to be compatible with py2.7

* Changing test deployment hashes to their actual values

Co-authored-by: Mehmet Nuri Deveci <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented May 11, 2021

Codecov Report

Merging #2015 (089ccef) into release/v1.36.0 (c5d0ed2) will decrease coverage by 0.24%.
The diff coverage is 89.36%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##           release/v1.36.0    #2015      +/-   ##
===================================================
- Coverage            93.88%   93.63%   -0.25%     
===================================================
  Files                   90       90              
  Lines                 5954     6082     +128     
  Branches              1213     1248      +35     
===================================================
+ Hits                  5590     5695     +105     
- Misses                 168      180      +12     
- Partials               196      207      +11     
Impacted Files Coverage Δ
samtranslator/open_api/open_api.py 91.97% <33.33%> (-0.68%) ⬇️
samtranslator/sdk/resource.py 90.00% <50.00%> (-10.00%) ⬇️
...lator/plugins/application/serverless_app_plugin.py 82.20% <66.66%> (-0.71%) ⬇️
samtranslator/translator/translator.py 97.18% <75.00%> (-1.35%) ⬇️
samtranslator/plugins/api/implicit_api_plugin.py 94.01% <85.45%> (-4.24%) ⬇️
samtranslator/model/api/api_generator.py 94.22% <87.50%> (-0.53%) ⬇️
samtranslator/model/sam_resources.py 91.21% <87.50%> (-0.87%) ⬇️
samtranslator/model/__init__.py 97.64% <91.66%> (-0.51%) ⬇️
samtranslator/__init__.py 100.00% <100.00%> (ø)
samtranslator/intrinsics/resolver.py 100.00% <100.00%> (ø)
... and 16 more

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 c5d0ed2...089ccef. Read the comment docs.

@mndeveci mndeveci merged commit 398f056 into aws:release/v1.36.0 May 11, 2021
@mndeveci mndeveci deleted the release/v1.36.0 branch May 11, 2021 01:01
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.