Skip to content

fix(cloudformation): suppress noisy LSP logMessage notifications from…#6259

Merged
aseemxs merged 1 commit intoaws:tempCfnLspfrom
Zee2413:fix/notification
Feb 19, 2026
Merged

fix(cloudformation): suppress noisy LSP logMessage notifications from…#6259
aseemxs merged 1 commit intoaws:tempCfnLspfrom
Zee2413:fix/notification

Conversation

@Zee2413
Copy link
Copy Markdown
Contributor

@Zee2413 Zee2413 commented Feb 18, 2026

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

Suppress noisy CloudFormation LSP window/logMessage notifications

Problem

The CloudFormation Language Server sends internal diagnostic messages via the LSP window/logMessage protocol, which the IntelliJ platform's default LspServerNotificationsHandler surfaces as balloon notifications to the user. Two recurring messages were particularly disruptive:

  1. Node.js url.parse() deprecation warning — The OpenTelemetry HTTP instrumentation dependency in the LSP server uses the deprecated url.parse() API. Node.js emits [DEP0169] DeprecationWarning to stderr, which the server forwards as an error-level window/logMessage. This is a transitive dependency issue, not actionable by the user.

  2. OpenTelemetry metrics export failure — The LSP server's telemetry subsystem attempts to export metrics to a remote endpoint. When the connection fails (e.g., no internet, endpoint unreachable), PeriodicExportingMetricReader logs a socket hang up error via window/logMessage every ~5 minutes. This is an internal retry mechanism, not a user-facing error.

Additionally, benign startup messages ("AWS CloudFormation is now listening...", "Registered for workspace changes", etc.) were showing as sequential balloon notifications, drowning out important notifications like the telemetry opt-in prompter.

Solution

Override createLsp4jClient in CfnLspServerDescriptor to wrap the platform's LspServerNotificationsHandler with a CfnLspNotificationsHandler that uses Kotlin's by delegation. The wrapper only overrides logMessage to redirect messages to idea.log instead of balloon notifications. showMessage is left untouched so any future intentional user-facing messages from the server still display normally.

Intentional notifications from the plugin itself (stacks, resources, validation/deployment) are unaffected — they use the toolkit's own notifyError/notifyInfo utilities, which bypass the LSP notification handler entirely.

Testing

  • Verified no balloon notifications appear for logMessage content
  • Verified messages are captured in idea.log under CfnLspNotificationsHandler
  • Verified existing intentional notifications (validation success/failure, stack loading errors, etc.) still display as expected

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Zee2413 Zee2413 requested a review from a team as a code owner February 18, 2026 20:22
@aseemxs aseemxs merged commit 4f1eb22 into aws:tempCfnLsp Feb 19, 2026
3 checks passed
Zee2413 added a commit to Zee2413/aws-toolkit-jetbrains that referenced this pull request Feb 27, 2026
Zee2413 added a commit to Zee2413/aws-toolkit-jetbrains that referenced this pull request Feb 28, 2026
chungjac pushed a commit that referenced this pull request Mar 12, 2026
…n branch (#6304)

* feat(cloudformation): Add CloudFormation Language Server integration (#6188)

* feat(cloudformation): add CloudFormation LSP

* update imports as per toolkits to toolkit rename

* address PR comments on 1/26

* add didConfigurationChange notification to server

* revert unintended package-lock.json changes

* Add auto-update, manifest caching, hash verification, and legacy Linux support for LSP server

* address comments

* reduce class scopes

* remove unused imports

* add ldconfig lookup and binary check fallback for legacy linux

* address detekt issues

* create extension config, update init params

* feat(cloudformation): add CloudFormation tool window, stacks tree view (#6215)

* feat(cloudformation): add CloudFormation tool window and stacks tree view

* remove seperate cfn region picker and subscribe to AwsConnectionManager for region info

* address PR comments, no major change - 02/05

* fix(cloudformation): rename properties to fix failing test (#6241)

* fix(cloudformation): rename properties to fix failing test

* use gson serializer to fix detekt issue with PascalCase

* feat(cloudformation): add resources exploration node (#6236)

* Add CloudFormation resources node

* Remove duplicated message bundles

* gradle check fixes

* Fixed imports and nested data classes

* fix(cloudformation): persist resource types list (#6253)

* fix(cloudformation): Skip credential resolution during transient connection states (#6252)

* feat(cloudformation): Prompt for CloudFormation Language Server telem… (#6249)

* feat(cloudformation): Prompt for CloudFormation Language Server telemetry opt-in

* update changelog and reuse learn more message bundle

* revert to using cfn dedicated learn more message

* fix(cloudformation): dedupe resource pagination and add load more right click action (#6256)

* feat(cloudformation): validate template via change set and add actions toolbar (#6255)

* fix(cloudformation): suppress noisy LSP logMessage notifications from surfacing as balloon popups (#6259)

* feat(cloudformation): add stack view panel and overview contents (#6250)

* feat(cloudformation): add semantic versioning and limit server versio… (#6262)

* feat(cloudformation): add semantic versioning and limit server version for compatibility

* use isLatest, remove gh release api

* fix(cloudformation): Fix imports and gradle properties (#6272)

* feat(cloudformation): Add document manager to list available templates

* Lint fixes

* Addressed comments

* Move DocumentMetadata to manager class, remove relative path parsing logs

* Use absolute paths on hover, fix folder icon, fix imports

* fix(cloudformation): auto focus search bar, allow for entire checkbox row to be selectable (#6266)

* Merge pull request #6265 from Zee2413/lsp-integ-test

feat(cloudformation): add cfn lsp integration test

* feat(cloudformation): add stack resources panel (#6271)

* feat(cloudformation): add stack resources panel

* Move auto refresh logic into new listener and interface

* feat(cloudformation): Add outputs panel to CloudFormation template (#6275)

* feat(cloudformation): Add outputs panel to CloudFormation template

* Addressed comments

* Fix merge conflicts and api contract changes

* feat(cloudformation): view change set diff and add deployment configu… (#6279)

* feat(cloudformation): view change set diff and add deployment configurations

* revert package lock

* add live aware changeset drift in diff view

* add titles to tables, rename change set tab, add diff view button

* Minor code cleanup and detekt fix

* Address PR feedback:
1. Silent catch → Now shows notifyError to the user with the failure reason
2. .get() without timeout → All 5 calls now use get(30, TimeUnit.SECONDS) — existing catch blocks handle TimeoutException
3. Scheduler lifecycle → Added project.isDisposed check at the start of each poll tick, and a MAX_POLL_COUNT of 3600 (1 hour at 1s intervals) to prevent infinite polling

* feat(cloudformation): update README with CloudFormation language server features (#6283)

* feat(cloudformation): Add stack events panel (#6277)

* feat(cloudformation): Add stack events panel

* Add changelog

* Fixes

* Created shared table panel method, using arn sdk methods

* Make hook invocation column conditional, set console links dynamically, fix console icon spacing, fix display messages

* Remove unused const

* UI tweaks

* Make changelog more concise

* fix(cloudformation): add Node.js download link to error notification

* fix(cloudformation): add extension name and version to the lsp init options

* fix(cloudformation): convert cfn-guard settings rule pack to be a checkbox list

* feat(cloudformation): add status bar showing CloudFormation deployment operations in-flight (#6287)

* fix(cloudformation): Start CloudFormation LSP upon toolkit activation (#6293)

* fix(cloudformation): Restart polling and switch to events panel after executing change set (#6290)

Co-authored-by: invictus <149003065+ashishrp-aws@users.noreply.github.com>

* fix(cloudformation): Update plugin description to include CloudFormation support (#6296)

* fix(cloudformation): Fix CI (#6301)

* feat(cloudformation): Add CloudFormation LSP Introduction notification (#6303)

* fix(cloudformation): add credentials listener to cloudformation tool window

* fix(cloudformation): Fix CI for 2025-3 version

* fix lsp server shutdown

* Add robust handling around cfn lsp server shutdown

* Added comments

* Move cfn resources into correct xml

* Move all cfn lsp resources to correct xml

* Remove unnecessary whitespace

* Add explicit disposal of server following project close

* Modify logging

* feat(cloudformation): Add CloudFormation LSP Introduction notification

* fix(cloudformation): consolidated change logs (#6305)

---------

Co-authored-by: aws-toolkit-automation <43144436+aws-toolkit-automation@users.noreply.github.com>
Co-authored-by: Zeeshan Ahmed <37942674+Zee2413@users.noreply.github.com>
Co-authored-by: Laxman Reddy <141967714+laileni-aws@users.noreply.github.com>
Co-authored-by: Zeeshan Ahmed <zeemed@amazon.com>
Co-authored-by: invictus <149003065+ashishrp-aws@users.noreply.github.com>
laileni-aws added a commit to laileni-aws/aws-toolkit-jetbrains that referenced this pull request Mar 23, 2026
…n branch (aws#6304)

* feat(cloudformation): Add CloudFormation Language Server integration (aws#6188)

* feat(cloudformation): add CloudFormation LSP

* update imports as per toolkits to toolkit rename

* address PR comments on 1/26

* add didConfigurationChange notification to server

* revert unintended package-lock.json changes

* Add auto-update, manifest caching, hash verification, and legacy Linux support for LSP server

* address comments

* reduce class scopes

* remove unused imports

* add ldconfig lookup and binary check fallback for legacy linux

* address detekt issues

* create extension config, update init params

* feat(cloudformation): add CloudFormation tool window, stacks tree view (aws#6215)

* feat(cloudformation): add CloudFormation tool window and stacks tree view

* remove seperate cfn region picker and subscribe to AwsConnectionManager for region info

* address PR comments, no major change - 02/05

* fix(cloudformation): rename properties to fix failing test (aws#6241)

* fix(cloudformation): rename properties to fix failing test

* use gson serializer to fix detekt issue with PascalCase

* feat(cloudformation): add resources exploration node (aws#6236)

* Add CloudFormation resources node

* Remove duplicated message bundles

* gradle check fixes

* Fixed imports and nested data classes

* fix(cloudformation): persist resource types list (aws#6253)

* fix(cloudformation): Skip credential resolution during transient connection states (aws#6252)

* feat(cloudformation): Prompt for CloudFormation Language Server telem… (aws#6249)

* feat(cloudformation): Prompt for CloudFormation Language Server telemetry opt-in

* update changelog and reuse learn more message bundle

* revert to using cfn dedicated learn more message

* fix(cloudformation): dedupe resource pagination and add load more right click action (aws#6256)

* feat(cloudformation): validate template via change set and add actions toolbar (aws#6255)

* fix(cloudformation): suppress noisy LSP logMessage notifications from surfacing as balloon popups (aws#6259)

* feat(cloudformation): add stack view panel and overview contents (aws#6250)

* feat(cloudformation): add semantic versioning and limit server versio… (aws#6262)

* feat(cloudformation): add semantic versioning and limit server version for compatibility

* use isLatest, remove gh release api

* fix(cloudformation): Fix imports and gradle properties (aws#6272)

* feat(cloudformation): Add document manager to list available templates

* Lint fixes

* Addressed comments

* Move DocumentMetadata to manager class, remove relative path parsing logs

* Use absolute paths on hover, fix folder icon, fix imports

* fix(cloudformation): auto focus search bar, allow for entire checkbox row to be selectable (aws#6266)

* Merge pull request aws#6265 from Zee2413/lsp-integ-test

feat(cloudformation): add cfn lsp integration test

* feat(cloudformation): add stack resources panel (aws#6271)

* feat(cloudformation): add stack resources panel

* Move auto refresh logic into new listener and interface

* feat(cloudformation): Add outputs panel to CloudFormation template (aws#6275)

* feat(cloudformation): Add outputs panel to CloudFormation template

* Addressed comments

* Fix merge conflicts and api contract changes

* feat(cloudformation): view change set diff and add deployment configu… (aws#6279)

* feat(cloudformation): view change set diff and add deployment configurations

* revert package lock

* add live aware changeset drift in diff view

* add titles to tables, rename change set tab, add diff view button

* Minor code cleanup and detekt fix

* Address PR feedback:
1. Silent catch → Now shows notifyError to the user with the failure reason
2. .get() without timeout → All 5 calls now use get(30, TimeUnit.SECONDS) — existing catch blocks handle TimeoutException
3. Scheduler lifecycle → Added project.isDisposed check at the start of each poll tick, and a MAX_POLL_COUNT of 3600 (1 hour at 1s intervals) to prevent infinite polling

* feat(cloudformation): update README with CloudFormation language server features (aws#6283)

* feat(cloudformation): Add stack events panel (aws#6277)

* feat(cloudformation): Add stack events panel

* Add changelog

* Fixes

* Created shared table panel method, using arn sdk methods

* Make hook invocation column conditional, set console links dynamically, fix console icon spacing, fix display messages

* Remove unused const

* UI tweaks

* Make changelog more concise

* fix(cloudformation): add Node.js download link to error notification

* fix(cloudformation): add extension name and version to the lsp init options

* fix(cloudformation): convert cfn-guard settings rule pack to be a checkbox list

* feat(cloudformation): add status bar showing CloudFormation deployment operations in-flight (aws#6287)

* fix(cloudformation): Start CloudFormation LSP upon toolkit activation (aws#6293)

* fix(cloudformation): Restart polling and switch to events panel after executing change set (aws#6290)

Co-authored-by: invictus <149003065+ashishrp-aws@users.noreply.github.com>

* fix(cloudformation): Update plugin description to include CloudFormation support (aws#6296)

* fix(cloudformation): Fix CI (aws#6301)

* feat(cloudformation): Add CloudFormation LSP Introduction notification (aws#6303)

* fix(cloudformation): add credentials listener to cloudformation tool window

* fix(cloudformation): Fix CI for 2025-3 version

* fix lsp server shutdown

* Add robust handling around cfn lsp server shutdown

* Added comments

* Move cfn resources into correct xml

* Move all cfn lsp resources to correct xml

* Remove unnecessary whitespace

* Add explicit disposal of server following project close

* Modify logging

* feat(cloudformation): Add CloudFormation LSP Introduction notification

* fix(cloudformation): consolidated change logs (aws#6305)

---------

Co-authored-by: aws-toolkit-automation <43144436+aws-toolkit-automation@users.noreply.github.com>
Co-authored-by: Zeeshan Ahmed <37942674+Zee2413@users.noreply.github.com>
Co-authored-by: Laxman Reddy <141967714+laileni-aws@users.noreply.github.com>
Co-authored-by: Zeeshan Ahmed <zeemed@amazon.com>
Co-authored-by: invictus <149003065+ashishrp-aws@users.noreply.github.com>
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.

3 participants