Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lsp): timeout registry config fetching after 10 seconds #17364

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

crowlKats
Copy link
Member

Fixes #16426.

Or would we rather want to timeout directly in FileFetcher.fetch?

@bartlomieju
Copy link
Member

bartlomieju commented Jan 12, 2023

Besides timeout (which I think should be lower like 10s) could you make sure that LSP is not downloading these files more often than once per day (or at least every hour)?

@crowlKats crowlKats changed the title fix(lsp): timeout registry config fetching after 20 seconds fix(lsp): timeout registry config fetching after 10 seconds Jan 13, 2023
@crowlKats
Copy link
Member Author

could you make sure that LSP is not downloading these files more often than once per day (or at least every hour)?

below the changes i added it says they are cached for a week

@bartlomieju
Copy link
Member

below the changes i added it says they are cached for a week

I see, it's confusing that LSP shows "Download ..." on each startup. Maybe we could remove it if the file is not actually downloaded?

@crowlKats
Copy link
Member Author

below the changes i added it says they are cached for a week

I see, it's confusing that LSP shows "Download ..." on each startup. Maybe we could remove it if the file is not actually downloaded?

the download message happens when starting to make a fetch, which i think is right behaviour; obviously this means it will log that even if timed out.

@bartlomieju
Copy link
Member

below the changes i added it says they are cached for a week

I see, it's confusing that LSP shows "Download ..." on each startup. Maybe we could remove it if the file is not actually downloaded?

the download message happens when starting to make a fetch, which i think is right behaviour; obviously this means it will log that even if timed out.

Okay, now I'm confused - if the message happens when starting a fetch, does that mean that LSP is actually downloading these files or not? If not, then I think this message should be deferred to when the actual request is getting fired off.

@crowlKats
Copy link
Member Author

crowlKats commented Jan 15, 2023

the log happens here

deno/cli/file_fetcher.rs

Lines 450 to 455 in fac6447

log::log!(
self.download_log_level,
"{} {}",
colors::green("Download"),
specifier
);
the fetch call is 10 lines later

Copy link
Collaborator

@aapoalas aapoalas left a comment

Choose a reason for hiding this comment

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

Looks fine to me.

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.

deno repl hangs without network access
3 participants