-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
Pinging Sumologic extension code owners: @rnishtala-sumo @chan-tim-sumo @amdprophet
The TestUpdateMetadataRequestPayload test in extension/sumologicextension/extension_test.go calls SumologicExtension.getHTTPClient without calling SumologicExtension.Start first, which leads to confighttp.ClientConfig.ToClient being called with a nil host. This used to work as long as no authentication/middleware was configured, but it poses a problem now that components are expected to call host.GetExtensions() upfront, before calling ToClient; the most straightforward fix of the extension code leads to a segfault in the test.
I tried adding a call to Start in between, but I think the heartbeat loop started in the process causes the test to fail very verbosely. So I just manually set SumologicExtension.host to a no-op host instead. This is not a very elegant fix, so I will leave it to y'all to figure out what you want to do long term. Presumably, this would involve either:
- considering a
nilSumologicExtension.hostto be a valid state, and putting a condition around the call toGetExtensions(), or - modifying the test to start the component with a valid host, but in a way which doesn't fail the test.
Originally posted by @jade-guiton-dd in #44591 (comment)