[go: up one dir, main page]

Add JSON support to Remote Dev Settings module

MR: Add JSON support to Remote Dev Settings module (!148287 - merged)

Description

  • Add parsing for ENV vars containing JSON Objects or Arrays
  • Add validation for VS Code Extensions Gallery settings JSON
  • NOTE: May need more work for ApplicationSettings containing Hashes or Arrays but no examples exist yet that require this support

NOTE: See https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/lib/remote_development/README.md#remote-development-settings for context on how the Remote Development Settings module works.

Acceptance Criteria

  • Validates proper structure of VS Code Extension Gallery settings JSON when specified via an ENV var. E.g.:
    • GITLAB_REMOTE_DEVELOPMENT_VSCODE_EXTENSIONS_GALLERY: "{\"service_url\":\"https://open-vsx.org/vscode/gallery\",\"item_url\":\"https://open-vsx.org/vscode/item\",\"resource_url_template\":\"https://open-vsx.org/api/{publisher}/{name}/{version}/file/{path}\"}"
    • RemoteDevelopment::Settings.get_single_setting(:vscode_extensions_gallery) should properly retrieve it.
    • Misnamed/missing keys should raise an exception
    • non-string values should raise an exception

Technical Requirements

Edited by Chad Woolley