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(location): dataSource property is not required #31314

Closed
wants to merge 2 commits into from

Conversation

mazyu36
Copy link
Contributor

@mazyu36 mazyu36 commented Sep 4, 2024

Issue # (if applicable)

Closes #31288.

Reason for this change

Currently, dataSource property in PlaceIndex class is optional.

But in CFn document and CloudFormation schema aws-location-placeindex.json, DataSource property is required.

The current default value in CDK is ESRI, but there's no clear reason for this, and I think it should be aligned with CFn (CloudFormation).

Description of changes

Make dataSource property required.

Description of how you validated changes

Updated unit tests and integ tests.

Checklist

BREAKING CHANGE: dataSource property in PlaceIndex class is now required.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team September 4, 2024 12:14
@github-actions github-actions bot added bug This issue is a bug. effort/small Small work item – less than a day of effort p2 distinguished-contributor [Pilot] contributed 50+ PRs to the CDK labels Sep 4, 2024
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.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@mazyu36
Copy link
Contributor Author

mazyu36 commented Sep 4, 2024

Exemption Request: The results of the integration test snapshots have not changed, so they are not included.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Sep 4, 2024
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Sep 4, 2024
Copy link
Contributor

@kaizencc kaizencc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am going to close this PR because I definitely don't think we want to turn this property required on CDK and I don't see why the current default poses a problem right now. Can always revisit/reopen if we decide to change things up but that discussion should happen in an issue

*/
readonly dataSource?: DataSource;
readonly dataSource: DataSource;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A property being required on CFN does not necessarily mean we have to require it in CDK, if we can find a reasonable default for it. That's what we've done here -- we are not sending undefined into CFN and getting an error back, we are providing what we think is a sane default.

It sounds like you don't think that DataSource.ESRI is a reasonable default -- before making that change, I think that's a better discussion to have in an issue.

@kaizencc kaizencc closed this Sep 4, 2024
Copy link

github-actions bot commented Sep 4, 2024

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 4, 2024
@aws-cdk-automation
Copy link
Collaborator

The pull request linter fails with the following errors:

❌ Fixes must contain a change to an integration test file and the resulting snapshot.

PRs must pass status checks before we can provide a meaningful review.

If you would like to request an exemption from the status checks or clarification on feedback, please leave a comment on this PR containing Exemption Request and/or Clarification Request.

✅ A exemption request has been requested. Please wait for a maintainer's review.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue is a bug. distinguished-contributor [Pilot] contributed 50+ PRs to the CDK effort/small Small work item – less than a day of effort p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws-location-alpha: dataSource property should be required in PlaceIndex class
3 participants