Ensure libcurl is initialized for macOS before fork
What does this MR do and why?
The elasticsearch-transport gem can make use of typheous, which
uses the ethon gem to make HTTP calls via libcurl.
In !122412 (merged), we
fixed Spring not working on macOS for Elasticsearch by disabling the
use of typheous gem in favor of the pure Ruby Net::HTTP
implementation.
However, since doesn't test the same HTTP client used in production,
it's not an ideal solution. This commit reverts b0a9fcac so that
we test with typheous.
https://github.com/curl/curl/pull/11254 fixed the upstream issue by
moving the macOS native call of SCDynamicStoreCopyProxies to
the global init function. This has been released in libcurl v8.2.0,
which Homebrew has been shipping since July 2023.
Now that libcurl should be updated on macOS platforms, we can
initialize libcurl via Ethon::Curl.init so that Spring continues to
work.
How to set up and validate locally
Run:
bundle exec spring rspec ee/spec/services/search/index_repair_service_spec.rb