-
Notifications
You must be signed in to change notification settings - Fork 4k
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(route53-targets): aws-apigatewayv2 target #10191
feat(route53-targets): aws-apigatewayv2 target #10191
Conversation
783137f
to
28c5232
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for getting this started @johanneswuerbach
I had some questions and some small comments.
I think we should also add an integration test for this target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@johanneswuerbach could you also add an integration test?
Sure, could you point me to an example test? |
@johanneswuerbach Here's an example integration test: |
28c5232
to
ac06b22
Compare
Pull request has been modified.
@christophgysin thanks for the pointer. @shivlaks integration test added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks good, I think we need to tweak the integ test a little bit before we can merge it in
const domainName = 'example.com'; | ||
const certArn = 'arn:aws:acm:us-east-1:111111111111:certificate'; | ||
|
||
const certificate = acm.Certificate.fromCertificateArn(this, 'cert', certArn); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
integration tests should be deployable (i.e. running npm integ *your test.js*
will deploy the stack and automatically write the .expected
file)
should this test be creating a certificate and then passing it's ARN? I can't imagine it deploys with the hardcoded certArn
value
@shivlaks I haven't tried it, but this is exactly how it is done in the existing test: https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-route53-targets/test/integ.api-gateway-domain-name.ts#L15 |
if it's not deployable it's probably also a bug (or there for a reason). I'd love to find out whether we can do better before merging it in though. wdyt? |
I'm neither the author of this nor the existing test. But I can imagine that the certificate ARN and domain name were changed to an existing cert/domain in the account for testing. Automating certificate creation is not recommended, because you quickly run into the account limit of 20 certificates per year. |
Anything I can do to move this forward? |
@shivlaks Can you comment how to proceed here? Should we automate certificate creation despite the limits? Is there another way to test this? Or this the current approach (not ideal, but consistent with targets.ApiGateway) acceptable in this case? |
@christophgysin @johanneswuerbach - discussed the outstanding integ test comment with @njlynch - and we agreed that it's probably better to drop it if it's not executable. The rationale is that it doesn't really buy us much protection / validation that cannot be covered through unit tests themselves. So: let's drop it and ship this PR!! |
ac06b22
to
ff9a9b0
Compare
@shivlaks thanks for the update, integration tests removed. |
ff9a9b0
to
a894728
Compare
Pull request has been modified.
a894728
to
c74aa4a
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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). |
Add support for aws-apigatewayv2
DomainName
as target.Closes #8941
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license