-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
test db --db-url fails in Bitbucket Pipelines #2358
Comments
Can you describe your use case for running db tests against staging database? Typically we recommend running it against a local db to test for schema changes before pushing to remote. The reason |
I see. The issue is with --db_url. Supabase doesn't support this in bitbucket. The use case I have is ensuring the actual deployment is passing tests. I want to deploy to staging, then test staging db. And I want to deploy to production, then test production db. We could also add local testing, but that requires seeding the database with data that may or may not match the live DBs. So testing the staging and production dbs really is a critical step. We can already do all these steps in our local environment. I'm just trying to automate this. |
Is there a way to get this to work? Or is not possible to add to supabase? |
Also, I should add that pushing to --db_url doesn't work either. |
That's surprising because db push doesn't launch containers. Can you share the full logs?
It's possible but likely not trivial. Some rough steps are
It's worth mentioning that host networking is supported in other providers like GitHub actions or GitLab. It's only bitbucket that's using an opinionated docker config. If you don't want to wait for us to add support, another alternative is use a different provider or self-hosted runner. |
What about adding an option to the cli to launch in user mode? |
Perhaps we can allow users to bring their own docker network with a global |
That might work, but I'm not sure what the network ID is in bitbucket. Or maybe I can just pick anything? And to circle back, I was incorrect on one point. I tested again to be sure, and supabase db push works. |
I've added support for this in beta cli release. You can give it try
|
Thank you! I'll give it a shot and let you know. |
@sweatybridge good news to report. Works great. Thanks for making a quick fix like this. Do you have any idea when it will hit a regular release? And how safe is it to have supabase@beta used in a production pipeline? Is the beta controlled well enough with tests/etc that it shouldn't be a problem? |
Describe the bug
Reopening #2356 (which was never resolved),
To Reproduce
Use a bitbucket pipeline to run supabase against a remote db with --db-url.
Expected behavior
CLI works.
More Information
I should have mentioned it doesn't work with the current cli either (supabase@1.172.2). See this output log from bitbucket:
Notice it is using a recent version of supabase. The corresponding bit bucket pipeline (excerpt):
These commands work just fine locally. So I'm at a loss on how to debug this.
The text was updated successfully, but these errors were encountered: