opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

Create an automated test for handling errors while reloading config

Open punya opened this issue 3 years ago • 9 comments

#3615 improves reload behavior by failing with an error rather than hanging, if the config is invalid. This issue tracks creating an automated test to verify this going forward.


(Guessing there's an actual way to make this a test, maintainers will know better ;) )

Originally posted by @carlosalberto in https://github.com/open-telemetry/opentelemetry-collector/issues/3615#issuecomment-879925782

punya avatar Jul 21 '21 14:07 punya

@punya can I take on this issue if no one else if working on it? As a newcomer around OpenTelemetry, this issue may give me some experience around it :)

pravarag avatar Sep 05 '21 14:09 pravarag

@pravarag are you still interested in working on this issue? If so, will assign to you.

alolita avatar Sep 15 '21 23:09 alolita

Hi @alolita, I've started working on this issue. Will put my few queries here itself. Thanks 🙂

pravarag avatar Sep 16 '21 03:09 pravarag

Hi @punya : I want to get a clarification.. by 'automated-test' do you mean to write a unit test case to cover #3615 fix?

PaurushGarg avatar Sep 23 '21 00:09 PaurushGarg

Hi @PaurushGarg @punya @alolita I had a doubt regarding the verification test which has been asked for this issue. Are we looking for a verify- script which will run as part of CI checks something that is used under k/k here ?

Also @alolita if possible, could you please assign me to this issue 🙂

pravarag avatar Sep 23 '21 03:09 pravarag

Is this issue still valid? The file has been modified heavily since this was opened.

he-mans avatar Mar 04 '22 16:03 he-mans

I've not been able to work on this, I'm un-assigning it from myself so that someone else interested can pick it up.

/un-assign

pravarag avatar Apr 05 '22 12:04 pravarag

Is this issue still valid? Can I give it a try? :-)

amandahla avatar Aug 04 '22 17:08 amandahla

The change that was referenced here (https://github.com/open-telemetry/opentelemetry-collector/pull/3615/files) is no longer used. Could this be related to https://github.com/open-telemetry/opentelemetry-collector/issues/273 ?

Or Config Source ?

amandahla avatar Aug 08 '22 20:08 amandahla

Hi, is this issue still valid?

Chinwendu20 avatar Oct 12 '22 04:10 Chinwendu20

I think the current analogue to this code is here: https://github.com/open-telemetry/opentelemetry-collector/blob/e07665cacabfdf6769f2c01576abde9786d0160b/service/collector.go#L201-L203

It's no longer run as part of a go routine and does not pass the error to a channel.

I think the way the code works now is that it exits back to cobra here which will eventually end the process.

There are tests for this code in general, however, I don't think there is a test specifically for when the config is reloaded, and the new config is invalid (although there is a test for the first config load not being valid)

mattsains avatar Nov 16 '22 22:11 mattsains

Please assign this issue to me.

DewaldDeJager avatar Jul 29 '23 14:07 DewaldDeJager