Skip to content

fix(makefile): lowercase path segments in COMPOSE_PROJECT_NAME - #1150

Open
vdbrown2 wants to merge 2 commits into
thunderbird:mainfrom
vdbrown2:fix/makefile-lowercase-compose-project-name
Open

fix(makefile): lowercase path segments in COMPOSE_PROJECT_NAME#1150
vdbrown2 wants to merge 2 commits into
thunderbird:mainfrom
vdbrown2:fix/makefile-lowercase-compose-project-name

Conversation

@vdbrown2

Copy link
Copy Markdown

Summary

  • make up fails with invalid project name "...": must consist only of lowercase alphanumeric characters, hyphens, and underscores... whenever the repo's parent directory contains an uppercase letter (e.g. ~/Projects/thunderbolt).
  • The auto-generated COMPOSE_PROJECT_NAME (<parent>-<repo>) already sanitized special characters via sed, but never lowercased the segments, so Docker Compose rejected the result.
  • Adds tr '[:upper:]' '[:lower:]' before sanitizing each path segment so the generated project name is always valid.

Test plan

  • Reproduced the original failure with a capitalized parent directory and confirmed make up errored with the exact message from the issue.
  • Applied the fix and confirmed the derived name (fake-parent-dir-thunderbolt-test) is fully lowercase for a mixed-case path.
  • Ran make up / make down in the real repo (parent dir ~/Projects) with no COMPOSE_PROJECT_NAME override — containers started successfully as projects-thunderbolt-*.

Docker Compose requires project names to be all lowercase. The
auto-generated <parent>-<repo> name only sanitized special characters,
so a capitalized parent directory (e.g. ~/Projects/thunderbolt)
produced an invalid project name and made `make up` fail.
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown

Preview environment deployed 🚀

Service URL
Marketing / blog / docs https://thunderbolt-pr-1150.preview.thunderbolt.io
App https://app-pr-1150.preview.thunderbolt.io
API https://api-pr-1150.preview.thunderbolt.io
Keycloak https://auth-pr-1150.preview.thunderbolt.io
PowerSync https://powersync-pr-1150.preview.thunderbolt.io

Stack: preview-pr-1150 · Commit: 13b9d4ab1e008b8b6a240d35596532a81c15b16b

Auto-destroys on PR close/merge. Login via the bundled Keycloak realm — demo@thunderbolt.io / demo by default.

@vdbrown2

Copy link
Copy Markdown
Author

Pushed a follow-up commit adding a code comment for the `sed` character class change, in case it stands out in review: it was narrowed from `[^a-zA-Z0-9._-]` to `[^a-z0-9._-]` since the new `tr` step already lowercases both segments before `sed` runs. Keeping `A-Z` in the allowed set would've been dead code, and dropping it makes `sed` assert "this is already lowercase" rather than just stripping stray characters — so a future reordering of the pipe that reintroduces uppercase would get caught instead of silently passing through.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant