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

feat(events): API Gateway target #13823

Merged
merged 12 commits into from Apr 23, 2021
Merged

feat(events): API Gateway target #13823

merged 12 commits into from Apr 23, 2021

Conversation

@hedrall
Copy link
Contributor

@hedrall hedrall commented Mar 26, 2021

close #12708

Added construct class of api gateway target .


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

@gitpod-io
Copy link

@gitpod-io gitpod-io bot commented Mar 26, 2021

@nija-at nija-at removed their assignment Mar 29, 2021
*
* @default - no message group ID (regular queue)
*/
readonly messageGroupId?: string;

This comment has been minimized.

@rix0rrr

rix0rrr Apr 6, 2021
Contributor

Does this not need to be removed?

This comment has been minimized.

@hedrall

hedrall Apr 7, 2021
Author Contributor

Sorry, this is my mistake.

*
* @default the entire EventBridge event
*/
readonly message?: events.RuleTargetInput;

This comment has been minimized.

@rix0rrr

rix0rrr Apr 6, 2021
Contributor

Does this not need to be removed?

Where DOES the payload go?

This comment has been minimized.

@rix0rrr

rix0rrr Apr 6, 2021
Contributor

Should this be called something like postBody ?

This comment has been minimized.

@hedrall

hedrall Apr 7, 2021
Author Contributor

You are right. This will send to API as post body. I fixed.

*
* @default - no dead-letter queue
*/
readonly deadLetterQueue?: sqs.IQueue;

This comment has been minimized.

@rix0rrr

rix0rrr Apr 6, 2021
Contributor

Are eventRole and deadletterQueue not inheritable from some common props type?

httpParameters: {
headerParameters: this.props?.headerParameters,
queryStringParameters: this.props?.queryStringParameters,
pathParameterValues: this.props?.pathParameterValues,

This comment has been minimized.

@rix0rrr

rix0rrr Apr 6, 2021
Contributor

Should we not validate pathParameterValues.length agains the number of * in the path ?

This comment has been minimized.

@hedrall

hedrall Apr 7, 2021
Author Contributor

I didn't know if it would be better to validate with CDK or wait for Cloudformation to handle the errors naturally at runtime.
(If it is documented somewhere, I would appreciate it if you could let me know.)
I have implemented validation as you mentioned.

@mergify mergify bot dismissed rix0rrr’s stale review Apr 6, 2021

Pull request has been modified.

@hedrall hedrall requested a review from rix0rrr Apr 7, 2021
@gitpod-io
Copy link

@gitpod-io gitpod-io bot commented Apr 8, 2021

@rix0rrr rix0rrr changed the title feat(events-targets): Add api gateway target feat(events-targets): API Gateway target Apr 22, 2021
@mergify
Copy link
Contributor

@mergify mergify bot commented Apr 22, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@rix0rrr rix0rrr changed the title feat(events-targets): API Gateway target feat(events): API Gateway target Apr 22, 2021
@mergify mergify bot dismissed rix0rrr’s stale review Apr 23, 2021

Pull request has been modified.

@hedrall hedrall requested a review from rix0rrr Apr 23, 2021
@hedrall
Copy link
Contributor Author

@hedrall hedrall commented Apr 23, 2021

I resolved conflict.

@mergify
Copy link
Contributor

@mergify mergify bot commented Apr 23, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation commented Apr 23, 2021

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 4f01a64
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

@mergify mergify bot commented Apr 23, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit ce789bf into aws:master Apr 23, 2021
7 checks passed
7 checks passed
@github-actions
auto-approve
Details
@github-actions
validate-pr
Details
AWS CodeBuild us-east-1 (AutoBuildProject89A8053A-LhjRyN9kxr8o) Build succeeded for project AutoBuildProject89A8053A-LhjRyN9kxr8o
Details
@gitpod-io
Gitpod Open an online workspace in Gitpod
Details
@mergify
Rule: automatic merge (merge) The pull request has been merged automatically
Details
@semantic-pull-requests
Semantic Pull Request ready to be squashed
Details
@mergify
Summary 5 potential rules
Details
mergify bot pushed a commit that referenced this pull request May 5, 2021
A previous [PR](#13823) added a dependency from the stable module `aws-events-targets` to the experimental module `aws-batch`. Depending on experimental modules is no longer allowed.  In fact, this PR build should have failed when attempting to build `aws-cdk-lib`, preventing it from being merged. However, since the dependency was added but not used, the build succeeded, and the PR was merged.

### Why did we expect the PR build of #13823 to fail?

In the build step of `aws-cdk-lib` we strip all the L2 of experimental modules. This means that when compiling `aws-cdk-lib` the L2 types of experimental modules does not exists, if a stable module reference such a type, the build of `aws-cdk-lib` will fail. 

### Why did the PR build of #13823 succeeded?

It added a dependency on the experimental `aws-batch` but didn't use it.

### What are we doing to prevent this from happening in the future?
 #14249 adds a lint rule that disallow depending on an experimental module.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
john-tipper added a commit to john-tipper/aws-cdk that referenced this pull request May 10, 2021
close aws#12708 

Added construct class of api gateway target .

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
john-tipper added a commit to john-tipper/aws-cdk that referenced this pull request May 10, 2021
A previous [PR](aws#13823) added a dependency from the stable module `aws-events-targets` to the experimental module `aws-batch`. Depending on experimental modules is no longer allowed.  In fact, this PR build should have failed when attempting to build `aws-cdk-lib`, preventing it from being merged. However, since the dependency was added but not used, the build succeeded, and the PR was merged.

### Why did we expect the PR build of aws#13823 to fail?

In the build step of `aws-cdk-lib` we strip all the L2 of experimental modules. This means that when compiling `aws-cdk-lib` the L2 types of experimental modules does not exists, if a stable module reference such a type, the build of `aws-cdk-lib` will fail. 

### Why did the PR build of aws#13823 succeeded?

It added a dependency on the experimental `aws-batch` but didn't use it.

### What are we doing to prevent this from happening in the future?
 aws#14249 adds a lint rule that disallow depending on an experimental module.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants