fix(rds): enablePerformanceInsights false is ignored when other performance insight properties are set#37287
Conversation
…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
|
Exemption Request: This is a logic-only fix in property computation, fully covered by unit tests. |
leonmk-aws
left a comment
There was a problem hiding this comment.
Thank you for your contribution !
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
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). |
Merge Queue Status
This pull request spent 44 minutes 4 seconds in the queue, including 43 minutes 55 seconds running CI. Required conditions to merge
|
|
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). |
|
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
Closes #37051
Reason for this change
DatabaseInstanceFromSnapshot(and otherDatabaseInstanceNewsubclasses) ignores an explicitenablePerformanceInsights: falsewhen other Performance Insights properties are also set.Description of changes
Replace
||with??in the PI enablement logic so that an explicitfalseis not overridden. Remove the redundant fallback on the CFn property assignment.Description of how you validated changes
Added a unit test for
DatabaseInstanceFromSnapshotwithenablePerformanceInsights: false. All existing tests pass.Checklist