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(route53-targets): aws-apigatewayv2 target #10191

Merged
merged 2 commits into from
Nov 6, 2020

Conversation

johanneswuerbach
Copy link
Contributor

@johanneswuerbach johanneswuerbach commented Sep 4, 2020

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

@johanneswuerbach johanneswuerbach force-pushed the route53-target-apigatewayv2 branch 5 times, most recently from 783137f to 28c5232 Compare September 5, 2020 06:54
Copy link
Contributor

@shivlaks shivlaks 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 getting this started @johanneswuerbach

I had some questions and some small comments.
I think we should also add an integration test for this target.

Copy link
Contributor

@shivlaks shivlaks left a 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?

@johanneswuerbach
Copy link
Contributor Author

Sure, could you point me to an example test?

@christophgysin
Copy link
Contributor

@johanneswuerbach Here's an example integration test:
https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-route53-targets/test/integ.api-gateway-domain-name.ts

@gitpod-io
Copy link

gitpod-io bot commented Oct 19, 2020

@mergify mergify bot dismissed shivlaks’s stale review October 19, 2020 22:17

Pull request has been modified.

@johanneswuerbach
Copy link
Contributor Author

@christophgysin thanks for the pointer.

@shivlaks integration test added.

Copy link
Contributor

@shivlaks shivlaks left a 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

Comment on lines 13 to 16
const domainName = 'example.com';
const certArn = 'arn:aws:acm:us-east-1:111111111111:certificate';

const certificate = acm.Certificate.fromCertificateArn(this, 'cert', certArn);
Copy link
Contributor

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

@christophgysin
Copy link
Contributor

@shivlaks
Copy link
Contributor

@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?

@christophgysin
Copy link
Contributor

christophgysin commented Oct 20, 2020

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.

@johanneswuerbach
Copy link
Contributor Author

Anything I can do to move this forward?

@christophgysin
Copy link
Contributor

@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?

@shivlaks
Copy link
Contributor

shivlaks commented Nov 5, 2020

@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!!

@shivlaks shivlaks changed the title feat(aws-route53-targets): aws-apigatewayv2 target feat(route53-targets): aws-apigatewayv2 target Nov 5, 2020
@johanneswuerbach
Copy link
Contributor Author

@shivlaks thanks for the update, integration tests removed.

@mergify mergify bot dismissed shivlaks’s stale review November 5, 2020 20:00

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 561656e
  • 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 bot commented Nov 6, 2020

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 030c5c5 into aws:master Nov 6, 2020
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.

[route53-targets] support APIGatewayV2 as a domain target
4 participants