[receiver/k8seventsreceiver] avoid panic on non-Event objects in informer handler#43018
Merged
atoulme merged 3 commits intoSep 28, 2025
Merged
Conversation
…rmer handler Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
TylerHelmuth
approved these changes
Sep 26, 2025
atoulme
added a commit
that referenced
this pull request
Sep 28, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Seems the CI for `scoped-tests-matrix (windows-latest)` is failing due
to the `Build gotestsum on Windows` error.
```sh
Run make "$(${PWD} -replace '\\', '/')/.tools/gotestsum"
make: *** No rule to make target 'D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/.tools/gotestsum'. Stop.
Error: Process completed with exit code 1.
```
See
https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/18048822328/job/51369899669?pr=43018
and
https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/18050658515/job/51371803867?pr=43019
I think we can simplify the `Build gotestsum` task into a single one
using the `working-directory` definition, and this should fix the issue.
Found the issue in:
-
#43018
-
#43019
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Co-authored-by: Antoine Toulme <atoulme@splunk.com>
atoulme
added a commit
to atoulme/opentelemetry-collector-contrib
that referenced
this pull request
Sep 28, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
Seems the CI for `scoped-tests-matrix (windows-latest)` is failing due
to the `Build gotestsum on Windows` error.
```sh
Run make "$(${PWD} -replace '\\', '/')/.tools/gotestsum"
make: *** No rule to make target 'D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/.tools/gotestsum'. Stop.
Error: Process completed with exit code 1.
```
See
https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/18048822328/job/51369899669?pr=43018
and
https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/18050658515/job/51371803867?pr=43019
I think we can simplify the `Build gotestsum` task into a single one
using the `working-directory` definition, and this should fix the issue.
Found the issue in:
-
open-telemetry#43018
-
open-telemetry#43019
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Co-authored-by: Antoine Toulme <atoulme@splunk.com>
atoulme
added a commit
to atoulme/opentelemetry-collector-contrib
that referenced
this pull request
Sep 28, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
Seems the CI for `scoped-tests-matrix (windows-latest)` is failing due
to the `Build gotestsum on Windows` error.
```sh
Run make "$(${PWD} -replace '\\', '/')/.tools/gotestsum"
make: *** No rule to make target 'D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/.tools/gotestsum'. Stop.
Error: Process completed with exit code 1.
```
See
https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/18048822328/job/51369899669?pr=43018
and
https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/18050658515/job/51371803867?pr=43019
I think we can simplify the `Build gotestsum` task into a single one
using the `working-directory` definition, and this should fix the issue.
Found the issue in:
-
open-telemetry#43018
-
open-telemetry#43019
Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
Co-authored-by: Antoine Toulme <atoulme@splunk.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
As discussed in the following thread, I decided to open a dedicated PR for this.
The change just makes the code safer, as before we were assuming the object was always an Event, which could panic if it wasn’t. Now we check first, and skip anything that isn’t an Event.