-
Notifications
You must be signed in to change notification settings - Fork 761
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
[dev] Unable to establish code space; postgres user / password not established #4032
Comments
Thanks for reporting.
Not sure if I get this right, but I do understand, that TeslaMate could not know your Postgres Password in dev environment. https://docs.teslamate.org/docs/development is only the TeslaMate part, not Mosquitto nor Postgres. |
But the Would be curious if others could get a GitHub code space to work? It's free for a certain number of hours. |
Will give it a try in the next weeks |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
@JakobLichterfeld have you had a chance to look at this? Would love to leverage this as I do not have a spare development environment. And this seems like a great way to spin up and down a developer instance. Thanks! |
I am not sure if I understand this issue. "mix ecto.setup" is just an an alias fro "mix ecto.create" and "mix ecto.migrate". https://github.com/teslamate-org/teslamate/blob/master/mix.exs#L77 mix create will connect to an existing postgresql server, using connection configuration (username, password, host, etc) that has been already been provided and issue a "CREATE DATABASE" command. i.e. you must already have a connection to the database server in order to run "mix ecto.create". Apologies if I misunderstood. |
Guess I am confused. And fully admitting mix and all of this is well outside my wheelhouse. Spent way longer than I would like to admit to trying to get it setup. Our documentation says a database already needs to be created:
Yet you are saying the
|
The test database is a special case, that should be created automatically if it doesn't exist. The mix create command is for the non-test database. |
I am still confused. Are you saying I need to establish a database, user and password that matches the mix commands? And if I do not need to do that because the mix commands take care of it, my issue is then that the commands do not work given the errors above. I'd be really curious if anyone can setup a Codespace and get it working (it's free minus your time). It's entirely possible that the commands work (I am sure they do) and my environment is missing something. |
Sorry not yet |
Like I said, mix ecto.setup is just a wrapper function that sends certain commands to the database for convenience. You are expected to setup the database server and have authentication work yourself. |
Or use the nix flake to set up dev environment, innit? |
Yes, that should work also. If the dev environment is active (I have this setup using direnv), then |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Is there an existing issue for this?
What happened?
Not necessarily a TeslaMate issue, but in light of #4007, I stood up a GitHub code space in my forked repo. However, when following the documentation I cannot get
mix setup
orMIX_ENV=test mix ecto.setup
to run.I would have expected the password in the
runtime.exs
to establish the database and authentication. But according to the PSQL logs (below), there is no password set.Expected Behavior
Codespace is compile and establish app.
Steps To Reproduce
Relevant log output
Screenshots
No response
Additional data
No response
Type of installation
GitHub Codespaces
Version
v1.29.X
The text was updated successfully, but these errors were encountered: