Follow-up from #1095 (review thread #1095 (comment)).
Since #1095 the module's scripts and install.log / start.log live under coder-utils' module_directory = "$HOME/.coder-modules/coder/${var.slug}", but the defaults for install_prefix and log_path are hardcoded to $HOME/.coder-modules/coder/mux. With a custom slug one instance therefore spans two roots, and two custom-slug instances on the same agent still share the Mux binary and server log even though the module directory is keyed by slug to keep them apart.
Proposed change: derive the defaults from the slug (install_prefix = "$HOME/.coder-modules/coder/${var.slug}", log_path = ".../${var.slug}/logs/mux.log"), which needs the variable defaults to become null with the value resolved in locals. The pre-1.6.0 /tmp/mux fallback should keep applying only when the resolved prefix is the default one. README and the tests that assert the default paths need the same update.
Kept out of #1095 because it changes the variable defaults' shape, which is a separate review from the install cache itself.
Xum acted on behalf of @ibetitsmike when filing this issue.
Follow-up from #1095 (review thread #1095 (comment)).
Since #1095 the module's scripts and
install.log/start.loglive under coder-utils'module_directory = "$HOME/.coder-modules/coder/${var.slug}", but the defaults forinstall_prefixandlog_pathare hardcoded to$HOME/.coder-modules/coder/mux. With a customslugone instance therefore spans two roots, and two custom-slug instances on the same agent still share the Mux binary and server log even though the module directory is keyed by slug to keep them apart.Proposed change: derive the defaults from the slug (
install_prefix = "$HOME/.coder-modules/coder/${var.slug}",log_path = ".../${var.slug}/logs/mux.log"), which needs the variable defaults to becomenullwith the value resolved inlocals. The pre-1.6.0/tmp/muxfallback should keep applying only when the resolved prefix is the default one. README and the tests that assert the default paths need the same update.Kept out of #1095 because it changes the variable defaults' shape, which is a separate review from the install cache itself.