Allow dots in app names (e.g. sneak.berlin) #260

Closed
opened 2026-10-02 00:47:11 +02:00 by clawbot · 1 comment
Collaborator

Owner (chat, 2026-10-01 ~22:47 UTC): "why does upaas prevent app names with dots in them?"

There is no real reason. internal/handlers/app_name_validation.go on next allows only ^[a-z0-9][a-z0-9-]*[a-z0-9]$ (2-63 characters), a DNS-label pattern. It came from the create form's HTML pattern attribute and was copied server-side under #37. Its comment says the name must be safe for Docker container names, image tags and file paths. A dot is fine in all three:

  • an image repository name such as upaas-sneak.berlin is valid, since . is a separator in Docker's reference grammar;
  • container names allow [a-zA-Z0-9][a-zA-Z0-9_.-]+;
  • builds/<name> and logs/<name>/... are safe as long as the name is not ., .., or begins or ends with a dot.

Definition of done:

  • App names may contain dots: lowercase letters, digits, hyphens and dots, 2-63 characters, starting and ending with a letter or digit, with no ... The create form's pattern and the server agree, and the error message says so.
  • Every place the name is used (image name upaas-<name>, container name, build and log directories, log filenames, notifications) is checked to work with a dotted name, and a test creates and deploys an app named like sneak.berlin through the image and container naming.
  • Pre-1.0 and only one installed instance (the owner's): nothing to migrate.
  • PR to next, independent review, squash.

model: opus-5-5

Owner (chat, 2026-10-01 ~22:47 UTC): "why does upaas prevent app names with dots in them?" There is no real reason. `internal/handlers/app_name_validation.go` on `next` allows only `^[a-z0-9][a-z0-9-]*[a-z0-9]$` (2-63 characters), a DNS-label pattern. It came from the create form's HTML `pattern` attribute and was copied server-side under https://git.eeqj.de/sneak/upaas/issues/37. Its comment says the name must be safe for Docker container names, image tags and file paths. A dot is fine in all three: - an image repository name such as `upaas-sneak.berlin` is valid, since `.` is a separator in Docker's reference grammar; - container names allow `[a-zA-Z0-9][a-zA-Z0-9_.-]+`; - `builds/<name>` and `logs/<name>/...` are safe as long as the name is not `.`, `..`, or begins or ends with a dot. Definition of done: - App names may contain dots: lowercase letters, digits, hyphens and dots, 2-63 characters, starting and ending with a letter or digit, with no `..`. The create form's `pattern` and the server agree, and the error message says so. - Every place the name is used (image name `upaas-<name>`, container name, build and log directories, log filenames, notifications) is checked to work with a dotted name, and a test creates and deploys an app named like `sneak.berlin` through the image and container naming. - Pre-1.0 and only one installed instance (the owner's): nothing to migrate. - PR to `next`, independent review, squash. model: opus-5-5
clawbot self-assigned this 2026-10-02 00:47:11 +02:00
Author
Collaborator

Implemented in #267: app names may contain dots, such as sneak.berlin, as lowercase letters and numbers joined by single dots or by hyphens, 2 to 63 characters. A dot next to a hyphen (a.-b, a-.b) is rejected as well as .., because Docker refuses such image names. The server check and the new and edit forms use the same rule.

Model: opus-5-5

Implemented in https://git.eeqj.de/sneak/upaas/pulls/267: app names may contain dots, such as `sneak.berlin`, as lowercase letters and numbers joined by single dots or by hyphens, 2 to 63 characters. A dot next to a hyphen (`a.-b`, `a-.b`) is rejected as well as `..`, because Docker refuses such image names. The server check and the new and edit forms use the same rule. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/upaas#260