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-cdk-lib: Names.uniqueId should take IConstruct instead of Construct as parameter #20584

Closed
1 of 2 tasks
schabe77 opened this issue Jun 2, 2022 · 2 comments · Fixed by #20696
Closed
1 of 2 tasks
Labels
aws-cdk-lib Related to the aws-cdk-lib package effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md p2

Comments

@schabe77
Copy link
Contributor

schabe77 commented Jun 2, 2022

Describe the feature

Names.uniqueId only accepts Constructs. The method internally only works with Construct's nodes which can also be determined for IConstructs (Node.of). So it should be o.k. to pass an IConstruct.

Use Case

I use the Java-CDK and want to create a uniqueId of an IOpenIdConnectProvider, which is an IConstruct but no Construct.
In Java it's impossible to do compile that, in TypeScript it works without problems.

Proposed Solution

change the parameter type from Construct to IConstruct

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.26.0

Environment details (OS name and version, etc.)

Windows / Linux

@schabe77 schabe77 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 2, 2022
@github-actions github-actions bot added the aws-cdk-lib Related to the aws-cdk-lib package label Jun 2, 2022
@peterwoodworth peterwoodworth added good first issue Related to contributions. See CONTRIBUTING.md p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jun 9, 2022
@peterwoodworth
Copy link
Contributor

I don't see why this wouldn't work - thanks for the feature request! Check out our contributing guide if you're interested - there's a low chance the team will be able to address this soon but we'd be happy to review a PR 🙂

@mergify mergify bot closed this as completed in #20696 Jun 13, 2022
mergify bot pushed a commit that referenced this issue Jun 13, 2022
…uct (#20584) (#20696)

This updates `Names.uniqueId()` to accept an `IConstruct` instead of `Construct`.

Closes #20584

----

### 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

* [ ] 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*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

daschaa pushed a commit to daschaa/aws-cdk that referenced this issue Jul 9, 2022
…uct (aws#20584) (aws#20696)

This updates `Names.uniqueId()` to accept an `IConstruct` instead of `Construct`.

Closes aws#20584

----

### 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

* [ ] 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*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws-cdk-lib Related to the aws-cdk-lib package effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. good first issue Related to contributions. See CONTRIBUTING.md p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants