Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: truncate project id in config when longer than 40 chars #2448

Conversation

activenode
Copy link
Contributor

@activenode activenode commented Jun 23, 2024

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

When the projectId is derived, one must ensure that the total length of the created container is smaller than 63 chars or else we will have failures within the container network due to unmatchable hostnames

What is the new behavior?

For new repos: Truncation.
For existing ones: Warnings.

How to reproduce

Create a folder like this and try to initialize and run Supabase locally:
project_id = "Crafting-Production-Ready-Web-Apps-Using-Supabase-Test"

@activenode activenode requested a review from a team as a code owner June 23, 2024 14:11
@sweatybridge sweatybridge changed the title fix: project id truncation / docker failure because of folder name fix: truncate project id in config if longer than 40 chars Jun 26, 2024
@sweatybridge sweatybridge changed the title fix: truncate project id in config if longer than 40 chars fix: truncate project id in config when longer than 40 chars Jun 26, 2024
@sweatybridge sweatybridge force-pushed the bugfix/container-names-too-long-supabase-start branch from aac26b2 to a6f0163 Compare June 26, 2024 10:05
@sweatybridge sweatybridge merged commit 5f0f7a3 into supabase:develop Jun 26, 2024
12 checks passed
@coveralls
Copy link

coveralls commented Jun 26, 2024

Pull Request Test Coverage Report for Build 9677677994

Details

  • 11 of 14 (78.57%) changed or added relevant lines in 3 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.02%) to 60.339%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/db.go 0 1 0.0%
internal/utils/config.go 10 12 83.33%
Files with Coverage Reduction New Missed Lines %
internal/utils/config.go 1 57.65%
internal/storage/rm/rm.go 2 89.53%
Totals Coverage Status
Change from base Build 9657806970: 0.02%
Covered Lines: 6907
Relevant Lines: 11447

💛 - Coveralls

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.

None yet

3 participants