Skip to content

mux: derive default install_prefix and log_path from slug #1097

Description

@ibetitsmike

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions