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

DB Connection string not available #113

Closed
fabioespinosa opened this issue Jan 11, 2022 · 36 comments
Closed

DB Connection string not available #113

fabioespinosa opened this issue Jan 11, 2022 · 36 comments
Assignees
Labels
enhancement New feature or request

Comments

@fabioespinosa
Copy link

fabioespinosa commented Jan 11, 2022

Hi, I need the connection string to be able to connect to the postgres db in Nhost v2.


Update: NHost team now provides postgres DB Connection string 🚀

@fabioespinosa fabioespinosa changed the title Connection string not available in v2 DB Connection string not available in v2 Jan 11, 2022
@elitan
Copy link
Contributor

elitan commented Jan 11, 2022

Yes, it's on our near-term roadmap. 👌

@elitan elitan changed the title DB Connection string not available in v2 DB Connection string not available Jan 11, 2022
@fabioespinosa
Copy link
Author

Amazing, I already knew you guys were working on this 👍 I just made this issue so that I could be updated when you guys make it available.

Is there perhaps a public roadmap where I could check instead of making these issues?

@elitan
Copy link
Contributor

elitan commented Jan 11, 2022

Thanks. We don't have a public road map available but we'll try to be more transparent and explicit about new releases in the future.

@dohomi
Copy link
Contributor

dohomi commented Feb 1, 2022

This would help a lot, especially for users who want to migrate from HasuraCloud/Open Source to Nhost. Looking forward for that feature as well.

@elitan
Copy link
Contributor

elitan commented Feb 1, 2022

It's one of our top 5 most prioritized features so it will be available soon. 👍

@yureckey
Copy link

yureckey commented Feb 1, 2022

what are the other 4 top features?
Honestly, v2 looks so... "alfa" right this moment, I was expecting a more robust platform for beta release
(no connection string, errors with hasura auth and camelCase, no email templates, can't control Hasura version, no online viewer/editor for cloud functions, no online viewer/editor for files, "503 Service Temporarily Unavailable" from time to time, small quirks with nhostjs)

@fabioespinosa
Copy link
Author

fabioespinosa commented Feb 1, 2022

Hey @yureckey let's be patient, I bet it's not easy to migrate such a service

@elitan
Copy link
Contributor

elitan commented Feb 1, 2022

@yureckey Totally. Running a startup is like playing StarCraft 2 against three people at the same time and there are 5 marine drops in your bases with zerglings everywhere and you just realized you forgot to start armor upgrades 2 minutes ago.

Also, your kitchen just caught on fire.

But we'll get there 💪

@ztat
Copy link

ztat commented Feb 8, 2022

Is there an ETA for addressing this issue? This functionality existed in v1.

@elitan
Copy link
Contributor

elitan commented Feb 9, 2022

We plan to have it available in the next 2-4 weeks. It's being actively worked on as we speak.

@plmercereau plmercereau added the enhancement New feature or request label Feb 15, 2022
@gregoryforel
Copy link

Hi @elitan
Will this connection string be available for everyone or just paid plans?

@elitan
Copy link
Contributor

elitan commented Feb 17, 2022

Everyone 🙌

@gregoryforel
Copy link

gregoryforel commented Feb 17, 2022 via email

@dominik-bsr
Copy link

Same here!

@mapsgeek
Copy link

How come can i migrate my existing data to the production DB provided by nhost without connecting to the DB directly?!!

@elitan
Copy link
Contributor

elitan commented Feb 24, 2022

How come can i migrate my existing data to the production DB provided by nhost without connecting to the DB directly?!!

You can not but as soon as we have the DB connection string available you will be able to 👍

@dominik-bsr
Copy link

You can run sql on this API endpoint:
https://hasura.io/docs/latest/graphql/core/api-reference/schema-api/run-sql.html

@plmercereau
Copy link
Contributor

Yes Dominik, you're absolutely right.
It is also possible to run a pg_dump with this endpoint: https://[project-id].nhost.run/v1alpha1/pg_dump
The endpoint is explained in the official Hasura documentation.
As @elitan explained, we are working hard on allowing a direct Postgres connection when required. Thanks for your patience

@dominik-bsr
Copy link

Hi! Is there an updated ETA on this?

@elitan
Copy link
Contributor

elitan commented Mar 11, 2022

We're still working on this and we're making progress. ETA right now is 1-2 weeks.

@ztat
Copy link

ztat commented Mar 25, 2022

Any timeline update?

@quentin-decre
Copy link
Contributor

Also needed here 👍

@nunopato
Copy link
Contributor

nunopato commented Apr 7, 2022

update from our side: we have worked on making the connection string available but last week, before releasing it, we found a security issue that is having us re-evaluate our approach. Unfortunately, we are not able to guarantee access anytime soon. There is still one thing we want to try to see if it can be fixed with the current solution but if not, we will not be releasing this anytime soon. I am really sorry for any inconvenience this might bring but this specific issue was really hard to predict. On a better note, backups will be out very very soon.

@yureckey
Copy link

yureckey commented Apr 7, 2022

Yes Dominik, you're absolutely right. It is also possible to run a pg_dump with this endpoint: https://[project-id].nhost.run/v1alpha1/pg_dump The endpoint is explained in the official Hasura documentation. As @elitan explained, we are working hard on allowing a direct Postgres connection when required. Thanks for your patience

@plmercereau I've tried run this call with Postman, but I only got this error response
{
"path": "$",
"error": "resource does not exist",
"code": "not-found"
}

@plmercereau
Copy link
Contributor

Hello Yuriy,

The above mentioned endpoint works.

You may need to check:

  • you are sending a http POST request
  • you are adding the following headers:
{
  "x-hasura-admin-secret": "the hasura admin secret of your app"
} 
  • you are sending a payload as per the documentation, for instance
{
  "opts": ["-O", "-x", "--schema-only", "--schema", "public"],
  "clean_output": true,
  "source": "default"
}

@nhost nhost deleted a comment from yureckey Apr 7, 2022
@mortenhillbom
Copy link

update from our side: we have worked on making the connection string available but last week, before releasing it, we found a security issue that is having us re-evaluate our approach. Unfortunately, we are not able to guarantee access anytime soon. There is still one thing we want to try to see if it can be fixed with the current solution but if not, we will not be releasing this anytime soon. I am really sorry for any inconvenience this might bring but this specific issue was really hard to predict. On a better note, backups will be out very very soon.

Any update on the "one thing" that you wanted to try? 😄 Did it work?

@nunopato
Copy link
Contributor

@mortenhillbom It didn't. Because of that, and a couple of other reasons, we are changing the way we host databases. We currently host on RDS instances (multi-tenant architecture) and are now testing moving to dedicated Postgres instances for all apps. This will make it possible to connect directly to Postgres and install any extensions needed. We are still evaluating and working on a POC so I can't give a timeline atm. I will update the issue when we have a more definite timeline.

@mortenhillbom
Copy link

@nunopato Ok, thank you for the update!
On that note however, how long will v1 be supported? And will it be supported until this is in place (+ a grace period for transition) or is there chance it will not?

@elitan
Copy link
Contributor

elitan commented May 12, 2022

We don't have a timeline yet for closing v1 but we will not close v1 until we have a more stable v2 (with db connection string) etc.

@ampsarfraz
Copy link

Hello , any update on this?

@elitan
Copy link
Contributor

elitan commented Jul 8, 2022

Hello , any update on this?

Very soon. It's top priority internally.

@nunopato
Copy link
Contributor

hey there! I am really excited about this 🎊 we are mostly done with the work necessary to provide direct access to your project's databases. For this to work, we had to fundamentally change how we operate Postgres. We moved away from shared RDS instances to isolated Postgres instances running alongside (and closer to) your services. Other reasons to move to dedicated Postgres instances are stability, performance, and isolation - you own the entire instance (Postgres root-level access)

If any of you is starting or about to start a fresh project and want to build it on the new offering, feel free to send me a DM on discord and I will hook that up in a new project. Existing projects will have to wait a bit for us to finish implementing moving data around between RDS and K8s

@nnennajohn
Copy link

Hi @nunopato,

Any update on this? One specific use case for this would be for custom resolvers with an orm that has direct access to the database.

https://hasura.io/learn/graphql/hasura/custom-business-logic/2-remote-schemas/

@fabioespinosa
Copy link
Author

I think we can happily close this? @elitan @nunopato

@elitan
Copy link
Contributor

elitan commented Sep 7, 2022

Yes! 🙌

@Wip-Sama
Copy link

So... I'm trying to connect to postgres from DBeaver and Beekeper studios and none of these ara able to connect directly to the database.

Both says that the authentication failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests