Skip to content

[receiver/k8seventsreceiver] avoid panic on non-Event objects in informer handler#43018

Merged
atoulme merged 3 commits into
open-telemetry:mainfrom
paulojmdias:feat/panic_event_filter
Sep 28, 2025
Merged

[receiver/k8seventsreceiver] avoid panic on non-Event objects in informer handler#43018
atoulme merged 3 commits into
open-telemetry:mainfrom
paulojmdias:feat/panic_event_filter

Conversation

@paulojmdias
Copy link
Copy Markdown
Member

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.

…rmer handler

Signed-off-by: Paulo Dias <paulodias.gm@gmail.com>
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>
@atoulme atoulme merged commit ef40c89 into open-telemetry:main Sep 28, 2025
185 checks passed
@github-actions github-actions Bot added this to the next release milestone Sep 28, 2025
@paulojmdias paulojmdias deleted the feat/panic_event_filter branch September 28, 2025 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants