Skip to content

Conversation

@jpinkney-aws
Copy link
Contributor

Problem

If a users firewall is blocking downloading the zips or reaching the manifest its not clear to the user what to do

Solution

If the user:

  1. doesn't have the latest version cached
  2. download of the manifest failed
  3. they don't have any previous language servers downloaded

it might be a firewall issue. Rather than just Unable to find a compatible version of the Language Server we show a more descriptive message to the user

Screenshot 2025-05-07 at 2 48 39 PM
  • 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.

@jpinkney-aws jpinkney-aws requested a review from a team as a code owner May 7, 2025 19:43
@github-actions
Copy link

github-actions bot commented May 7, 2025

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.
  • 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.

id: lspConfig.id,
manifestLocation: 'remote',
languageServerSetupStage: 'getManifest',
result: 'Failed',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was broken in a different commit. Now the manifest download falls back to the local cache if an etag is found but it still reports the telemetry metric as "remote"

Technically this is a minor bug with reporting telemetry, since it should have been reported as a cache

const localManifest = await this.getLocalManifest(true).catch(() => undefined)
if (localManifest) {
localManifest.location = 'remote'
return localManifest
Copy link
Contributor

@justinmk3 justinmk3 May 7, 2025

Choose a reason for hiding this comment

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

The reason I set location=remote, is because this logic is in the fetchRemoteManifest function, and semantically, this is equivalent to when a "fetch" happens. It's just that fetch was skipped in this case, because the server version is the same.

My intuition was that location=local means a local fallback was used instead of the current remote version. I guess it could be interpreted both ways though.

Copy link
Contributor

@Hweinstock Hweinstock left a comment

Choose a reason for hiding this comment

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

nice!

throw new ToolkitError(
`Unable to download dependencies from ${this.manifestUrl}. Check your network connectivity or firewall configuration and then try again.`,
{
code: 'NetworkConnectivityError',
Copy link
Contributor

Choose a reason for hiding this comment

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

these error codes auto-populate the reason field in telemetry right? If so, this will be important to track going forward to gauge impact. My suspicion is this only affects a very low % of users.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah exactly, that's part of why I wanted to add the code here. It should give us a rough idea of how many people are effected

@jpinkney-aws jpinkney-aws merged commit 710f25c into aws:master May 8, 2025
29 of 31 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.

3 participants