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

Restore MySQL connection to the registry #863

Merged
merged 1 commit into from
Jan 18, 2025
Merged

Conversation

theory
Copy link
Collaborator

@theory theory commented Jan 18, 2025

A bug introduced in d17dff9 and shipped in v1.5.0 caused the MySQL engine to connect to the target database instead of the registry database. Restore connecting to the registry database. Resolves #862.

A bug introduced in d17dff9 and shipped in v1.5.0 caused the MySQL
engine to connect to the target database instead of the registry
database. Restore connecting to the registry database. Resolves #862.
@theory theory added the engine label Jan 18, 2025
@theory theory requested a review from autarch January 18, 2025 21:53
@theory theory self-assigned this Jan 18, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 12847720500

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 99.934%

Totals Coverage Status
Change from base Build 12663777984: 0.0%
Covered Lines: 4574
Relevant Lines: 4577

💛 - Coveralls

@tiberiusferreira
Copy link

tiberiusferreira commented Jan 18, 2025

Hello, is there an easy way to test this with brew?
I'm trying to compile from source and installed Dist::Zilla:

cpanm Dist::Zilla
Dist::Zilla is up to date. (6.032)

But it didn't seem to install dzil in the correct path:

tiberiodarferreira@Tiberios-MacBook-Pro sqitch % dzil
zsh: command not found: dzil

Update:
Found the issue: perl executables are being installed in /opt/homebrew/Cellar/perl/5.40.0/bin/ which was not in path.

@theory
Copy link
Collaborator Author

theory commented Jan 18, 2025

Oh, yikes, don't do that! Easiest would probably be to just edit the file. The file should live here:

ls -l "$(brew --prefix)"/Cellar/sqitch/1.5.0/lib/perl5/App/Sqitch/Engine/mysql.pm 

-r--r--r--  1 david  admin  19113 Jan  8 07:50 /opt/homebrew/Cellar/sqitch/1.5.0/lib/perl5/App/Sqitch/Engine/mysql.pm

If so, then you can edit it with these commands:

chmod +w "$(brew --prefix)"/Cellar/sqitch/1.5.0/lib/perl5/App/Sqitch/Engine/mysql.pm
perl -i -pe 's/shift->uri/shift->registry_uri/' "$(brew --prefix)"/Cellar/sqitch/1.5.0/lib/perl5/App/Sqitch/Engine/mysql.pm

Then check to make sure the line was updated properly. Should be good go go then.

@tiberiusferreira
Copy link

tiberiusferreira commented Jan 18, 2025

Oh, I totally missed the idea of just editing the installed file directly!
It worked, tested it and the fix works!

Thank you very much.

@theory
Copy link
Collaborator Author

theory commented Jan 18, 2025

Thank you!

@theory theory merged commit d230666 into develop Jan 18, 2025
196 checks passed
@theory theory deleted the mysql-registry-uri branch January 18, 2025 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MariaDB: Sqitch doesn't respect registry config anymore
3 participants