aws / aws/aws-cdk

(core): Ability to turn off specific deprecations

Open
#24,512 6 comments 13 reactions 0 assignees View on GitHub
@aws-cdk/core effort/medium feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

I'd like to be able to turn off (ack) _some_ deprecation notices, but keep others.

### Use Case

Turn off `DnsValidatedCertificate` notice.

We know the issue, but there is currently no good solution or path forward. The feature was deprecated without a matching replacement.

This warning shows up everywhere in our workflows and is very annoying. It can also cause warning blindness eventually, as developers learn to ignore it, but can also ignore others.

I want to be able to turn off this specific deprecation.

### Proposed Solution

N/A

### Other Information

```
console.warn
Warning: RNING] aws-cdk-lib.aws_certificatemanager.DnsValidatedCertificate is deprecated.
use {@link Certificate} instead
This API will be removed in the next major release.

119 | * @see https://github.com/aws/aws-cdk/pull/21982
120 | */
> 121 | const certificate = new aws_certificatemanager.DnsValidatedCertificate(this, 'ACMCertificate', {
| ^
122 | domainName: properties.hostedZone.zoneName,
123 | hostedZone: properties.hostedZone,
124 | /**

at Object.print (node_modules/aws-cdk-lib/.warnings.jsii.js:3:146)
at new DnsValidatedCertificate (node_modules/aws-cdk-lib/aws-certificatemanager/lib/dns-validated-certificate.js:1:639)
```

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### CDK version used

latest

### Environment details (OS name and version, etc.)

macOS

Contributor guide

Open the contributing guide

Research direction

Start by examining the deprecation warning output for DnsValidatedCertificate and the warning path shown in node_modules/aws-cdk-lib/.warnings.jsii.js. Define how a caller would acknowledge one deprecation while retaining others, then identify the relevant implementation and tests needed to verify selective suppression.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.