-
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
fix(appsync): sanitized datasource name isn't exported #23802
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.
hey @ramblingenzyme good catch on this. Are you able to add a unit test here to assert that the sanitized name is correctly returned on |
@MrArnoldPalmer Happy to try! |
Now that I'm looking at this, this fix is only going to apply to stuff without tokens, i.e. if a token returns a string with a I'm a bit unsure about how AppSync/CF deals with this, and if that situation will just fail to deploy. |
✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.
@MrArnoldPalmer I've added a test case for what's definitely fixed by this PR and 2 which aren't covered. I'm unsure if these are possible to be resolved, but are definitely beyond me at this point. If these are solvable issues, I'm happy to open issues that get linked in the test case comment similar to https://github.com/aws/aws-cdk/blob/74318c7d22bfc00de9e005f68a0a6aaa58c7db39/packages/%40aws-cdk/pipelines/test/docker-credentials.test.ts |
So I'm not sure the exact case of having a string that is part token then concatenated with Basically I think we can remove the two failing test cases and merge the fix as is to solve the existing issue. Also can you add a couple of sentences to the PR message for the changelog? |
Just wasn't sure if that was a normal thing to do, since one of the test cases added in #22378 also has a template string with an embedded token. Removed those test cases and updating the PR message now. |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
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 main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Closes #23743
When providing a name with unsupported characters to an AppSync datasource, it is sanitized internally. #22378 introduced a bug where the sanitized name was no longer exposed on DataSource class instances.
All Submissions:
Adding new Construct Runtime Dependencies:
New Features
yarn integ
to deploy the infrastructure and generate the snapshot (i.e.yarn integ
without--dry-run
)?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
The above code generates the shown diff. This is due to #23743 where the name is sanitised, but not when setting
this.name
.