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 failure with ruby 3.0 #112

Open
LocutusOfBorg opened this issue Jan 10, 2022 · 5 comments
Open

test failure with ruby 3.0 #112

LocutusOfBorg opened this issue Jan 10, 2022 · 5 comments

Comments

@LocutusOfBorg
Copy link

Hello, I'm having two test failures in Ubuntu jammy with default ruby 3.0, and I couldn't find any newer commit on your develop branch...
https://launchpad.net/ubuntu/+source/ruby-riddle/2.4.2-1ubuntu1/+build/23033419
https://launchpadlibrarian.net/579194581/buildlog_ubuntu-jammy-amd64.ruby-riddle_2.4.2-1ubuntu1_BUILDING.txt.gz

I'm trying to understand if this is due to some sphinx issues or something in the packaging, but I don't have much knowledge on the topic.

@pat
Copy link
Owner

pat commented Jan 10, 2022

I'm not sure what the cause of those errors is, but a couple of things to note:

  • Setting the environment variables SPHINX_ENGINE to "sphinx" and SPHINX_VERSION to "2.2.11" may help.
  • Sphinx 2.2.11 relies on MySQL 5.7 - it does not work with MySQL v8. This doesn't seem related to the failures you're getting, mind you, I just noticed v8 was being installed.

@LocutusOfBorg
Copy link
Author

thanks this fixes one failure, but leaves the other there

  1) Riddle::Client query contents should build a basic search message correctly
     Failure/Error: client.queue.first.should == query_contents(:simple)

       expected: ""
            got: "\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01*" (using ==)
     # ./spec/unit/client_spec.rb:47:in `block (3 levels) in <top (required)>'

@pat
Copy link
Owner

pat commented Jan 25, 2022

Managed to reproduce this locally (helps that I have a new machine! 😅) - the issue is that the test suite (perhaps unwisely) requires PHP (as it compares Riddle's client communication against the official PHP client). But there's something in the official PHP client that is invalid with PHP 8. It is, however, valid against PHP 7.4.

I'm going to ponder a better way to manage this (it'd be nice to not have an old PHP version required for testing a Ruby library!) - but in the meantime, perhaps you're able to work with this requirement?

@LocutusOfBorg
Copy link
Author

we only have PHP 8 in Ubuntu Jammy, I don't get what you ask me... If the problem is only about a test failure, I just commented out that specific test and uploaded in Ubuntu

@pat
Copy link
Owner

pat commented Feb 6, 2022

Good to know you have a way around it. You can also set CI=true to run the specs without any need for PHP.

And I've updated the repo (but no gem release just yet) to no longer require PHP at all.

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

No branches or pull requests

2 participants