alphagov/govuk-docker

search-api fails to build

Closed this issue · 3 comments

huwd commented

Steps to reproduce

make search-api

Stack trace

I, [2020-08-06T09:39:59.460022 #1]  INFO -- sentry: ** [Raven] Raven 3.0.0 configured not to capture errors: DSN not set
rake aborted!
Gem::ConflictError: Unable to activate sidekiq-5.2.9, because redis-4.2.1 conflicts with redis (>= 3.3.5, < 4.2)
/govuk/search-api/lib/rummager.rb:27:in `<top (required)>'
/govuk/search-api/Rakefile:8:in `<top (required)>'

Caused by:
Gem::ConflictError: Unable to activate sidekiq-5.2.9, because redis-4.2.1 conflicts with redis (>= 3.3.5, < 4.2)
/govuk/search-api/lib/rummager.rb:27:in `<top (required)>'
/govuk/search-api/Rakefile:8:in `<top (required)>'

Caused by:
LoadError: cannot load such file -- sidekiq
/govuk/search-api/lib/rummager.rb:27:in `<top (required)>'
/govuk/search-api/Rakefile:8:in `<top (required)>'
(See full trace by running task with --trace)
make: *** [/home/huw/govuk/govuk-docker/projects/search-api/Makefile:4: search-api] Error 1


Also note

As search API is a dependency of finder-frontend that also cannot fully build until this is resolved.

Thoughts

This is a head scratchers for me...
The Gemfile.lock in search-api demands:

   sidekiq (5.2.9)
      connection_pool (~> 2.2, >= 2.2.2)
      rack (~> 2.0)
      rack-protection (>= 1.5.0)
      redis (>= 3.3.5, < 4.2)

Does <4.2 also exclude any minor versions other than .0?
I've tried hacking around in the Gemfile.lock to see if I can force sidekiq to take a compatable version... I also can't see anywhere in either our docker compose files or ruby gems where we're specifying a version of Redis...

Has this one cropped up elsewhere too?

Why was I running this?

¯\_(ツ)_/¯ wanted to see what would happen if I ran make all-apps, this was one of the things that happened

I think this problem might be occurring because

$(GOVUK_DOCKER) run $@-setup rake publishing_api:publish_supergroup_finders
is not using bundle exec and is therefore using system gems.

Looking at the Gemfile.lock for search-api shows redis at 4.1.4 which is a different version number to the error you're getting.

Oh yeah. In other places, we use bin/rake.

huwd commented

ah ha, ace - I'll get a PR for that today