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

Test against trilogy and drop hard dependency on mysql2 #2

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

byroot
Copy link
Contributor

@byroot byroot commented Aug 22, 2024

Trilogy is the new preferred MySQL client since Rails 7.1.

It's not drop in compatible, but somehow it is in the case of this gem.

I also fixed a test that was broken on Rails 7.2, and purged old Ruby and Rails versions that are long unsupported.

@cainlevy cainlevy merged commit a44a94c into cainlevy:main Aug 22, 2024
@cainlevy
Copy link
Owner

Thanks for the refresh!

@cainlevy
Copy link
Owner

It looks like the mysql2 tests passed on main but the trilogy tests all failed with:

ActiveRecord::ConnectionNotEstablished: trilogy_auth_recv: caching_sha2_password requires either TCP with TLS or a unix socket: TRILOGY_UNSUPPORTED

@byroot
Copy link
Contributor Author

byroot commented Aug 22, 2024

Yeah, looking at it.

@glokta1
Copy link

glokta1 commented Aug 26, 2024

@byroot Did you figure out the test failures? I'm getting the same error message while trying to run the bin/setup script for https://github.com/lobsters. Probably related to this recently-merged PR: lobsters/lobsters#1310

== Preparing database ==
W, [2024-08-27T02:58:09.108901 #53179]  WARN -- : heinous_inline_partial initialized, found: {"app/views/comments/_threads.html.erb"=>"app/views/comments/_comment.html.erb", "app/views/home/index.html.erb"=>"app/views/stories/_listdetail.html.erb", "app/views/search/index.html.erb"=>"app/views/stories/_listdetail.html.erb"}
bin/rails aborted!
ActiveRecord::ConnectionNotEstablished: trilogy_auth_recv: caching_sha2_password requires either TCP with TLS or a unix socket: TRILOGY_UNSUPPORTED (ActiveRecord::ConnectionNotEstablished)


Caused by:
Trilogy::BaseConnectionError: trilogy_auth_recv: caching_sha2_password requires either TCP with TLS or a unix socket: TRILOGY_UNSUPPORTED (Trilogy::BaseConnectionError)

Tasks: TOP => db:schema:load => db:check_protected_environments
(See full trace by running task with --trace)
bin/setup:8:in `system': Command failed with exit 1: bin/rails (RuntimeError)
        from bin/setup:8:in `system!'
        from bin/setup:32:in `block in <main>'
        from /Users/rafeyahmad/.rbenv/versions/3.3.1/lib/ruby/3.3.0/fileutils.rb:240:in `chdir'
        from /Users/rafeyahmad/.rbenv/versions/3.3.1/lib/ruby/3.3.0/fileutils.rb:240:in `cd'

@byroot
Copy link
Contributor Author

byroot commented Aug 26, 2024

Fixed in #3. It's best to discuss this in the lobsters tracker.

The issue is with how your local mysql/mariadb instance is configured (even if it's the default I know).

We can also certainly improve that on the trilogy side.

@byroot
Copy link
Contributor Author

byroot commented Aug 28, 2024

Filed an issue upstream: trilogy-libraries/trilogy#199

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

Successfully merging this pull request may close these issues.

3 participants