Code Monkey home page Code Monkey logo

vscode-vespa's Introduction

vscode-vespa - Vespa YQL request support for Visual Studio Code

The VS Code Vespa extension provides rich language support for the Vespa YQL Language.

Features


  • Run YQL requests against your vespa clusters and present the result in a webview table..

  • Simple completion support is given for request snippets and the YQL query string.

  • Optionally render a zipkin view if you enable tracing for your YQL request.

  • Vespa Explorer

    • Explore and download application files.

Keybindings

vscode-vespa has the following keybindings by default (You can change them in the keybinding editor if you need to):

Keybinding Description
ctrl+enter Run the YQL request on the currently connected Vespa Cluster
ctrl+home Open the Vespa Cluster Info panel
ctrl+end Select Vespa cluster to connect to

Requirements

Vespa cluster running with the config and query endpoints available (ports 19071, 19050 and 8080). You can use the scripts in vespa-k8s-cluster to setup a vespa cluster locally using kind.

(Optional) Zipkin Server running

Zipkin

Optionally if you wish to view traces of your Vespa queries you can start a zipkin server.

# Start Zipkin server
docker run --name zipkin -d -p 9411:9411 openzipkin/zipkin

# Stop Zipkin server
docker rm -f zipkin

Extension Settings

The vscode-vespa extension is configured via a config file in $HOME/.config/vscode-vespa/vespa-config.json. If the config file is not present then vscode-vespa will create a default config:

{
	"defaultCluster": "localhost",
	"clusters": [
		{
			"name": "localhost",
			"queryEndpoint": "http://localhost:8080/search",
			"configEndpoint": "http://localhost:19071",
			"zipkinEndpoint": "http://localhost:9411",
		}
	],
	"httpTimeout": "2s",
}

You can edit the config file directly in vscode by selecting the "Edit Vespa Cluster Configuration" command in the YQL editor menu.

Known Issues

YQL (.yql) Syntax

This is work in progress.

We have started working on a yql request syntax file and added support for coloring of the yql parameter via the yql syntax. These are based on the vscode JSON syntax and vscode SQL syntax

Schema (.sd) Syntax

This is work in progress.

We have started working on this in a new Vespa Schema syntax.

Zipkin traces

The zipkin traces are work-in-progress as the Vespa trace format is quite hard to parse. We have use the TransformVespaTrace.jsx from Vespa as the "source of truth" on how to parse the Vespa traces.

Language Server

In the source code there is a beginings of a language server in the server/ dir. This is not enabled as the features it gives, at the moment, are limited.

Release Notes

Please read the CHANGELOG

vscode-vespa's People

Contributors

pehrs avatar

Stargazers

Leandro Alves avatar Andreas Eriksen avatar Yngve Aasheim avatar Daniel Ranchal-Parrado avatar

Watchers

Andreas Eriksen avatar  avatar

Forkers

jarib

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.