Repository: stackrox/stackrox
Pull request #15283: chore(grpc): wrap errors in codec
Author: login: janisz
Created: 2025-05-13T15:21:36Z | Merged: 2025-05-21T17:40:08Z

### Description

This PR wrap errors that occured in grpc codec to get more information what failed exactly.

- [x] CHANGELOG update is not needed
- [x] Documentation is not needed
### Testing
- [x] inspected CI results
#### Automated testing
- [x] modified existing tests
- [x] contributed **no automated tests**
#### How I validated my change
CI



Diff:
diff --git a/pkg/grpc/codec.go b/pkg/grpc/codec.go
index 30c5d5cfcc111..38c803ce26794 100644
--- a/pkg/grpc/codec.go
+++ b/pkg/grpc/codec.go
@@ -1,6 +1,7 @@
 package grpc
 
 import (
+	"github.com/pkg/errors"
 	"google.golang.org/grpc/encoding"
 	"google.golang.org/grpc/encoding/proto"
 	"google.golang.org/grpc/mem"
@@ -24,11 +25,13 @@ var defaultBufferPool = mem.DefaultBufferPool()
 func (c *codec) Marshal(v any) (mem.BufferSlice, error) {
 	m, ok := v.(vtprotoMessage)
 	if !ok {
-		return c.CodecV2.Marshal(v)
+		out, fallBackError := c.CodecV2.Marshal(v)
+		return out, errors.Wrapf(fallBackError, "codec failed: type %T does not support VT; fallback failed", v)
 	}
 	vt, err := c.marshalVT(m)
 	if err != nil {
-		return c.CodecV2.Marshal(v)
+		out, fallBackError := c.CodecV2.Marshal(v)
+		return out, errors.Wrapf(fallBackError, "codec failed: %s; fallback failed", err)
 	}
 	return vt, nil
 }
@@ -55,13 +58,15 @@ func (c *codec) marshalVT(m vtprotoMessage) (mem.BufferSlice, error) {
 func (c *codec) Unmarshal(data mem.BufferSlice, v any) error {
 	m, ok := v.(vtprotoMessage)
 	if !ok {
-		return c.CodecV2.Unmarshal(data, v)
+		fallbackErr := c.CodecV2.Unmarshal(data, v)
+		return errors.Wrapf(fallbackErr, "type %T does not support VT; fallback failed", v)
 	}
 	buf := data.MaterializeToBuffer(defaultBufferPool)
 	defer buf.Free()
 	err := m.UnmarshalVT(buf.ReadOnlyData())
 	if err != nil {
-		return c.CodecV2.Unmarshal(data, v)
+		fallbackErr := c.CodecV2.Unmarshal(data, v)
+		return errors.Wrapf(fallbackErr, "codec failed: %s; fallback failed", err)
 	}
 	return nil
 }
diff --git a/pkg/grpc/codec_test.go b/pkg/grpc/codec_test.go
index cfdbad189e8b7..1f74031716f2e 100644
--- a/pkg/grpc/codec_test.go
+++ b/pkg/grpc/codec_test.go
@@ -2,6 +2,7 @@ package grpc
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"net"
 	"testing"
@@ -12,10 +13,74 @@ import (
 	"github.com/stretchr/testify/require"
 	"google.golang.org/grpc"
 	"google.golang.org/grpc/credentials/insecure"
+	"google.golang.org/grpc/encoding"
+	"google.golang.org/grpc/encoding/proto"
 	"google.golang.org/grpc/test/bufconn"
 	"google.golang.org/protobuf/types/known/durationpb"
 )
 
+func TestCodecFallback(t *testing.T) {
+	c := encoding.GetCodecV2(proto.Name)
+
+	nonVtMessage := durationpb.New(1)
+
+	data, err := c.Marshal(nonVtMessage)
+	assert.NoError(t, err)
+	assert.NotEmpty(t, data)
+
+	err = c.Unmarshal(data, nonVtMessage)
+	assert.NoError(t, err)
+
+	_, err = c.Marshal(nil)
+	assert.EqualError(t, err, "codec failed: type <nil> does not support VT; fallback failed: proto: failed to marshal, message is <nil>, want proto.Message")
+
+	err = c.Unmarshal(data, nil)
+	assert.EqualError(t, err, "type <nil> does not support VT; fallback failed: failed to unmarshal, message is <nil>, want proto.Message")
+
+	_, err = c.Marshal(fakeVtMsg{})
+	assert.EqualError(t, err, "codec failed: some error; fallback failed: proto: failed to marshal, message is grpc.fakeVtMsg, want proto.Message")
+
+	err = c.Unmarshal(data, fakeVtMsg{})
+	assert.EqualError(t, err, "codec failed: some error; fallback failed: failed to unmarshal, message is grpc.fakeVtMsg, want proto.Message")
+
+	_, err = c.Marshal(errVtMsg{nonVtMessage})
+	assert.NoError(t, err)
+
+	err = c.Unmarshal(data, errVtMsg{nonVtMessage})
+	assert.NoError(t, err)
+}
+
+type fakeVtMsg struct {
+}
+
+func (fakeVtMsg) MarshalToSizedBufferVT(_ []byte) (int, error) {
+	return 0, errors.New("some error")
+}
+
+func (fakeVtMsg) UnmarshalVT([]byte) error {
+	return errors.New("some error")
+}
+
+func (fakeVtMsg) SizeVT() int {
+	return 0
+}
+
+type errVtMsg struct {
+	*durationpb.Duration
+}
+
+func (errVtMsg) MarshalToSizedBufferVT(_ []byte) (int, error) {
+	return 0, errors.New("some error")
+}
+
+func (errVtMsg) UnmarshalVT([]byte) error {
+	return errors.New("some error")
+}
+
+func (errVtMsg) SizeVT() int {
+	return 0
+}
+
 func TestCodec(t *testing.T) {
 	svc := getClientForServer(t)
 


Reviews:
user: login: sourcery-ai[bot]
body: Hey @janisz - I've reviewed your changes - here's some feedback:

- Extract the duplicate Wrapf logic in Unmarshal into a shared fallback helper (similar to Marshal) to reduce code duplication and ensure consistency.
- Standardize the error message templates and placeholder usage across both Marshal and Unmarshal wraps so failure logs are uniform and easy to search.
- Note that when the fallback succeeds, the original codec error is dropped—consider preserving or logging that initial error so the root cause isn’t lost.

<details>
<summary>Here's what I looked at during the review</summary>

- 🟡 **General issues**: 2 issues found
- 🟢 **Security**: all looks good
- 🟢 **Testing**: all looks good
- 🟢 **Complexity**: all looks good
- 🟢 **Documentation**: all looks good
</details>

***

<details>
<summary>Sourcery is free for open source - if you like our reviews please consider sharing them ✨</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20got%20an%20instant%20code%20review%20from%20%40SourceryAI%2C%20and%20it%20was%20brilliant%21%20It%27s%20free%20for%20open%20source%20and%20has%20a%20free%20trial%20for%20private%20code.%20Check%20it%20out%20https%3A//sourcery.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20got%20an%20instant%20code%20review%20from%20%40SourceryAI%2C%20and%20it%20was%20brilliant%21%20It%27s%20free%20for%20open%20source%20and%20has%20a%20free%20trial%20for%20private%20code.%20Check%20it%20out%20https%3A//sourcery.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https://sourcery.ai)
- [Facebook](https://www.facebook.com/sharer/sharer.php?u=https://sourcery.ai)

</details>

<sub>
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
</sub>
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-13T15:29:43Z
user: login: rhybrillou
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-15T12:16:29Z
user: login: janisz
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-16T09:25:53Z
user: login: rhybrillou
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-21T13:45:56Z

Review comments:
diff_hunk: @@ -24,15 +25,20 @@ var defaultBufferPool = mem.DefaultBufferPool()
 func (c *codec) Marshal(v any) (mem.BufferSlice, error) {
 	m, ok := v.(vtprotoMessage)
 	if !ok {
-		return c.CodecV2.Marshal(v)
+		return c.fallback(v, errors.Errorf("type %t does not support VT", v))
 	}
 	vt, err := c.marshalVT(m)
 	if err != nil {
-		return c.CodecV2.Marshal(v)
+		return c.fallback(v, err)
 	}
 	return vt, nil
 }
 
+func (c *codec) fallback(v any, err error) (mem.BufferSlice, error) {
+	out, fallBackError := c.CodecV2.Marshal(v)
+	return out, errors.Wrapf(fallBackError, "codec failed %q; fallback failed", err)
path: pkg/grpc/codec.go
user: login: sourcery-ai[bot]
body: **suggestion (bug_risk):** Error wrapping order may obscure the original fallback error.

Reverse the wrapping so fallBackError is the primary returned error and include err only as context, ensuring the actual fallback failure isn’t masked.
created_at: 2025-05-13T15:29:43Z
author_association: CONTRIBUTOR
diff_hunk: @@ -55,13 +61,14 @@
 func (c *codec) Unmarshal(data mem.BufferSlice, v any) error {
 	m, ok := v.(vtprotoMessage)
 	if !ok {
-		return c.CodecV2.Unmarshal(data, v)
+		return errors.Wrapf(c.CodecV2.Unmarshal(data, v),
+			"type %t does not support VT; fallback failed", v)
 	}
 	buf := data.MaterializeToBuffer(defaultBufferPool)
 	defer buf.Free()
 	err := m.UnmarshalVT(buf.ReadOnlyData())
 	if err != nil {
-		return c.CodecV2.Unmarshal(data, v)
+		return errors.Wrapf(c.CodecV2.Unmarshal(data, v), "error %q occured; fallback failed", err)
path: pkg/grpc/codec.go
user: login: sourcery-ai[bot]
body: **nitpick (typo):** Typo in error message: 'occured' should be 'occurred'.

Update the error message to use the correct spelling.

```suggestion
		return errors.Wrapf(c.CodecV2.Unmarshal(data, v), "error %q occurred; fallback failed", err)
```
created_at: 2025-05-13T15:29:43Z
author_association: CONTRIBUTOR
path: pkg/grpc/codec.go
user: login: rhybrillou
body: In the unmarshaling code, I'd prefer to have the codec unmarshal fallback to be called independently from the error wrapping.
created_at: 2025-05-15T12:16:29Z
author_association: CONTRIBUTOR
path: pkg/grpc/codec.go
user: login: janisz
body: Fixed
created_at: 2025-05-16T09:25:53Z
author_association: CONTRIBUTOR
diff_hunk: @@ -55,13 +58,14 @@ func (c *codec) marshalVT(m vtprotoMessage) (mem.BufferSlice, error) {
 func (c *codec) Unmarshal(data mem.BufferSlice, v any) error {
 	m, ok := v.(vtprotoMessage)
 	if !ok {
-		return c.CodecV2.Unmarshal(data, v)
+		return errors.Wrapf(c.CodecV2.Unmarshal(data, v),
+			"type %T does not support VT; fallback failed", v)
path: pkg/grpc/codec.go
user: login: rhybrillou
body: ```suggestion
		fallbackErr := c.CodecV2.Unmarshal(data, v)
		return errors.Wrapf(fallbackErr, "type %T does not support VT; fallback failed", v)
```
created_at: 2025-05-21T13:41:53Z
author_association: CONTRIBUTOR
diff_hunk: @@ -55,13 +58,14 @@ func (c *codec) marshalVT(m vtprotoMessage) (mem.BufferSlice, error) {
 func (c *codec) Unmarshal(data mem.BufferSlice, v any) error {
 	m, ok := v.(vtprotoMessage)
 	if !ok {
-		return c.CodecV2.Unmarshal(data, v)
+		return errors.Wrapf(c.CodecV2.Unmarshal(data, v),
+			"type %T does not support VT; fallback failed", v)
 	}
 	buf := data.MaterializeToBuffer(defaultBufferPool)
 	defer buf.Free()
 	err := m.UnmarshalVT(buf.ReadOnlyData())
 	if err != nil {
-		return c.CodecV2.Unmarshal(data, v)
+		return errors.Wrapf(c.CodecV2.Unmarshal(data, v), "codec failed: %s; fallback failed", err)
path: pkg/grpc/codec.go
user: login: rhybrillou
body: ```suggestion
		fallbackErr := c.CodecV2.Unmarshal(data, v)
		return errors.Wrapf(fallbackErr, "codec failed: %s; fallback failed", err)
```
created_at: 2025-05-21T13:43:01Z
author_association: CONTRIBUTOR

PR comments:
user: login: janisz
created_at: 2025-05-14T08:47:58Z
body: /retest
author_association: CONTRIBUTOR
user: login: rhacs-bot
created_at: 2025-05-14T09:01:16Z
body: [//]: # (meta:type=build)

Images are ready for the commit at 65a4828.

To use with deploy scripts, first `export MAIN_IMAGE_TAG=4.8.x-692-g65a4828037`.
author_association: CONTRIBUTOR
user: login: vikin91
created_at: 2025-05-14T10:03:44Z
body: Tomek, show me this in action with some examples what it does, cause the expectations suggest that it may help a lot with debugging grpc problems as the few recent ones that we are handling. 
author_association: CONTRIBUTOR
user: login: codecov[bot]
created_at: 2025-05-14T10:53:03Z
body: ## [Codecov](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) Report
Attention: Patch coverage is `0%` with `8 lines` in your changes missing coverage. Please review.
> Project coverage is 49.13%. Comparing base [(`8080109`)](https://app.codecov.io/gh/stackrox/stackrox/commit/8080109c157304ed0a7811b91f0df87a5b19f2fd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) to head [(`32daf6f`)](https://app.codecov.io/gh/stackrox/stackrox/commit/32daf6fefc4439787efa2956a6d85291c54a9b38?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).
> Report is 6 commits behind head on master.

| [Files with missing lines](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | Patch % | Lines |
|---|---|---|
| [pkg/grpc/codec.go](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?src=pr&el=tree&filepath=pkg%2Fgrpc%2Fcodec.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox#diff-cGtnL2dycGMvY29kZWMuZ28=) | 0.00% | [8 Missing :warning: ](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) |

<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##           master   #15283   +/-   ##
=======================================
  Coverage   49.12%   49.13%           
=======================================
  Files        2563     2563           
  Lines      188228   188232    +4     
=======================================
+ Hits        92476    92480    +4     
  Misses      88463    88463           
  Partials     7289     7289           
```

| [Flag](https://app.codecov.io/gh/stackrox/stackrox/pull/15283/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | Coverage Δ | |
|---|---|---|
| [go-unit-tests](https://app.codecov.io/gh/stackrox/stackrox/pull/15283/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | `49.13% <0.00%> (+<0.01%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox#carryforward-flags-in-the-pull-request-comment) to find out more.

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).

<details><summary> :rocket: New features to boost your workflow: </summary>

- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
author_association: NONE
user: login: codecov[bot]
created_at: 2025-05-14T10:55:02Z
body: ## [Codecov](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) Report
Attention: Patch coverage is `0%` with `8 lines` in your changes missing coverage. Please review.
> Project coverage is 49.13%. Comparing base [(`8080109`)](https://app.codecov.io/gh/stackrox/stackrox/commit/8080109c157304ed0a7811b91f0df87a5b19f2fd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) to head [(`32daf6f`)](https://app.codecov.io/gh/stackrox/stackrox/commit/32daf6fefc4439787efa2956a6d85291c54a9b38?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).
> Report is 6 commits behind head on master.

| [Files with missing lines](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | Patch % | Lines |
|---|---|---|
| [pkg/grpc/codec.go](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?src=pr&el=tree&filepath=pkg%2Fgrpc%2Fcodec.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox#diff-cGtnL2dycGMvY29kZWMuZ28=) | 0.00% | [8 Missing :warning: ](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) |

<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##           master   #15283   +/-   ##
=======================================
  Coverage   49.12%   49.13%           
=======================================
  Files        2563     2563           
  Lines      188228   188232    +4     
=======================================
+ Hits        92476    92480    +4     
  Misses      88463    88463           
  Partials     7289     7289           
```

| [Flag](https://app.codecov.io/gh/stackrox/stackrox/pull/15283/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | Coverage Δ | |
|---|---|---|
| [go-unit-tests](https://app.codecov.io/gh/stackrox/stackrox/pull/15283/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | `49.13% <0.00%> (+<0.01%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox#carryforward-flags-in-the-pull-request-comment) to find out more.

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).

<details><summary> :rocket: New features to boost your workflow: </summary>

- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
author_association: NONE
user: login: codecov[bot]
created_at: 2025-05-14T10:57:43Z
body: ## [Codecov](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) Report
Attention: Patch coverage is `0%` with `8 lines` in your changes missing coverage. Please review.
> Project coverage is 49.13%. Comparing base [(`8080109`)](https://app.codecov.io/gh/stackrox/stackrox/commit/8080109c157304ed0a7811b91f0df87a5b19f2fd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) to head [(`32daf6f`)](https://app.codecov.io/gh/stackrox/stackrox/commit/32daf6fefc4439787efa2956a6d85291c54a9b38?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).
> Report is 6 commits behind head on master.

| [Files with missing lines](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | Patch % | Lines |
|---|---|---|
| [pkg/grpc/codec.go](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?src=pr&el=tree&filepath=pkg%2Fgrpc%2Fcodec.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox#diff-cGtnL2dycGMvY29kZWMuZ28=) | 0.00% | [8 Missing :warning: ](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) |

<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##           master   #15283   +/-   ##
=======================================
  Coverage   49.12%   49.13%           
=======================================
  Files        2563     2563           
  Lines      188228   188232    +4     
=======================================
+ Hits        92476    92480    +4     
  Misses      88463    88463           
  Partials     7289     7289           
```

| [Flag](https://app.codecov.io/gh/stackrox/stackrox/pull/15283/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | Coverage Δ | |
|---|---|---|
| [go-unit-tests](https://app.codecov.io/gh/stackrox/stackrox/pull/15283/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | `49.13% <0.00%> (+<0.01%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox#carryforward-flags-in-the-pull-request-comment) to find out more.

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).

<details><summary> :rocket: New features to boost your workflow: </summary>

- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
author_association: NONE
user: login: codecov[bot]
created_at: 2025-05-14T11:01:15Z
body: ## [Codecov](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) Report
Attention: Patch coverage is `0%` with `8 lines` in your changes missing coverage. Please review.
> Project coverage is 49.13%. Comparing base [(`8080109`)](https://app.codecov.io/gh/stackrox/stackrox/commit/8080109c157304ed0a7811b91f0df87a5b19f2fd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) to head [(`32daf6f`)](https://app.codecov.io/gh/stackrox/stackrox/commit/32daf6fefc4439787efa2956a6d85291c54a9b38?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).
> Report is 6 commits behind head on master.

| [Files with missing lines](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | Patch % | Lines |
|---|---|---|
| [pkg/grpc/codec.go](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?src=pr&el=tree&filepath=pkg%2Fgrpc%2Fcodec.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox#diff-cGtnL2dycGMvY29kZWMuZ28=) | 0.00% | [8 Missing :warning: ](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) |

<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##           master   #15283   +/-   ##
=======================================
  Coverage   49.12%   49.13%           
=======================================
  Files        2563     2563           
  Lines      188228   188232    +4     
=======================================
+ Hits        92476    92480    +4     
  Misses      88463    88463           
  Partials     7289     7289           
```

| [Flag](https://app.codecov.io/gh/stackrox/stackrox/pull/15283/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | Coverage Δ | |
|---|---|---|
| [go-unit-tests](https://app.codecov.io/gh/stackrox/stackrox/pull/15283/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | `49.13% <0.00%> (+<0.01%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox#carryforward-flags-in-the-pull-request-comment) to find out more.

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).

<details><summary> :rocket: New features to boost your workflow: </summary>

- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
author_association: NONE
user: login: codecov[bot]
created_at: 2025-05-14T11:10:50Z
body: ## [Codecov](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) Report
Attention: Patch coverage is `0%` with `8 lines` in your changes missing coverage. Please review.
> Project coverage is 49.13%. Comparing base [(`8080109`)](https://app.codecov.io/gh/stackrox/stackrox/commit/8080109c157304ed0a7811b91f0df87a5b19f2fd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) to head [(`32daf6f`)](https://app.codecov.io/gh/stackrox/stackrox/commit/32daf6fefc4439787efa2956a6d85291c54a9b38?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).
> Report is 6 commits behind head on master.

| [Files with missing lines](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | Patch % | Lines |
|---|---|---|
| [pkg/grpc/codec.go](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?src=pr&el=tree&filepath=pkg%2Fgrpc%2Fcodec.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox#diff-cGtnL2dycGMvY29kZWMuZ28=) | 0.00% | [8 Missing :warning: ](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) |

<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##           master   #15283   +/-   ##
=======================================
  Coverage   49.12%   49.13%           
=======================================
  Files        2563     2563           
  Lines      188228   188232    +4     
=======================================
+ Hits        92476    92480    +4     
  Misses      88463    88463           
  Partials     7289     7289           
```

| [Flag](https://app.codecov.io/gh/stackrox/stackrox/pull/15283/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | Coverage Δ | |
|---|---|---|
| [go-unit-tests](https://app.codecov.io/gh/stackrox/stackrox/pull/15283/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | `49.13% <0.00%> (+<0.01%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox#carryforward-flags-in-the-pull-request-comment) to find out more.

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).

<details><summary> :rocket: New features to boost your workflow: </summary>

- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
author_association: NONE
user: login: codecov[bot]
created_at: 2025-05-14T12:15:37Z
body: ## [Codecov](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 49.23%. Comparing base [(`8080109`)](https://app.codecov.io/gh/stackrox/stackrox/commit/8080109c157304ed0a7811b91f0df87a5b19f2fd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) to head [(`65a4828`)](https://app.codecov.io/gh/stackrox/stackrox/commit/65a4828037fb624e95e2e0bd9e3cf62e6e9181e8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).
> Report is 86 commits behind head on master.

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##           master   #15283      +/-   ##
==========================================
+ Coverage   49.12%   49.23%   +0.10%     
==========================================
  Files        2563     2573      +10     
  Lines      188228   188858     +630     
==========================================
+ Hits        92476    92992     +516     
- Misses      88463    88546      +83     
- Partials     7289     7320      +31     
```

| [Flag](https://app.codecov.io/gh/stackrox/stackrox/pull/15283/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | Coverage Δ | |
|---|---|---|
| [go-unit-tests](https://app.codecov.io/gh/stackrox/stackrox/pull/15283/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox) | `49.23% <100.00%> (+0.10%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox#carryforward-flags-in-the-pull-request-comment) to find out more.

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/stackrox/stackrox/pull/15283?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=stackrox).

<details><summary> :rocket: New features to boost your workflow: </summary>

- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
author_association: NONE
user: login: vikin91
created_at: 2025-05-15T07:41:19Z
body: I have just tested that for you by using the image from this PR on Central and sending the garbled message using local-sensor. Central has panicked:

```
# Here I kill the regular sensor

central-554dcf89c8-zsscz cloudsources/manager: 2025/05/15 07:36:46.325005 manager.go:98: Info: Marking discovered clusters matching cluster "7f9f75d1-1466-4184-b330-44f34d94196d" as secured
central-554dcf89c8-zsscz cloudsources/manager: 2025/05/15 07:37:52.036128 manager.go:103: Info: Marking discovered clusters matching cluster "7f9f75d1-1466-4184-b330-44f34d94196d" as unsecured
central-554dcf89c8-zsscz cloudsources/manager: 2025/05/15 07:37:52.036186 manager.go:103: Info: Marking discovered clusters matching cluster "7f9f75d1-1466-4184-b330-44f34d94196d" as unsecured
central-554dcf89c8-zsscz cloudsources/manager: 2025/05/15 07:37:52.036311 manager.go:103: Info: Marking discovered clusters matching cluster "7f9f75d1-1466-4184-b330-44f34d94196d" as unsecured
central-554dcf89c8-zsscz sensor/service/connection: 2025/05/15 07:37:52.036111 manager_impl.go:325: Warn: Connection to server in cluster 7f9f75d1-1466-4184-b330-44f34d94196d terminated: context error: context canceled
central-554dcf89c8-zsscz cloudsources/manager: 2025/05/15 07:37:52.036475 manager.go:103: Info: Marking discovered clusters matching cluster "7f9f75d1-1466-4184-b330-44f34d94196d" as unsecured
central-554dcf89c8-zsscz cloudsources/manager: 2025/05/15 07:37:52.036625 manager.go:103: Info: Marking discovered clusters matching cluster "7f9f75d1-1466-4184-b330-44f34d94196d" as unsecured
central-554dcf89c8-zsscz cloudsources/manager: 2025/05/15 07:37:52.036798 manager.go:103: Info: Marking discovered clusters matching cluster "7f9f75d1-1466-4184-b330-44f34d94196d" as unsecured
central-554dcf89c8-zsscz cloudsources/manager: 2025/05/15 07:37:52.036862 manager.go:103: Info: Marking discovered clusters matching cluster "7f9f75d1-1466-4184-b330-44f34d94196d" as unsecured
central-554dcf89c8-zsscz cloudsources/manager: 2025/05/15 07:37:52.036814 manager.go:103: Info: Marking discovered clusters matching cluster "7f9f75d1-1466-4184-b330-44f34d94196d" as unsecured

# Here, I start local-sensor
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
central-554dcf89c8-zsscz         github.com/stackrox/rox/pkg/contextutil/contextupdater.go:52 +0x7f
central-554dcf89c8-zsscz     google.golang.org/grpc.getChainStreamHandler.func1({0xa0962a0, 0xc00210d900}, {0xb88c1d8, 0xc00c9aee40})
central-554dcf89c8-zsscz         google.golang.org/grpc@v1.72.0/server.go:1548 +0xb2
central-554dcf89c8-zsscz     github.com/stackrox/rox/pkg/grpc/ratelimit.(*rateLimiter).GetStreamServerInterceptor.StreamServerInterceptor.func1({0xa0962a0, 0xc00210d900}, {0xb88c1d8, 0xc00c9aee40}, 0xc00c9aee10, 0xc00b8ecf00)
central-554dcf89c8-zsscz         github.com/grpc-ecosystem/go-grpc-middleware/v2@v2.2.0/interceptors/ratelimit/ratelimit.go:37 +0x13c
central-554dcf89c8-zsscz     google.golang.org/grpc.getChainStreamHandler.func1({0xa0962a0, 0xc00210d900}, {0xb88c1d8, 0xc00c9aee40})
central-554dcf89c8-zsscz         google.golang.org/grpc@v1.72.0/server.go:1548 +0xb2
central-554dcf89c8-zsscz     github.com/stackrox/rox/pkg/grpc/errors.ErrorToGrpcCodeStreamInterceptor({0xa0962a0?, 0xc00210d900?}, {0xb88c1d8?, 0xc00c9aee40?}, 0xc00c9aee10?, 0xb013930?)
central-554dcf89c8-zsscz         github.com/stackrox/rox/pkg/grpc/errors/interceptor.go:73 +0x2e
central-554dcf89c8-zsscz     google.golang.org/grpc.getChainStreamHandler.func1({0xa0962a0, 0xc00210d900}, {0xb88c1d8, 0xc00c9aee40})
central-554dcf89c8-zsscz         google.golang.org/grpc@v1.72.0/server.go:1548 +0xb2
central-554dcf89c8-zsscz     github.com/grpc-ecosystem/go-grpc-prometheus.init.(*ServerMetrics).StreamServerInterceptor.func4({0xa0962a0, 0xc00210d900}, {0xb88b198, 0xc001d701c0}, 0xc00c9aee10, 0xc00b8ece80)
central-554dcf89c8-zsscz         github.com/grpc-ecosystem/go-grpc-prometheus@v1.2.1-0.20210315223345-82c243799c99/server_metrics.go:122 +0xd2
central-554dcf89c8-zsscz     google.golang.org/grpc.NewServer.chainStreamServerInterceptors.chainStreamInterceptors.func2({0xa0962a0, 0xc00210d900}, {0xb88b198, 0xc001d701c0}, 0xc00c9aee10, 0xc0069ac590?)
central-554dcf89c8-zsscz         google.golang.org/grpc@v1.72.0/server.go:1539 +0x85
central-554dcf89c8-zsscz     google.golang.org/grpc.(*Server).processStreamingRPC(0xc0067bb000, {0xb878078, 0xc00746fd70}, 0xc001aee780, 0xc006104ab0, 0xff684a0, 0x0)
central-554dcf89c8-zsscz         google.golang.org/grpc@v1.72.0/server.go:1702 +0x124a
central-554dcf89c8-zsscz     google.golang.org/grpc.(*Server).handleStream(0xc0067bb000, {0xb87aeb8, 0xc00b846d00}, 0xc001aee780)
central-554dcf89c8-zsscz         google.golang.org/grpc@v1.72.0/server.go:1819 +0xb69
central-554dcf89c8-zsscz     google.golang.org/grpc.(*Server).serveStreams.func2.1()
central-554dcf89c8-zsscz         google.golang.org/grpc@v1.72.0/server.go:1035 +0x7f
central-554dcf89c8-zsscz     created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 32438
central-554dcf89c8-zsscz         google.golang.org/grpc@v1.72.0/server.go:1046 +0x125
central-554dcf89c8-zsscz     
central-554dcf89c8-zsscz 
central-554dcf89c8-zsscz goroutine 32419 [running]:
central-554dcf89c8-zsscz github.com/stackrox/rox/pkg/utils/panic.HardPanic({0x9d8b220, 0xc00c9af218})
central-554dcf89c8-zsscz     github.com/stackrox/rox/pkg/utils/panic/hard_panic.go:25 +0xa7
central-554dcf89c8-zsscz github.com/stackrox/rox/pkg/utils.ShouldErr(...)
central-554dcf89c8-zsscz     github.com/stackrox/rox/pkg/utils/must.go:34
central-554dcf89c8-zsscz github.com/stackrox/rox/pkg/utils.Should(...)
central-554dcf89c8-zsscz     github.com/stackrox/rox/pkg/utils/must.go:44
central-554dcf89c8-zsscz github.com/stackrox/rox/pkg/grpc.panicHandler({0x9fc9180?, 0xc00c9af1e8?})
central-554dcf89c8-zsscz     github.com/stackrox/rox/pkg/grpc/recovery.go:24 +0xe5
central-554dcf89c8-zsscz github.com/stackrox/rox/pkg/grpc.(*apiImpl).streamRecovery.(*apiImpl).recoveryOpts.WithRecoveryHandler.func1.1({0x10000c00c9af1d0?, 0xf0?}, {0x9fc9180?, 0xc00c9af1e8?})
central-554dcf89c8-zsscz     github.com/grpc-ecosystem/go-grpc-middleware/v2@v2.2.0/interceptors/recovery/options.go:36 +0x27
central-554dcf89c8-zsscz github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/recovery.recoverFrom({0xb878078?, 0xc00739e3f0?}, {0x9fc9180?, 0xc00c9af1e8?}, 0xc001ca0fc0?)
central-554dcf89c8-zsscz     github.com/grpc-ecosystem/go-grpc-middleware/v2@v2.2.0/interceptors/recovery/interceptors.go:54 +0xea
central-554dcf89c8-zsscz github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/recovery.StreamServerInterceptor.func1.1()
central-554dcf89c8-zsscz     github.com/grpc-ecosystem/go-grpc-middleware/v2@v2.2.0/interceptors/recovery/interceptors.go:44 +0x7b
central-554dcf89c8-zsscz panic({0x9fc9180?, 0xc00c9af1e8?})
central-554dcf89c8-zsscz     runtime/panic.go:785 +0x132
central-554dcf89c8-zsscz github.com/stackrox/rox/pkg/utils/panic.HardPanic({0x9fc9180, 0xc00c9af1e8})
central-554dcf89c8-zsscz     github.com/stackrox/rox/pkg/utils/panic/hard_panic.go:25 +0xa7
central-554dcf89c8-zsscz github.com/stackrox/rox/pkg/utils.ShouldErr(...)
central-554dcf89c8-zsscz     github.com/stackrox/rox/pkg/utils/must.go:34
central-554dcf89c8-zsscz github.com/stackrox/rox/pkg/safe.RunE(0xc000012798?)
central-554dcf89c8-zsscz     github.com/stackrox/rox/pkg/safe/run.go:13 +0x5e
central-554dcf89c8-zsscz github.com/stackrox/rox/central/sensor/service.(*serviceImpl).Communicate(0xc00210d900, {0xb896950, 0xc0069ac800})
central-554dcf89c8-zsscz     github.com/stackrox/rox/central/sensor/service/service_impl.go:155 +0x100b
central-554dcf89c8-zsscz github.com/stackrox/rox/generated/internalapi/central._SensorService_Communicate_Handler({0xa0962a0?, 0xc00210d900}, {0xb88ace8, 0xc00701be60})
central-554dcf89c8-zsscz     github.com/stackrox/rox/generated/internalapi/central/sensor_iservice_grpc.pb.go:91 +0xd8
central-554dcf89c8-zsscz github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/recovery.StreamServerInterceptor.func1({0xa0962a0?, 0xc00210d900?}, {0xb88ace8?, 0xc00701be60?}, 0xc00739e3f0?, 0xc001d00708?)
central-554dcf89c8-zsscz     github.com/grpc-ecosystem/go-grpc-middleware/v2@v2.2.0/interceptors/recovery/interceptors.go:48 +0x82
central-554dcf89c8-zsscz google.golang.org/grpc.getChainStreamHandler.func1({0xa0962a0, 0xc00210d900}, {0xb88ace8, 0xc00701be60})
central-554dcf89c8-zsscz     google.golang.org/grpc@v1.72.0/server.go:1548 +0xb2
central-554dcf89c8-zsscz github.com/stackrox/rox/pkg/grpc/errors.PanicOnInvariantViolationStreamInterceptor({0xa0962a0?, 0xc00210d900?}, {0xb88ace8?, 0xc00701be60?}, 0xc00c9aee10?, 0xb013930?)
central-554dcf89c8-zsscz     github.com/stackrox/rox/pkg/grpc/errors/interceptor.go:33 +0x2a
central-554dcf89c8-zsscz google.golang.org/grpc.getChainStreamHandler.func1({0xa0962a0, 0xc00210d900}, {0xb88ace8, 0xc00701be60})
central-554dcf89c8-zsscz     google.golang.org/grpc@v1.72.0/server.go:1548 +0xb2
central-554dcf89c8-zsscz github.com/stackrox/rox/pkg/grpc/errors.LogInternalErrorStreamInterceptor({0xa0962a0?, 0xc00210d900?}, {0xb88ace8?, 0xc00701be60?}, 0xc00c9aee10?, 0xb013930?)
central-554dcf89c8-zsscz     github.com/stackrox/rox/pkg/grpc/errors/interceptor.go:53 +0x2a
central-554dcf89c8-zsscz google.golang.org/grpc.getChainStreamHandler.func1({0xa0962a0, 0xc00210d900}, {0xb88ace8, 0xc00701be60})
central-554dcf89c8-zsscz     google.golang.org/grpc@v1.72.0/server.go:1548 +0xb2
central-554dcf89c8-zsscz github.com/stackrox/rox/pkg/grpc.(*apiImpl).streamInterceptors.StreamServerInterceptor.func4({0xa0962a0, 0xc00210d900}, {0xb88ace8, 0xc00701be60}, 0xc00c9aee10, 0xc00b8ed080)
central-554dcf89c8-zsscz     github.com/grpc-ecosystem/go-grpc-middleware/v2@v2.2.0/interceptors/auth/auth.go:68 +0x126
central-554dcf89c8-zsscz google.golang.org/grpc.getChainStreamHandler.func1({0xa0962a0, 0xc00210d900}, {0xb88ace8, 0xc00701be60})
central-554dcf89c8-zsscz     google.golang.org/grpc@v1.72.0/server.go:1548 +0xb2
central-554dcf89c8-zsscz github.com/stackrox/rox/pkg/grpc.(*apiImpl).streamInterceptors.StreamServerInterceptor.func3({0xa0962a0, 0xc00210d900}, {0xb88ace8, 0xc00701be40}, 0xc00c9aee10?, 0xc00b8ed040)
central-554dcf89c8-zsscz     github.com/stackrox/rox/pkg/contextutil/contextupdater.go:52 +0x7f
central-554dcf89c8-zsscz google.golang.org/grpc.getChainStreamHandler.func1({0xa0962a0, 0xc00210d900}, {0xb88ace8, 0xc00701be40})
central-554dcf89c8-zsscz     google.golang.org/grpc@v1.72.0/server.go:1548 +0xb2
central-554dcf89c8-zsscz github.com/stackrox/rox/pkg/grpc.(*apiImpl).streamInterceptors.StreamServerInterceptor.func2({0xa0962a0, 0xc00210d900}, {0xb88ace8, 0xc00701bd40}, 0xc00c9aee10?, 0xc00b8ecf80)
central-554dcf89c8-zsscz     github.com/stackrox/rox/pkg/contextutil/contextupdater.go:52 +0x7f
central-554dcf89c8-zsscz google.golang.org/grpc.getChainStreamHandler.func1({0xa0962a0, 0xc00210d900}, {0xb88ace8, 0xc00701bd40})
central-554dcf89c8-zsscz     google.golang.org/grpc@v1.72.0/server.go:1548 +0xb2
central-554dcf89c8-zsscz github.com/stackrox/rox/pkg/grpc.(*apiImpl).streamInterceptors.StreamServerInterceptor.func1({0xa0962a0, 0xc00210d900}, {0xb88c1d8, 0xc00c9aee40}, 0xc00c9aee10?, 0xc00b8ecf40)
central-554dcf89c8-zsscz     github.com/stackrox/rox/pkg/contextutil/contextupdater.go:52 +0x7f
central-554dcf89c8-zsscz google.golang.org/grpc.getChainStreamHandler.func1({0xa0962a0, 0xc00210d900}, {0xb88c1d8, 0xc00c9aee40})
central-554dcf89c8-zsscz     google.golang.org/grpc@v1.72.0/server.go:1548 +0xb2
central-554dcf89c8-zsscz github.com/stackrox/rox/pkg/grpc/ratelimit.(*rateLimiter).GetStreamServerInterceptor.StreamServerInterceptor.func1({0xa0962a0, 0xc00210d900}, {0xb88c1d8, 0xc00c9aee40}, 0xc00c9aee10, 0xc00b8ecf00)
central-554dcf89c8-zsscz     github.com/grpc-ecosystem/go-grpc-middleware/v2@v2.2.0/interceptors/ratelimit/ratelimit.go:37 +0x13c
central-554dcf89c8-zsscz google.golang.org/grpc.getChainStreamHandler.func1({0xa0962a0, 0xc00210d900}, {0xb88c1d8, 0xc00c9aee40})
central-554dcf89c8-zsscz     google.golang.org/grpc@v1.72.0/server.go:1548 +0xb2
central-554dcf89c8-zsscz github.com/stackrox/rox/pkg/grpc/errors.ErrorToGrpcCodeStreamInterceptor({0xa0962a0?, 0xc00210d900?}, {0xb88c1d8?, 0xc00c9aee40?}, 0xc00c9aee10?, 0xb013930?)
central-554dcf89c8-zsscz     github.com/stackrox/rox/pkg/grpc/errors/interceptor.go:73 +0x2e
central-554dcf89c8-zsscz google.golang.org/grpc.getChainStreamHandler.func1({0xa0962a0, 0xc00210d900}, {0xb88c1d8, 0xc00c9aee40})
central-554dcf89c8-zsscz     google.golang.org/grpc@v1.72.0/server.go:1548 +0xb2
central-554dcf89c8-zsscz github.com/grpc-ecosystem/go-grpc-prometheus.init.(*ServerMetrics).StreamServerInterceptor.func4({0xa0962a0, 0xc00210d900}, {0xb88b198, 0xc001d701c0}, 0xc00c9aee10, 0xc00b8ece80)
central-554dcf89c8-zsscz     github.com/grpc-ecosystem/go-grpc-prometheus@v1.2.1-0.20210315223345-82c243799c99/server_metrics.go:122 +0xd2
central-554dcf89c8-zsscz google.golang.org/grpc.NewServer.chainStreamServerInterceptors.chainStreamInterceptors.func2({0xa0962a0, 0xc00210d900}, {0xb88b198, 0xc001d701c0}, 0xc00c9aee10, 0xc0069ac590?)
central-554dcf89c8-zsscz     google.golang.org/grpc@v1.72.0/server.go:1539 +0x85
central-554dcf89c8-zsscz google.golang.org/grpc.(*Server).processStreamingRPC(0xc0067bb000, {0xb878078, 0xc00746fd70}, 0xc001aee780, 0xc006104ab0, 0xff684a0, 0x0)
central-554dcf89c8-zsscz     google.golang.org/grpc@v1.72.0/server.go:1702 +0x124a
central-554dcf89c8-zsscz google.golang.org/grpc.(*Server).handleStream(0xc0067bb000, {0xb87aeb8, 0xc00b846d00}, 0xc001aee780)
central-554dcf89c8-zsscz     google.golang.org/grpc@v1.72.0/server.go:1819 +0xb69
central-554dcf89c8-zsscz google.golang.org/grpc.(*Server).serveStreams.func2.1()
central-554dcf89c8-zsscz     google.golang.org/grpc@v1.72.0/server.go:1035 +0x7f
central-554dcf89c8-zsscz created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 32438
central-554dcf89c8-zsscz     google.golang.org/grpc@v1.72.0/server.go:1046 +0x125
stream closed EOF for stackrox/central-554dcf89c8-zsscz (central)
```
author_association: CONTRIBUTOR
user: login: janisz
created_at: 2025-05-15T09:55:13Z
body: @vikin91 do you have a full log with an error? The panic is caused because it is not  release image but I'd love to see the error message.

https://github.com/stackrox/stackrox/blob/2b75b6120ed17c2022ebc08e93f1bfe13fcab8ad/pkg/safe/run.go#L8-L14
author_association: CONTRIBUTOR
user: login: vikin91
created_at: 2025-05-15T12:18:08Z
body: > @vikin91 do you have a full log with an error? The panic is caused because it is not release image but I'd love to see the error message.
> 

I thought, I pasted entire log starting from a moment where everything was healthy until the end of the log.
I can try that again.
author_association: CONTRIBUTOR
user: login: janisz
created_at: 2025-05-16T09:26:13Z
body: /retest
author_association: CONTRIBUTOR