Skip to content

fix(rds): enablePerformanceInsights false is ignored when other performance insight properties are set#37287

Merged
mergify[bot] merged 2 commits intoaws:mainfrom
mazyu36:fix/rds-enable-performance-insights-false
Mar 20, 2026
Merged

fix(rds): enablePerformanceInsights false is ignored when other performance insight properties are set#37287
mergify[bot] merged 2 commits intoaws:mainfrom
mazyu36:fix/rds-enable-performance-insights-false

Conversation

@mazyu36
Copy link
Copy Markdown
Contributor

@mazyu36 mazyu36 commented Mar 19, 2026

Issue # (if applicable)

Closes #37051

Reason for this change

DatabaseInstanceFromSnapshot (and other DatabaseInstanceNew subclasses) ignores an explicit enablePerformanceInsights: false when other Performance Insights properties are also set.

Description of changes

Replace || with ?? in the PI enablement logic so that an explicit false is not overridden. Remove the redundant fallback on the CFn property assignment.

Description of how you validated changes

Added a unit test for DatabaseInstanceFromSnapshot with enablePerformanceInsights: false. All existing tests pass.

Checklist

…baseInstanceFromSnapshot

The `||` operator in the performance insights enablement logic treated
`false` as falsy, causing it to be overridden when other PI-related
properties (e.g. `performanceInsightRetention`) were also set.

Replace `||` with `??` so that an explicit `false` is respected, while
still auto-enabling PI when only related properties are provided.

Closes aws#37051
@aws-cdk-automation aws-cdk-automation requested a review from a team March 19, 2026 09:30
@github-actions github-actions bot added bug This issue is a bug. p2 labels Mar 19, 2026
@github-actions github-actions bot added the distinguished-contributor [Pilot] contributed 50+ PRs to the CDK label Mar 19, 2026
Copy link
Copy Markdown
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.

(This review is outdated)

@mazyu36
Copy link
Copy Markdown
Contributor Author

mazyu36 commented Mar 19, 2026

Exemption Request: This is a logic-only fix in property computation, fully covered by unit tests.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Mar 19, 2026
@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 Mar 19, 2026
@leonmk-aws leonmk-aws self-assigned this Mar 20, 2026
@leonmk-aws leonmk-aws added the pr-linter/exempt-integ-test The PR linter will not require integ test changes label Mar 20, 2026
Copy link
Copy Markdown
Contributor

@leonmk-aws leonmk-aws left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution !

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Mar 20, 2026
@aws-cdk-automation aws-cdk-automation dismissed their stale review March 20, 2026 09:53

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

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 20, 2026

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

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 20, 2026

Merge Queue Status

  • Entered queue2026-03-20 09:55 UTC · Rule: default-squash
  • Checks passed · in-place
  • Merged2026-03-20 10:40 UTC · at 6aaecb3a31ebfab65c679c41ef4ee3e071ec6d03

This pull request spent 44 minutes 4 seconds in the queue, including 43 minutes 55 seconds running CI.

Required conditions to merge

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 20, 2026

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

@mergify mergify bot merged commit b4bca75 into aws:main Mar 20, 2026
18 of 19 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

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 Mar 20, 2026
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 p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes 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.

rds: DatabaseInstanceFromSnapshot ignores the enablePerformanceInsights parameter, always set to True

3 participants