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

aws-location-alpha: dataSource property should be required in PlaceIndex class #31288

Closed
1 task
mazyu36 opened this issue Sep 2, 2024 · 3 comments
Closed
1 task
Labels
@aws-cdk/aws-location-alpha Related to the @aws-cdk/aws-location-alpha package bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Comments

@mazyu36
Copy link
Contributor

mazyu36 commented Sep 2, 2024

Describe the bug

Currently, dataSource property in PlaceIndex class is optional.

But in CFn document, DataSource property is required.

I think it would be preferable to make this a required field in accordance with CloudFormation.

In #30682, the dataSource property was also implemented, and based on the review comment, it was changed from optional to required.

https://github.com/aws/aws-cdk/pull/30682/files#r1734958764

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

The dataSource property is required.

Current Behavior

The dataSource property is optional.

Reproduction Steps

When use PlaceIndex class without dataSource property.

Possible Solution

Change dataSource property to required.

Additional Information/Context

No response

CDK CLI Version

2.151.0

Framework Version

No response

Node.js Version

All

OS

MacOS

Language

TypeScript

Language Version

No response

Other information

I have created an issue to discuss whether the modification should be implemented.

Considering the consistency with the RouteCalculator class and the CFn documentation, I think it would be better to make the dataSource required.
I recognize that this would be a breaking change, but aws-location is an alpha module.

However, I think this change is not mandatory.

Please let me know your thoughts.

@mazyu36 mazyu36 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 2, 2024
@github-actions github-actions bot added the @aws-cdk/aws-location-alpha Related to the @aws-cdk/aws-location-alpha package label Sep 2, 2024
@ashishdhingra ashishdhingra self-assigned this Sep 3, 2024
@ashishdhingra ashishdhingra added p2 investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Sep 3, 2024
@ashishdhingra
Copy link
Contributor

CloudFormation schema aws-location-placeindex.json specifies DataSource as required field:

...
  "required" : [ "DataSource", "IndexName" ],
...

@ashishdhingra ashishdhingra added effort/small Small work item – less than a day of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Sep 3, 2024
@kaizencc
Copy link
Contributor

kaizencc commented Sep 4, 2024

Copying my comment on the PR here:

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.

@ashishdhingra ashishdhingra removed their assignment Sep 4, 2024
@mazyu36 mazyu36 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 12, 2024
Copy link

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 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/aws-location-alpha Related to the @aws-cdk/aws-location-alpha package bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants