Skip to content

survey: decouple survey configuration with the extension #2891

@hyangah

Description

@hyangah

Currently the extension embeds configurations (survey url, period, sampling rate) for surveys in the code.
That means we need to release a new extension when we need to change the config. For example, we had to release v0.39.1 just to update the config for the upcoming Go developer survey, which was unfortunate.

We want to decouple the config from the extension code.

A simple straw man approach would be to make the extension periodically fetch the latest config from a server. But we want to avoid contacting another external server or using potentially unverified configuration to affect the extension's behavior.

We are proposing to utilize the Go's module system instead, and publish the configuration as a module (tentatively, golang.org/x/vscode-go/config).

  • Any changes to these files are reviewed following the standard go code review process.
  • Go command will verify the module's checksum like other modules.
  • Users can verify and audit all versions of configuration ever published.
  • Extension doesn't need to access another server.

The module contains three files config.json, go.mod, LICENSE. The config.json carries the latest survey configuration.
Code that interprets the data in the config.json and runs the survey remains in the extension.

cc @findleyr @fflewddur

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions