-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
d2d5ba4
to
2da1e31
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks great
client.set_auth(c[:url], url.user, url.password) | ||
provide "solr_json_writer.http_client", client | ||
end | ||
provide "solr.url", c[:url] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know provide
. how does this work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know, it's a traject config thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @tpendragon brought this to my attention. This works! But want to make you aware, of:
a) Instead of instantiating your own HTTPClient, you could have provided the auth values in the (somewhat under-documented) solr_writer.basic_auth_user
and solr_writer.basic_auth_password
traject config settings. traject/traject@2404a1f
b) I plan to fix the SolrJsonWriter you are using in traject here to be able to use basic auth from the URL straight, ie https://user:pass@host/etc
. traject/traject#261 Should be in a traject release soon. Sorry it wasn't before now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jrochkind! We use this instead of the param because the version of traject in this app is older than that feature. We'll keep it in mind when we update though!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ok sorry for the unprompted unuseful advice! Upgrading should be very easy if you ever want to, there are very few backwards incompats in 3.0 that should have easy formulaic fixes, and should be no backwards incompats otherwise. But nothing wrong with what you're doing!
Using Solr 8.4 in CI requires spinning up a separate Zookeeper instance so we can upload the solr configs with basic auth, so the ConfigSet is "trusted"