Open
Description
Currently dev containers (and sub agents) are being named according to the following rules:
- Does there exist a
resource "coder_devcontainer" "proj1"
terraform resource? Use the resource name, "proj1" - Use a safe-name based on Docker container
magical_easley
=>magical-easley
The problem with this approach is that the name will keep changing if we hit 2 (i.e. dynamically detected devcontainers).
We also want to introduce a new, higher priority method of naming via customization
.
The proposed new method of naming would follow this hierarchy:
- Does there exist
.customizations.coder.name
indevcontainer.json
? If yes, use it if it's valid. - Does there exist a terraform resource? If yes, use it.
- Fall-back to using the folder name,
/path/to/proj2
=>proj2
, replacing any incompatible characters with-
or removing them
Since 3. (or even 1.) could introduce naming conflicts (devcontainer/sub agent names must be unique), we propose a fall-back to be implemented at a later time. For /path/to/proj2
- If
proj2
is taken, tryto-proj2
- If
to-proj2
is takentry
path-to-proj2`
Ultimately this should lead to a unique name among folders as the paths must differ on some level.
Metadata
Metadata
Assignees
Labels
No labels