Skip to content

[BUG] Failed deployment with uppercase stack names leaves behind orphaned cloned repositories #1284

Description

@xd003

Description

When creating a stack from a Git repository, using a stack name that contains uppercase letters results in an inconsistent deployment flow.

Steps to reproduce

  1. Create a new stack from a Git repository.
  2. Enter a stack name containing uppercase letters (e.g. Zerobyte).
  3. Deploy the stack.

The deployment proceeds as follows:

Connects to the repository.
Clones the repository.
Fetches the branch.
Reads the compose file.
Only then fails with:
Error: Stack name must be lowercase, start with a letter or number, and contain only letters, numbers, hyphens, and underscores

At this point, the repository has already been cloned into:

DATA_DIR/{environment}/Zerobyte

If I then rename the stack to zerobyte and deploy again, the deployment succeeds, but Dockhand clones the repository again into:

DATA_DIR/{environment}/zerobyte

This leaves the original Zerobyte directory behind as an orphaned/unused clone.

Dockhand version

1.0.37

Hawser version (if used)

No response

Connection mode

socket

Please confirm the following

  • I have already searched for relevant existing issues and discussions before opening this report.
  • I have updated the title field above with a concise description.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingready to gofixed, goes to the next release

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions