modules icon indicating copy to clipboard operation
modules copied to clipboard

fix(code-server): USE_CACHED should still install extensions

Open michaelbrewer opened this issue 1 year ago • 1 comments
trafficstars

When USE_CACHED is true and no extensions have been installed Then we should still try to install them

close #251


Tests performed

  • bun test -t code-server

Scenario: USE_CACHED and no extensions installed

module "code-server" {
  source         = "./code_server"
  agent_id       = coder_agent.main.id
  order          = 1
  folder         = "/home/${local.username}/modules"
  install_prefix = "/home/${local.username}/.code-server"
  extensions_dir = "/home/${local.username}/.code-server/extensions"
  auto_install_extensions = true
  use_cached = true
}

Given USE_CACHED is true AND a cached copy of code-server AND we have a list of extensions to install at startup Then we expect the extensions to be installed

michaelbrewer avatar May 25 '24 15:05 michaelbrewer

@mafredri something weird is happening with git-config tests? (bun test -t git-config works locally)

michaelbrewer avatar May 25 '24 18:05 michaelbrewer

@mafredri - this PR #254 resolves the unit tests failing due to the fix in the newer coder/coder module

michaelbrewer avatar May 27 '24 18:05 michaelbrewer

@code-asher - here is the PR for fixing cases where code-server has been reinstalled, but not any of the extensions.

michaelbrewer avatar May 28 '24 18:05 michaelbrewer

@code-asher a little simpler to only support installing extension when the the EXTENSION_DIR is set

michaelbrewer avatar May 30 '24 06:05 michaelbrewer

@code-asher you are right :). Installing again when there are ones that already exist is really fast

michaelbrewer avatar May 30 '24 15:05 michaelbrewer