redhat-developer / redhat-developer/vscode-yaml

cache or retry of schemastore

Open
#670 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
829
Forks
260
Avg merge
5h 43m
Merged PRs (30d)
1

Description

Is your enhancement related to a problem? Please describe.

I use a schemastore URL that is only available when I'm on a VPN. When I disconnect from the VPN, VSCode workspaces that I have open will continue to work for schemas that have been validated before (I assume these are cached locally), and understandably I get an error that VSCode cannot download schemas for file types that I hadn't previously validated. However, if I open a new workspace without quitting VSCode, no file schema validation happens, presumably because the schemastore URL can no longer be accessed.

Moreover, if I reconnect to the VPN again while leaving VSCode open, it seems that the schemastore file is not retrieved again even if I open new workspaces. If I quit VSCode and then open again while on the VPN, schema validation works as expected. It also works to toggle off and on the schemastore via settings (ie yaml.schemaStore.enable).

Describe the solution you would like

Store a cached copy of the schemastore document and use it in "offline" scenarios or at least recover more gracefully after connectivity is lost and restored. I think caching is a similar request to issue #386 except for the schemastore document rather than the schemas themselves.

Describe alternatives you have considered

Being able to refresh the schemastore via the command palette and/or a hotkey would be a step in the right direction, but not having to do that would be nicer.

Additional context

I'm working on a mac with vscode 1.63.2 and yaml extension version 1.2.2.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or code entry points. Start by locating the schemastore fetch and lifecycle handling in the TypeScript extension, then reproduce VPN loss and reconnection while opening workspaces. Done means the schemastore can be reused offline and refreshed after connectivity returns without restarting VS Code or toggling the setting.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.