sqitchers / homebrew-sqitch

Homebrew Formulas for Sqitch
22 stars 10 forks source link

After brew install sqitch --with-postgres-support, error deploying #46

Closed huytran1ibm closed 10 months ago

huytran1ibm commented 4 years ago

Hello, i've tried several times to uninstall and reinstall but I keep getting the same issues.

I've tried with both pg9 and pg12, i've deployed a pg db through docker, hence my uri uses localhost

On my first deploy execution i am getting this error:

Adding registry tables to huy_local
Multiple values at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/Config/GitLike.pm line 650.

after executing again I get this error:

HuysMacBookIBM:homedepot-database huytran$ sqitch deploy
Use of uninitialized value in numeric ne (!=) at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/App/Sqitch/Engine.pm line 1020.
Use of uninitialized value $oldver in numeric lt (<) at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/App/Sqitch/Engine.pm line 1055.
Use of uninitialized value $oldver in numeric gt (>) at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/App/Sqitch/Engine.pm line 1064.
Use of uninitialized value $oldver in numeric gt (>) at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/App/Sqitch/Engine.pm line 1064.
Use of uninitialized value $oldver in numeric gt (>) at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/App/Sqitch/Engine.pm line 1064.
Use of uninitialized value $oldver in numeric gt (>) at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/App/Sqitch/Engine.pm line 1064.
Use of uninitialized value $oldver in numeric gt (>) at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/App/Sqitch/Engine.pm line 1064.
Use of uninitialized value $oldver in numeric gt (>) at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/App/Sqitch/Engine.pm line 1064.
Use of uninitialized value $oldver in numeric gt (>) at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/App/Sqitch/Engine.pm line 1064.
Use of uninitialized value $oldver in numeric gt (>) at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/App/Sqitch/Engine.pm line 1064.
Use of uninitialized value $oldver in numeric gt (>) at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/App/Sqitch/Engine.pm line 1064.
Use of uninitialized value $oldver in numeric gt (>) at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/App/Sqitch/Engine.pm line 1064.
Use of uninitialized value $oldver in numeric gt (>) at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/App/Sqitch/Engine.pm line 1064.
Use of uninitialized value $oldver in numeric gt (>) at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/App/Sqitch/Engine.pm line 1064.
Use of uninitialized value $oldver in numeric gt (>) at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/App/Sqitch/Engine.pm line 1064.
Use of uninitialized value $oldver in numeric gt (>) at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/App/Sqitch/Engine.pm line 1064.
Use of uninitialized value $oldver in numeric gt (>) at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/App/Sqitch/Engine.pm line 1064.
Use of uninitialized value $oldver in numeric gt (>) at /usr/local/Cellar/sqitch/v1.0.0/bin/../lib/perl5/App/Sqitch/Engine.pm line 1064.

This is my sqitch.conf

[core]
    engine = pg
    # plan_file = sqitch.plan
    # top_dir = .
[target "huy_local"]
    uri = db:pg://postgres:password@127.0.0.1:5432/huy_local
[engine "pg"]
    target = huy_local
[deploy]
    verify = true
[rebase]
    verify = true
theory commented 4 years ago

What version of Sqitch do you have installed? An issue the looks like this one was fixed in v0.9997 (in sqitchers/sqitch@2a4cb40e1).

huytran1ibm commented 4 years ago

What version of Sqitch do you have installed? An issue the looks like this one was fixed in v0.9997 (in sqitchers/sqitch@2a4cb40).

thanks theory, i've check that issue without success.

sqitch version is v1.0.0 installed using brew install sqitch --with-postgres-support

perl version: This is perl 5, version 30, subversion 1 (v5.30.1) built for darwin-thread-multi-2level

theory commented 4 years ago

What version of Postgres are you running?

harryparkdotio commented 4 years ago

also receiving this error on macOS catalina installed with homebrew, postgres version 9.4

theory commented 4 years ago

Oh, Catalina testing will be easiest for me. Can you tell me:

Thanks!

harryparkdotio commented 4 years ago

I usually run postgres in a docker container, but I installed postgres on my local machine with brew, turns out I'm actually running 12.2 locally.

perl v5.18.4 (didn't directly install perl, I think this is what shipped with my machine)

I receive

Can't locate DBD/Pg.pm in @INC (you may need to install the DBD::Pg module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.4 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .).
BEGIN failed--compilation aborted.

when I run perl -MDBD::Pg -E 'say DBD::Pg->VERSION'

theory commented 4 years ago

Ah, Homebrew Sqitch installs DBD::Pg in its own directory. Try

/usr/local/bin/perl -I/usr/local/Cellar/sqitch/v1.0.0/lib/perl5/darwin-thread-multi-2level -MDBD::Pg -E 'say DBD::Pg->VERSION' 
harryparkdotio commented 4 years ago

3.10.5

theory commented 4 years ago

Okay. Are you running it against a database to which you previously deployed changes with an older version of Sqitch?

harryparkdotio commented 4 years ago

I'm not, just running it against a db deployed with v1.0.0


issue seems to have resolved itself, not sure how, but I'm able to successfully deploy + revert changes now

theory commented 4 years ago

So strange. This looks like an issue from a couple years ago where Sqitch would truncate numbers due to my (very poor in retrospect) decision to use floats for the registry version (see sqitchers/sqitch@2a4cb40e1; sqitchers/sqitch#343). I can't imagine why it would be happening again now, and sorry I can't replicate it. :-(

Kinrany commented 1 year ago

Not a solution for the Homebrew package, but Nix package sqitch-mysql works great.