Conversation
|
⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done |
|
|
✅ I finished the code review, and didn't find any security or code quality issues. |
…ion, caching, cleanup, and startup recovery while simplifying the installer abstraction layer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The CloudFormation language server installer was not resilient:
globalState, so an offline start had no fallback to a previously installed version.ManifestProviderhierarchy, a GitHub-releases adapter, and CloudFormation-specific remapping ofwin32/windowsand legacy-Linux targets.The JetBrains toolkit already ships a managed installer/launcher with the desired behavior (aws/aws-toolkit-jetbrains#6418); this brings the VS Code toolkit to parity.
Solution
Installation and caching:
win32,darwin,linux,linuxglib2.28).<cache>/aws/language-servers/<name>/manifest.json; fall back to the cached manifest, then to the highest complete installed version, when the network is unavailable.algorithm:digesthashes before writing anything.Startup recovery:
LspLauncherstarts the client and, on a process-start failure, invalidates the resolved installation and retries once.Structure:
ManifestProviderhierarchy and GitHub-releases adapter withResolveManifestfunction injection; channel (alpha/beta/prod) selection lives only in the CloudFormation adapter, driven byCFN_LSP_ENVIRONMENT(automation defaults to beta, otherwise prod).CFN_LSP_BUNDLE;SettingsLspServerProvidernow only applies in debug/automation contexts.cross-fetch(Node http stack) so VS Code proxy settings apply.cfn-initpermission update when the executable is absent.Behavior changes to note:
<cache>/aws/toolkits/language-servers/...to<cache>/aws/language-servers/...(shared with the JetBrains toolkit); the first start after upgrade re-downloads the server. The legacy directory is not removed yet.CFN_LSP_ENVIRONMENT=alphato opt in.clientIdis forwarded to the server only when CloudFormation telemetry is enabled and the id is not anonymous.feature/xbranches will not be squash-merged at release time.