-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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): add AppSync
route53 target
#31976
base: main
Are you sure you want to change the base?
feat(route53-targets): add AppSync
route53 target
#31976
Conversation
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.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
AppSync
route53 target
Clarification Request I've written an integration test, but when trying to run it from Trying to debug I thought maybe I have to build things first, so I ran Running |
Hey Scott, I don't see anything incorrect in your integ test file. I would recommend just running a full clean rebuild with
and see if that resolves the import error. |
@paulhcsun Thanks, this did indeed fix the issue and I'm now able run the test. Although, as the comment within the file kinda says (copied from the route53-targets ApiGateway integ test), it's a somewhat redundant test since the stack can never deploy due to the hardcoded certificate & hosted zone arns. When running (via I think this means I need a "Exemption Request". |
Awesome! And gotcha, let me just confirm with the team member who added that explanation and if there's no other way to test this then I can add the integ teste exempted label. Edit: Actually it seems like there are some integ tests for the specific targets, for example this one for interface-vpc-endpoint-target. Would you be able to reference these tests and write out for AppSync as a target as well? |
@paulhcsun I believe the key difference with API Gateway and AppSync is that they both require a certificate to be created in order to have a custom domain. The other route53-targets (such as It's not entirely clear to me why having a certificate makes it impossible to integ test, but that's how the API Gateway integ tests' comment reads to me. If I'm misunderstanding then please advise accordingly. |
Hi. This requirement is noted in the following docs: I've recently created an integ test that requires a domain: Do you have a domain available for an integ test? |
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
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.
I’m not entirely confident, but I commented based on my experience from when I previously ran the integ test that uses a domain.
} | ||
} | ||
|
||
const certificateArn = process.env.CDK_INTEG_CERTIFICATE_ARN ?? process.env.CERTIFICATE_ARN; |
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.
const certificateArn = process.env.CDK_INTEG_CERTIFICATE_ARN ?? process.env.CERTIFICATE_ARN; | |
const certificateArn = process.env.CDK_INTEG_CERT_ARN ?? process.env.CERTIFICATE_ARN; |
It seems that the environment variable name used by integ-runner is incorrect.
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.
Good catch. I've adjusted within 73a4a46. This could be why the PR CodeBuild was failing too.
const testCase = new TestStack(app, 'aws-cdk-appsync-alias-integ', { certificateArn, domainName, hostedZoneId }); | ||
new IntegTest(app, 'appsync-domain-name', { | ||
testCases: [testCase], | ||
}); |
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.
}); | |
enableLookups: true, | |
stackUpdateWorkflow: false, | |
}); |
When I previously conducted a test using a domain, configuring this setting registered dummy values for the environment variables used by integ-runner in the template.
The current dummy values in the template seem different from the ones used by integ-runner. How were these values set?
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.
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.
Did you set your certificate arn to CERTIFICATE_ARN
?
In the following docs, env name is CERT_ARN
, but in your code env name is CERTIFICATE_ARN
.
https://github.com/aws/aws-cdk/blob/main/packages/%40aws-cdk-testing/framework-integ/README.md
export CERTFICATE_ARN=your_certificate_arn
or fix env name in your code is needed, I think.
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.
I'm able to get the tests running and passing locally if I use the real certificate etc.:
My point is that I thought you were saying the committed snapshot should use the integ-test-defined dummy values.
How do I make the snapshot have the "correct" dummy values? Is there some command I'm meant to use, or do I just manually edit them?
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.
If you run the integ test with the following configuration, I believe the dummy values will be automatically set in the template.
enableLookups: true,
stackUpdateWorkflow: false,
});
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Issue # (if applicable)
Closes #26109
Reason for this change
This PR adds support for creating alias records on AppSync's
GraphqlApi
.Description of changes
appsync-target.ts
file, with theAppSync
class.AppSync
target class.aws-cdk-lib/aws-route53-targets
Description of how you validated changes
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license