Skip to content

Truncate manually-created preview slugs to respect container name limit #140

Description

@fedacking

When creating a preview manually via the dashboard, the slug field has no length enforcement. If a user enters (or the backend auto-generates) a slug longer than 11 characters, it will exceed the IFNAMSIZ limit for NixOS container interface names (ve-<name> must fit in 15 chars).

The webhook path handles this correctly via prToSlug() (server-config/preview-webhook/src/preview.ts:20-28) after #135 is merged. The manual creation path (dashboard/backend/src/previews.rs:26-73) should apply the same MAX_SLUG_LEN = 11 truncation and trailing-dash cleanup before passing the slug to the CLI.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions