Skip to content

feat(cloudformation): Update CloudFormation feature with latest changes#8303

Merged
laileni-aws merged 7 commits intoaws:feature/cloudformationfrom
kddejong:feature/cloudformation
Nov 18, 2025
Merged

feat(cloudformation): Update CloudFormation feature with latest changes#8303
laileni-aws merged 7 commits intoaws:feature/cloudformationfrom
kddejong:feature/cloudformation

Conversation

@kddejong
Copy link
Contributor

Includes all CloudFormation improvements and fixes from November 9th through November 17th:

  • Integration tests and LSP server workflow scripts
  • Online error handling improvements
  • CommaDelimitedList validation and boolean support
  • Restart server command fixes and autocomplete improvements
  • CFN init typing and consolidated commands
  • LSP logs and exception handling
  • Pagination and search in import/clone commands
  • Resource type request handling
  • Environment command error handling
  • Project creation UI improvements
  • LSP integration tests for offline features
  • Reference-counted status bar implementation
  • Expand/collapse arrow and resource messaging updates
  • Stack events and resources loading improvements
  • Validation workflow enhancements
  • Resource management and provider naming
  • Non-blocking CFN operations and restart LSP functionality
  • Deep linking to stack information views
  • E2E test infrastructure setup
  • Deployment workflow alignment
  • Cached CFN server offline support
  • LSP installation process updates
  • Startup fixes and permission handling
  • AWS Explorer CFN panel integration
  • Deployment mode prompts and stack view coordination
  • Overview integration and parameter extraction fixes
  • Panel metrics and telemetry improvements
  • S3 upload support and file selection
  • Icon updates and environment warnings
  • Command palette fixes and document management
  • Related resources workflow improvements
  • Windows target fixes and validation improvements
  • Environment naming and resource state management
  • Stack description and telemetry configuration
  • Deployment/validation icons and usage tracking
  • Permission handling and resource loading
  • Environment file selection and experimental flag removal
  • Endpoint configuration and ChangeSet diff redesign
  • S3 upload validation and inline completion removal
  • Stack output viewing and installation cleanup
  • Resource detail views and change set functionality
  • Dry run fixes and icon updates
  • Related resources API and change set commands
  • Stack event fetching and authentication updates
  • Drift indication and change set deletion
  • Credential encryption and diff viewer improvements
  • CFN init UI and empty node set handling
  • Stack overview pages and environment selection
  • View diff improvements and resource command updates
  • CloudFormation prefix usage and change set logic
  • Command execution controls and deployment confirmation
  • Document management and resource node simplification
  • Region management and settings updates
  • Resource/stack pagination and explorer node additions
  • Version selection and color fixes
  • Stack refresh listeners and LSP server locator improvements
  • CFN-lint/guard settings and diff provider enhancements
  • Managed resource import warnings and resource import support
  • Telemetry/client ID configuration and regionality improvements
  • Clone/stack info restoration and package.json updates
  • LSP stream improvements and authentication fixes

Problem

Solution


  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@kddejong kddejong requested a review from a team as a code owner November 17, 2025 21:40
@github-actions
Copy link

  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

@kddejong kddejong force-pushed the feature/cloudformation branch 2 times, most recently from a465577 to 37241d6 Compare November 17, 2025 21:51
…hanges from origin/master

Includes all CloudFormation improvements and fixes through November 17th:
- Integration tests and LSP server workflow scripts
- Online error handling improvements
- CommaDelimitedList validation and boolean support
- Parameter validation fixes (allow empty strings)
- Drift detection improvements (enable drift columns with change set level flag)
- Restart server command fixes and autocomplete improvements
- CFN init typing and consolidated commands
- LSP logs and exception handling
- Pagination and search in import/clone commands
- Resource type request handling
- Environment command error handling
- Project creation UI improvements
- LSP integration tests for offline features
- Reference-counted status bar implementation
- Expand/collapse arrow and resource messaging updates
- Stack events and resources loading improvements
- Validation workflow enhancements
- Resource management and provider naming
- Non-blocking CFN operations and restart LSP functionality
- Deep linking to stack information views
- E2E test infrastructure setup
- Deployment workflow alignment
- Cached CFN server offline support
- LSP installation process updates
- Startup fixes and permission handling
- AWS Explorer CFN panel integration
- Deployment mode prompts and stack view coordination
- Overview integration and parameter extraction fixes
- Panel metrics and telemetry improvements
- S3 upload support and file selection
- Icon updates and environment warnings
- Command palette fixes and document management
- Related resources workflow improvements
- Windows target fixes and validation improvements
- Environment naming and resource state management
- Stack description and telemetry configuration
- Deployment/validation icons and usage tracking
- Permission handling and resource loading
- Environment file selection and experimental flag removal
- Endpoint configuration and ChangeSet diff redesign
- S3 upload validation and inline completion removal
- Stack output viewing and installation cleanup
- Resource detail views and change set functionality
- Dry run fixes and icon updates
- Related resources API and change set commands
- Stack event fetching and authentication updates
- Drift indication and change set deletion
- Credential encryption and diff viewer improvements
- CFN init UI and empty node set handling
- Stack overview pages and environment selection
- View diff improvements and resource command updates
- CloudFormation prefix usage and change set logic
- Command execution controls and deployment confirmation
- Document management and resource node simplification
- Region management and settings updates
- Resource/stack pagination and explorer node additions
- Version selection and color fixes
- Stack refresh listeners and LSP server locator improvements
- CFN-lint/guard settings and diff provider enhancements
- Managed resource import warnings and resource import support
- Telemetry/client ID configuration and regionality improvements
- Clone/stack info restoration and package.json updates
- LSP stream improvements and authentication fixes
- CloudFormation activation made non-blocking to avoid blocking other services
@kddejong kddejong force-pushed the feature/cloudformation branch from 37241d6 to 1cdfbc2 Compare November 17, 2025 22:00
- Add @aws/cfn-dev-productivity as owners of packages/core/src/awsService/cloudformation/
- Show available releases when download fails to help troubleshoot platform/architecture issues

// Reference link - https://cloudscape.design/foundation/visual-foundation/iconography/ - icon name: external
export function externalLinkSvg(): string {
return `<svg width="14" height="14" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 12.0117H11.0098V14.0117H3C2.44772 14.0117 2 13.564 2 13.0117V5.01172H4V12.0117Z"/><path d="M13 2.01172C13.5523 2.01172 14 2.45943 14 3.01172V9.01172H12V5.43066L7.70605 9.71777L6.29395 8.30273L10.5908 4.01172H7V2.01172H13Z"/></svg>`
Copy link
Contributor

Choose a reason for hiding this comment

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

What's this used for?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is used for icon on the href redirecting links to stack console page from IDE. This icon is the same what CloudFormation console uses.

It is the icon you see next to MyS3Bucket -
Screenshot 2025-11-17 at 7 37 42 PM

Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably be using VSC provided icons for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its because they are being used in webview. We could use the icons in ./packages/core/resources/css/icons.css but not sure what standard exists for that file. We can switch this in a followup.

Copy link
Contributor

Choose a reason for hiding this comment

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

We received UX guidance to use the cloudspace external icon to align with Console. We can switch to vscode/codicons if team feels strongly.

Copy link
Contributor

Choose a reason for hiding this comment

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

You can add this icon(svg) to the resources and use accordingly if its must!


const hasDetails = rc.details && rc.details.length > 0
const expandIcon = hasDetails ? '▶' : ''
const expandIcon = hasDetails
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is this sourced from?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same but agreed we should be using the included ./packages/core/resources/css/icons.css for this icon in the webview.

Copy link
Contributor

Choose a reason for hiding this comment

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

Cloudscape design system(part of Amazon) angle-right and angle-down. This addresses an UX fit and finish feedback item as the unicode arrow appeared as a play button.
src

…ds.ts

Co-authored-by: manodnyab <66754471+manodnyab@users.noreply.github.com>
@manodnyab manodnyab self-requested a review November 18, 2025 01:22
Overwrite events if no nextToken exists to prevent duplication.
Based on changes from PR aws#178.
})
}

private async isFormStateValid(): Promise<boolean> {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Less code repetition

private async isFormStateValid(): Promise<boolean> {
    const { projectName, projectPath, environments } = this.state
    
    const error = !projectName ? 'Project name is required'
        : !projectPath ? 'Project path is required'
        : environments.length === 0 ? 'At least one environment is required'
        : null

    if (error) {
        void vscode.window.showWarningMessage(error)
        return false
    }

    return true
}

const expandIcon = hasDetails ? '▶' : ''
const expandIcon = hasDetails
? '<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" style="vertical-align: middle;"><path d="M5 2L11 8L5 14" stroke="currentColor" fill="none" stroke-width="1.5" stroke-linejoin="round"/></svg>'
: ''
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:
Move this to resources or assets folder!

Copy link
Contributor

Choose a reason for hiding this comment

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

Applicable for all the svg changes

if (detailsRow.style.display === 'none') {
detailsRow.style.display = 'table-row';
icon.textContent = '';
icon.innerHTML = '<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" style="vertical-align: middle;"><path d="M2 5L8 11L14 5" stroke="currentColor" fill="none" stroke-width="1.5" stroke-linejoin="round"/></svg>';
Copy link
Contributor

Choose a reason for hiding this comment

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

+1

this.refCount--

if (this.refCount === 0) {
this.disposeTimer = setTimeout(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can add early return

const unreleasedOperations = Array.from(this.operations.values()).filter((op) => !op.released)
const total = unreleasedOperations.length

if (total === 1) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Refactor this code to avoid nested if conditions


globalStatusBarItem.text = '$(sync~spin) Validation Starting...'
globalStatusBarItem.show()
function formatElapsed(startTime: Date): string {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:
move to utils

case OnlineFeatureErrorCode.NoAuthentication:
if (data?.requiresReauth) {
const action = await window.showErrorMessage(fullMessage, 'Re-authenticate')
if (action === 'Re-authenticate') {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need nested if condition here?

await activateCloudFormation(context)
// Start CloudFormation activation in background to avoid blocking other services
activateCloudFormation(context).catch((error) => {
getLogger().error(`CloudFormation activation failed: ${error}`)
Copy link
Contributor

Choose a reason for hiding this comment

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

For getLogger add topic of CloudFormation

getLogger('cloudformation').error(`CloudFormation activation failed: ${error}`)

import * as vscode from 'vscode'
import * as path from 'path'
import * as os from 'os'
import { mkdtemp, rm, writeFile } from 'fs/promises'
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we reuse existing shared fs utils?

*) echo "Unsupported architecture: $ARCH"; exit 1 ;;
esac

NODE_VERSION="22"
Copy link
Contributor

@laileni-aws laileni-aws Nov 18, 2025

Choose a reason for hiding this comment

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

Can this be node 24 ? If no, can I know the reason behind this?

}
},
"[cloudformation]": {
"editor.quickSuggestions": {
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this do ?

Copy link
Contributor

@laileni-aws laileni-aws left a comment

Choose a reason for hiding this comment

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

Approving this PR but need a followup pr for nits

@laileni-aws laileni-aws merged commit 371d23b into aws:feature/cloudformation Nov 18, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants