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

CLI won't work in bitbucket pipeline #2356

Closed
swamidass opened this issue Jun 1, 2024 · 3 comments
Closed

CLI won't work in bitbucket pipeline #2356

swamidass opened this issue Jun 1, 2024 · 3 comments

Comments

@swamidass
Copy link

Describe the bug
Supabase test, push, pull, and start doesn't work in bitbucket pipelines. The error returned:

failed to create docker container: Error response from daemon: cannot share the host's network namespace when user namespaces are enabled

I'm using supabase@1.123.4, and downgrading doesn't fix the problem.

Seems like there have been several related problems in the past that have required fixes to be made and deployed.

To Reproduce
Steps to reproduce the behavior:

  1. use supabase in a bitbucket pipeline
@swamidass swamidass changed the title CLI won't work CLI won't work in bitbucket pipeline Jun 1, 2024
@sweatybridge
Copy link
Contributor

      - step:
          name: Database Tests
          script:
            - supabase init
            - supabase db start
            - supabase test db
          services:
            - docker

You need to add docker to services on bitbucket pipeline.

Also version 1.123.4 is quite behind. Try upgrading to latest cli 1.172.2.

@swamidass
Copy link
Author

I should have mentioned it doesn't work with the current cli either. See this output log from bitbucket:

npx supabase db test --db-url $STAGING_DB 
npm WARN exec The following package was not found and will be installed: supabase@1.172.2
Connecting to remote database...
3.36: Pulling from supabase/pg_prove
dcccee43ad5d: Pulling fs layer
06d62d0de6d7: Pulling fs layer
a22cb17b3b93: Pulling fs layer
4f4fb700ef54: Pulling fs layer
4f4fb700ef54: Waiting
a22cb17b3b93: Download complete
4f4fb700ef54: Verifying Checksum
4f4fb700ef54: Download complete
dcccee43ad5d: Verifying Checksum
dcccee43ad5d: Download complete
dcccee43ad5d: Pull complete
06d62d0de6d7: Verifying Checksum
06d62d0de6d7: Download complete
06d62d0de6d7: Pull complete
a22cb17b3b93: Pull complete
4f4fb700ef54: Pull complete
Digest: sha256:eda7c5e68719e9c8287e78c017118407b48df904a51c935f5ab6098b8c0bc6bc
Status: Downloaded newer image for public.ecr.aws/supabase/pg_prove:3.36
failed to create docker container: Error response from daemon: cannot share the host's network namespace when user namespaces are enabled
Try rerunning the command with --debug to troubleshoot the error.
make: *** [Makefile:23: install] Error 1

Notice it is using a recent version of supabase. The corresponding bit bucket pipeline (excerpt):

pipelines:

  branches:
    master:
      - step:
          name: Push to Staging and Test
          deployment: staging
          services:
            - docker
          script:
            - npx supabase db test --db-url $STAGING_DB

These commands work just fine locally. So I'm at a loss on how to debug this.

@swamidass
Copy link
Author

And I also just checked that this doesn't work either:

          script:
            - npx supabase init
            - npx supabase db test --db-url $STAGING_DB

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

No branches or pull requests

2 participants