feat(cloudformation): Update CloudFormation feature with latest changes#8303
Conversation
|
a465577 to
37241d6
Compare
…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
37241d6 to
1cdfbc2
Compare
- 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
packages/core/src/awsService/cloudformation/commands/cfnCommands.ts
Outdated
Show resolved
Hide resolved
|
|
||
| // 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>` |
There was a problem hiding this comment.
We should probably be using VSC provided icons for this?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
We received UX guidance to use the cloudspace external icon to align with Console. We can switch to vscode/codicons if team feels strongly.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Where is this sourced from?
There was a problem hiding this comment.
Same but agreed we should be using the included ./packages/core/resources/css/icons.css for this icon in the webview.
There was a problem hiding this comment.
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>
Overwrite events if no nextToken exists to prevent duplication. Based on changes from PR aws#178.
| }) | ||
| } | ||
|
|
||
| private async isFormStateValid(): Promise<boolean> { |
There was a problem hiding this comment.
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>' | ||
| : '' |
There was a problem hiding this comment.
nit:
Move this to resources or assets folder!
There was a problem hiding this comment.
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>'; |
| this.refCount-- | ||
|
|
||
| if (this.refCount === 0) { | ||
| this.disposeTimer = setTimeout(() => { |
There was a problem hiding this comment.
nit: can add early return
| const unreleasedOperations = Array.from(this.operations.values()).filter((op) => !op.released) | ||
| const total = unreleasedOperations.length | ||
|
|
||
| if (total === 1) { |
There was a problem hiding this comment.
nit: Refactor this code to avoid nested if conditions
|
|
||
| globalStatusBarItem.text = '$(sync~spin) Validation Starting...' | ||
| globalStatusBarItem.show() | ||
| function formatElapsed(startTime: Date): string { |
| case OnlineFeatureErrorCode.NoAuthentication: | ||
| if (data?.requiresReauth) { | ||
| const action = await window.showErrorMessage(fullMessage, 'Re-authenticate') | ||
| if (action === 'Re-authenticate') { |
There was a problem hiding this comment.
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}`) |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
Can we reuse existing shared fs utils?
| *) echo "Unsupported architecture: $ARCH"; exit 1 ;; | ||
| esac | ||
|
|
||
| NODE_VERSION="22" |
There was a problem hiding this comment.
Can this be node 24 ? If no, can I know the reason behind this?
| } | ||
| }, | ||
| "[cloudformation]": { | ||
| "editor.quickSuggestions": { |
laileni-aws
left a comment
There was a problem hiding this comment.
Approving this PR but need a followup pr for nits

Includes all CloudFormation improvements and fixes from November 9th through November 17th:
Problem
Solution
feature/xbranches will not be squash-merged at release time.