Skip to content

Conversation

@awsmadi
Copy link

@awsmadi awsmadi commented Jan 22, 2026

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:

  • AWS::QuickSight::DataSet - Hotswappable properties: PhysicalTableMap, LogicalTableMap, Name
  • AWS::QuickSight::DataSource - Hotswappable properties: DataSourceParameters, Name, Credentials
  • AWS::QuickSight::Dashboard - Hotswappable properties: Definition, Name, SourceEntity
  • AWS::QuickSight::Analysis - Hotswappable properties: Definition, Name, SourceEntity
  • AWS::QuickSight::Template - Hotswappable properties: Definition, Name, SourceEntity

The implementation:

  • Evaluates CloudFormation expressions for changed properties
  • Resolves resource physical IDs from logical IDs
  • Calls the appropriate QuickSight Update API for each resource type
  • Falls back to CloudFormation for non-hotswappable property changes (e.g., ImportMode)

SDK Integration (lib/api/aws-auth/sdk.ts)

Adds IQuickSightClient interface and quickSight() method to the SDK class with support for:

  • updateAnalysis
  • updateDashboard
  • updateDataSet
  • updateDataSource
  • updateTemplate

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:

  • New resource additions (no hotswap, falls back to CFN)
  • Property changes for all five resource types
  • Non-hotswappable property changes (correctly falls back)
  • Both FALL_BACK and HOTSWAP_ONLY modes

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

auto-merge was automatically disabled January 22, 2026 18:14

Head branch was pushed to by a user without write access

@awsmadi awsmadi changed the title feat(hotswap): Add hotswap support for QuickSight resources feat(cli): Add hotswap support for QuickSight resources Jan 22, 2026
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-commenter
Copy link

codecov-commenter commented Jan 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.71%. Comparing base (78ed91b) to head (4671135).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1055   +/-   ##
=======================================
  Coverage   87.70%   87.71%           
=======================================
  Files          72       72           
  Lines       10102    10102           
  Branches     1335     1334    -1     
=======================================
+ Hits         8860     8861    +1     
+ Misses       1217     1216    -1     
  Partials       25       25           
Flag Coverage Δ
suite.unit 87.71% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants