fix: Update to latest sentry-protos version#651
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 33fe26d. Configure here.
| "logs" | ||
| ] } | ||
| sentry_protos = "0.11.0" | ||
| sentry_protos = "0.16.1" |
There was a problem hiding this comment.
Bug: The code uses .unwrap() on the result of TaskActivation::decode(), which will cause a panic if protobuf deserialization fails due to a schema mismatch.
Severity: HIGH
Suggested Fix
Replace the .unwrap() calls on TaskActivation::decode() with proper error handling. The function should return a Result and propagate the error, or handle it gracefully by logging the error and returning an appropriate gRPC status code or skipping the problematic task.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: Cargo.toml#L47
Potential issue: The result of `TaskActivation::decode()` is unwrapped without handling
the potential `Err` case. If protobuf deserialization fails, for example due to a schema
version mismatch between services during a rolling deployment, the `.unwrap()` call will
cause a panic. This occurs in several production-critical code paths, including the gRPC
handlers for `get_task` and `set_task_status`, as well as in the periodic upkeep
process. A panic in these locations will crash the service, interrupting task processing
and maintenance.
Also affects:
src/upkeep.rs:169src/upkeep.rs:569src/upkeep.rs:596src/upkeep.rs:623src/upkeep.rs:675src/upkeep.rs:716src/upkeep.rs:722src/upkeep.rs:1048src/kafka/deserialize_raw.rs:242src/kafka/deserialize_raw.rs:274src/kafka/deserialize_raw.rs:322src/grpc/server.rs:69src/grpc/server.rs:213src/test_utils.rs:423src/test_utils.rs:435
Did we get this right? 👍 / 👎 to inform future reviews.

No description provided.