feat(cli): Add hotswap support for QuickSight resources#1055
feat(cli): Add hotswap support for QuickSight resources#1055
Conversation
Head branch was pushed to by a user without write access
Use standard sdkDepForLib() helper for flexible version management, allowing package manager deduplication as per repo conventions.
Resolves @smithy/types version conflicts with test infrastructure. Now properly builds without TypeScript compilation errors.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1055 +/- ##
=======================================
Coverage 87.70% 87.70%
=======================================
Files 72 72
Lines 10121 10121
Branches 1336 1337 +1
=======================================
Hits 8877 8877
Misses 1219 1219
Partials 25 25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Updates license file to include @aws-sdk/client-quicksight@3.953.0 Fixes CI build error about files changed during build.
ESLint auto-fix alphabetizes imports as required by project style rules. This matches CI expectations and prevents build-time file changes.
| Name: evaluatedProps.Name ?? props.Name, | ||
| PhysicalTableMap: evaluatedProps.PhysicalTableMap, | ||
| LogicalTableMap: evaluatedProps.LogicalTableMap, | ||
| ImportMode: props.ImportMode, |
There was a problem hiding this comment.
ImportMode here is passed as raw props.ImportMode without evaluation, unlike other properties that use evaluatedProps
What is the reason this is raw CFN and not being evaluated like the other properties?
|
|
||
| const QUICKSIGHT_RESOURCE_TYPES: Record<string, { hotswappableProps: string[]; service: string }> = { | ||
| 'AWS::QuickSight::DataSet': { hotswappableProps: ['PhysicalTableMap', 'LogicalTableMap', 'Name'], service: 'quicksight-dataset' }, | ||
| 'AWS::QuickSight::DataSource': { hotswappableProps: ['DataSourceParameters', 'Name', 'Credentials'], service: 'quicksight-datasource' }, |
There was a problem hiding this comment.
Is it safe to allow hotswapping credentials? I'm unsure if there is any extra consideration here but want to clarify
There was a problem hiding this comment.
I think there could be tests for
- CFN intrinsic functions existing on the properties
- Both hotswappable and non-hotswappable properties changing together
Summary
This PR adds hotswap deployment support for Amazon QuickSight resources, enabling faster iterative development when working with QuickSight dashboards, analyses, datasets, data sources, and templates.
Motivation
QuickSight resources often require frequent updates during development, particularly when iterating on dashboard definitions, data mappings, and visualizations. Full CloudFormation deployments for these changes can be slow. Hotswap allows developers to bypass CloudFormation and update resources directly
via the AWS API, significantly reducing deployment time during development.
Changes
New QuickSight Hotswap Handler (lib/api/hotswap/quicksight.ts)
Adds hotswap support for five QuickSight resource types:
The implementation:
SDK Integration (lib/api/aws-auth/sdk.ts)
Adds IQuickSightClient interface and quickSight() method to the SDK class with support for:
Hotswap Registration (lib/api/hotswap/hotswap-deployments.ts)
Registers the QuickSight detector for all five resource types in the RESOURCE_DETECTORS map.
Test Infrastructure (test/_helpers/mock-sdk.ts)
Adds mockQuickSightClient for testing QuickSight hotswap operations.
Testing
Added comprehensive test suite (test/api/hotswap/quicksight-hotswap-deployments.test.ts) covering:
Usage Example
bash
Deploy with hotswap enabled - QuickSight changes will be applied directly
cdk deploy --hotswap
Or hotswap-only mode (skip non-hotswappable changes)
cdk deploy --hotswap-fallback
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license