ddev / ddev-solr

Solr service for DDEV
Apache License 2.0
5 stars 5 forks source link

Change to a specific version of Solr? #44

Open aasarava opened 1 month ago

aasarava commented 1 month ago

How do I change the solr version? It looks like it's loading solr:9.6 in solr/Dockerfile. Changing that to solr:8.3.11 and restarting ddev results in a container unavailable error. Thanks!

stasadev commented 1 month ago
ddev get --remove ddev/ddev-solr
ddev get ddev/ddev-solr --version 0.2.2

https://github.com/ddev/ddev-solr/tree/0.2.2 is the last release with Solr 8.

A comparison of what has changed since then https://github.com/ddev/ddev-solr/compare/0.2.2...main

aasarava commented 1 month ago

Perfect -- thanks for the incredibly quick response!

mkalkbrenner commented 1 month ago

Even if the response was fast, I think it is the wrong answer. You don't want a different version of the ddev plugin, but a different Solr version.

@aasarava modifiying the docker file is the correct way. But you also have to remove the already existing Solr docker volume for that downgrade.

Unfortunately, ddev doesn't support handling different versions. @rfay that's still the case, right?

stasadev commented 1 month ago

Even if the response was fast, I think it is the wrong answer. You don't want a different version of the ddev plugin, but a different Solr version.

Ok, I thought the config for Solr 9 was incompatible with Solr 8.

Unfortunately, ddev doesn't support handling different versions.

I have a draft PR for this, and I'll try to finish it before the next release of DDEV:

rfay commented 1 month ago

Sorry I lost track of this. I think @stasadev had a valid answer by saying to use an old version of the add-on. https://github.com/ddev/ddev-solr/blob/5e4da7d155eab7c5cea9044eb5022639edd2649d/docker-compose.solr.yaml#L5 was solr:8. but going back to an old version is an ugly way to do it.

Probably what needs to be done if this is a common requirement (maybe it is) is to add an ARG to the Dockerfile, and add the args to the docker-compose.solr.yaml build section, so that the solr image can be selected from inside the docker-compose.*.yaml.

mkalkbrenner commented 1 month ago

Some thoughts:

aasarava commented 1 month ago

Thanks, all. Yes, going back to an older version of the plugin is not ideal, but I appreciated the ability to quickly get Solr 8 up and running locally.

Being able to configure the Solr version would be great. The use case is simulating environments for sites hosted on Pantheon and Acquia, both of which use Solr 8.11.3 at the moment.