Repository navigation
fix: options endpoint does not invoke lambda (fixing CI issues with author's PR) (#1434) - #1649
Merged
Merged
Conversation
|
I am pulling this PR and the original PR down locally to resubmit as one. |
Contributor
Author
Contributor
|
@douglasnaphas I would start by looking at the failing integration tests. |
Contributor
Author
|
@sanathkr Did you have any luck resubmitting this along with the original PR? |
Contributor
Author
aws#1434 This is intended to get the following integration tests passing: tests/integration/local/start_api/test_start_api.py TestServiceCorsSwaggerRequests TestServiceCorsGlobalRequests Those tests use a [CorsConfiguration](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-api-corsconfiguration.html) and a [Cors Global](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-template-anatomy-globals.html), respectively, to enable CORS. When CORS is enabled, OPTIONS requests should send a 200 with the specified CORS headers, even if no OPTIONS handler is explicitly stated in the pre-transformation SAM template. I confirmed this by deploying from a [SAM template](https://github.com/douglasnaphas/play-sam/tree/master/cors-swagger) similar to one of the failing integration tests (with Cors specified but with no explicit OPTIONS handler), and observing that it does indeed respond with a 200 and the CORS headers attached.
douglasnaphas
force-pushed
the
debug-1434-options
branch
from
February 6, 2020 19:01
85ff184 to
0835fa6
Compare
This was referenced Feb 6, 2020
aws#1434 This adds an integration test to verify that templates with explicit OPTIONS handlers actually have those handlers invoked on OPTIONS requests. There has been an issue with OPTIONS requests returning 200 and not reaching an explicitly specified OPTIONS handler. aws#1649 fixes that, so if the integration test added in this commit passes (and fails on the develop branch), it could be added to that PR.
6 tasks
douglasnaphas
added a commit
to douglasnaphas/aws-sam-cli
that referenced
this pull request
Feb 18, 2020
aws#1434 This adds an integration test to verify that templates with explicit OPTIONS handlers actually have those handlers invoked on OPTIONS requests. There has been an issue with OPTIONS requests returning 200 and not reaching an explicitly specified OPTIONS handler. aws#1649 fixes that, so if the integration test added in this commit passes (and fails on the develop branch), it could be added to that PR.
Contributor
Author
|
The integration test added in this PR passes when run locally with When I apply the integration test, but not the code change, to the |
jfuss
approved these changes
Feb 18, 2020
jfuss
left a comment
Contributor
There was a problem hiding this comment.
LGTM! Thanks for keeping up with this and spending the time to address the bug.
`black --diff tests/integration/local/start_api/test_start_api.py` reported this issue--a missing newline between classes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available: #1434
Description of changes: This attempts to fix the CI failures encountered with @gordonmleigh's PR #1464.
Checklist:
make prpassesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.