dolthub / doltgresql

DoltgreSQL - Version Controlled PostgreSQL
Apache License 2.0
1.11k stars 24 forks source link

doltgres 0.14.0 regression test failure #937

Closed chenrui333 closed 2 days ago

chenrui333 commented 5 days ago

👋 trying to build the latest release, but run into some regression test failure. The error log is as below:

error build log ``` /opt/homebrew/Library/Homebrew/test.rb (Formulary::FromPathLoader): loading /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/d/doltgres.rb WARN[0000] unix socket set up failed: file already in use: /tmp/.s.PGSQL.5432 INFO[0000] Server ready. Accepting connections. WARN[0000] secure_file_priv is set to "", which is insecure. WARN[0000] Any user with GRANT FILE privileges will be able to read any file which the sql-server process can read. WARN[0000] Please consider restarting the server with secure_file_priv set to a safe (or non-existent) directory. INFO[0000] NewConnection DisableClientMultiStatements=true connectionID=1 INFO[0000] ConnectionClosed connectionID=1 INFO[0000] NewConnection DisableClientMultiStatements=true connectionID=2 failed to connect to `user=doltgres database=`: [::1]:55661 (localhost): dial error: dial tcp [::1]:55661: connect: connection refused 127.0.0.1:55661 (localhost): tls error: server refused TLS connection [::1]:55661 (localhost): dial error: dial tcp [::1]:55661: connect: connection refused 127.0.0.1:55661 (localhost): failed SASL auth: FATAL: password authentication failed for user "doltgres" (SQLSTATE 28P01) /opt/homebrew/Library/Homebrew/test.rb (Formulary::FromNameLoader): loading libpq ==> /opt/homebrew/opt/libpq/bin/psql -h 127.0.0.1 -p 55661 -U doltgres -c 'SELECT DATABASE()' 2>&1 psql: error: connection to server at "127.0.0.1", port 55661 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? /opt/homebrew/Library/Homebrew/ignorable.rb:27:in `block in raise' Minitest::Assertion: Expected: 0 Actual: 2 ```

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/11752968749/job/32753801637 relates to Homebrew/homebrew-core#197144

fulghum commented 3 days ago

Hi @chenrui333, thanks for pinging us about this. I believe this failure has to do with recent changes for improved user/grant/authorization support.

I was able to repro a failure with a build of doltgres from the tip of main. There seems to be a password configured in the Homebrew smoke test configuration that starts the doltgres server: https://github.com/Homebrew/homebrew-core/blob/master/Formula/d/doltgres.rb#L44

I suspect that psql is failing to connect, since it doesn't provide the password, and we seem to have changed enforcement there, although I'm still having problems getting a successful login even after removing the password field. I'll poke around a bit more. @Hydrocharged may have other insights/suggestions here, too.

Hydrocharged commented 3 days ago

The default password for the doltgres user is the empty string. We were a bit inconsistent with passwords before we landed the new user change, and it was fine since we completely ignored them. Now that passwords are required, we've had to update the passwords to make them a bit more consistent for the default experience.

With that being said, we're also going to be removing the doltgres user and sticking with the standard postgres user, which does have a default password of password. So for now, I'd suggest to switch to the postgres user. @fulghum do you know how to change our Homebrew config?

fulghum commented 2 days ago

Thanks for the heads up about this issue @chenrui333. I've opened https://github.com/Homebrew/homebrew-core/pull/197487 with a fix for the test.

chenrui333 commented 2 days ago

Looks good, I will merge the 0.14.0 update into it. Appreciate the help!

fulghum commented 2 days ago

no problem. We've got another change going out in the next release that will likely require another small change to that test – changing the default database name to match postgres' behavior. We'll be happy to send another fix out for that one, too.

chenrui333 commented 2 days ago

yeah, that sounds great. thanks!