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: mount correct socket on unix #3139

Merged
merged 5 commits into from
Feb 13, 2025
Merged

Conversation

Fractal-Tess
Copy link
Contributor

What kind of change does this PR introduce?

This should be mounting the correct docker socket on UNIX by using utils.Docker.DaemonHost() instead of client.DefaultDockerHost.

Fixes a bug where on rootless docker, it mounts the incorrect path of /var/run/docker.sock instead of the correct one /run/user/1000/docker.sock or whatever DOCKER_HOST

What is the current behaviour?

It tries to mount /var/run/docker.sock

Please link any relevant issues here.
#3127

What is the new behaviour?

Should mount the correct path.

Additional context

It would be awesome if someone else also tests this functionality as this could introduce bugs on other systems.

PS - this pr was largely thanks to the help of @PhatDave with testing and debugging.

@Fractal-Tess Fractal-Tess requested a review from a team as a code owner February 13, 2025 00:41
@sweatybridge
Copy link
Contributor

Could you double check if the logs explorer works fine in studio with rootless socket?

I vaguely remember analytics couldn't access the socket to read logs even though the container starts fine.

@coveralls
Copy link

coveralls commented Feb 13, 2025

Pull Request Test Coverage Report for Build 13300919621

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 1 of 3 (33.33%) changed or added relevant lines in 1 file are covered.
  • 71 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.004%) to 58.566%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/start/start.go 1 3 33.33%
Files with Coverage Reduction New Missed Lines %
internal/storage/rm/rm.go 2 89.53%
internal/gen/keys/keys.go 5 12.9%
internal/start/start.go 64 65.44%
Totals Coverage Status
Change from base Build 13280059914: 0.004%
Covered Lines: 7811
Relevant Lines: 13337

💛 - Coveralls

@sweatybridge sweatybridge changed the title mount correct socket on unix fix: mount correct socket on unix Feb 13, 2025
@Fractal-Tess
Copy link
Contributor Author

Fractal-Tess commented Feb 13, 2025

I can confirm that there are proper logs showing in the dashboard page for all of the services except for cron and edge functions.
These two show

{
  "code": 502,
  "errors": [],
  "message": "Something went wrong! Unknown error. If this continues please contact support.",
  "status": "UNKNOWN"
}

@sweatybridge sweatybridge enabled auto-merge (squash) February 13, 2025 10:27
@Fractal-Tess
Copy link
Contributor Author

Amazing, thank you very much. When do you reckon this change will be shipped to npm?

@sweatybridge
Copy link
Contributor

Once PR is merged, it will be available in beta release channel.

npx supabase@beta start

Stable channel will be updated in 2 weeks.

@sweatybridge sweatybridge merged commit 23e4b96 into supabase:develop Feb 13, 2025
8 of 9 checks passed
@github-actions github-actions bot mentioned this pull request Feb 18, 2025
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.

3 participants