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

fix(appsync): can not use Tokens in the name of a DataSource #22378

Merged
merged 3 commits into from
Oct 6, 2022

Conversation

ohde
Copy link
Contributor

@ohde ohde commented Oct 5, 2022

Closes #18900


All Submissions:

Adding new Unconventional Dependencies:

  • This PR adds new unconventional dependencies following the process described here

New Features

  • [ X] Have you added the new feature to an integration test?
    • [X ] Did you use 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

@github-actions github-actions bot added bug This issue is a bug. p1 labels Oct 5, 2022
@aws-cdk-automation aws-cdk-automation requested a review from a team October 5, 2022 22:39
@github-actions github-actions bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label Oct 5, 2022
@gitpod-io
Copy link

gitpod-io bot commented Oct 5, 2022

@ohde ohde changed the title fix(aws-appsync): Check if token is unresolved before stripping unsupported characters from DataSource. fix(appsync): check if token is unresolved before stripping unsupported characters from DataSource. Oct 5, 2022
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a 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.

@ohde ohde changed the title fix(appsync): check if token is unresolved before stripping unsupported characters from DataSource. fix(appsync): check if token is unresolved before stripping unsupported characters from DataSource Oct 5, 2022
@aws-cdk-automation aws-cdk-automation dismissed their stale review October 5, 2022 23:43

✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.

@rix0rrr rix0rrr changed the title fix(appsync): check if token is unresolved before stripping unsupported characters from DataSource fix(appsync): can not use Tokens in the name of a DataSource Oct 6, 2022
@mergify
Copy link
Contributor

mergify bot commented Oct 6, 2022

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-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 729ea95
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify mergify bot merged commit 511eb79 into aws:main Oct 6, 2022
@mergify
Copy link
Contributor

mergify bot commented Oct 6, 2022

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).

arewa pushed a commit to arewa/aws-cdk that referenced this pull request Oct 8, 2022
Closes aws#18900

----

### All Submissions:

* [ X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ X] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [X ] Did you use `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*
homakk pushed a commit to homakk/aws-cdk that referenced this pull request Dec 1, 2022
Closes aws#18900

----

### All Submissions:

* [ X] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ X] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [X ] Did you use `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*
mergify bot pushed a commit that referenced this pull request Jan 27, 2023
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:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Construct Runtime Dependencies:

* [ ] This PR adds new construct runtime dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-construct-runtime-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] Did you use `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*

![image](https://user-images.githubusercontent.com/5336472/214185923-6e90b49a-e834-4932-a23a-12094546181d.png)

![image](https://user-images.githubusercontent.com/5336472/214186095-a4ee51f7-37e1-451c-ba08-d27277cba0b9.png)

The above code generates the shown diff. This is due to #23743 where the name is sanitised, but not when setting `this.name`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. p1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws-appsync: Data Source name does not handle tokens appropriately
3 participants