Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ sentry = { version = "0.41.0", default-features = false, features = [
"tracing",
"logs"
] }
sentry_protos = "0.11.0"
sentry_protos = "0.16.1"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:169
  • src/upkeep.rs:569
  • src/upkeep.rs:596
  • src/upkeep.rs:623
  • src/upkeep.rs:675
  • src/upkeep.rs:716
  • src/upkeep.rs:722
  • src/upkeep.rs:1048
  • src/kafka/deserialize_raw.rs:242
  • src/kafka/deserialize_raw.rs:274
  • src/kafka/deserialize_raw.rs:322
  • src/grpc/server.rs:69
  • src/grpc/server.rs:213
  • src/test_utils.rs:423
  • src/test_utils.rs:435

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wtf

serde = "1.0.214"
serde_bytes = "0.11"
serde_yaml = "0.9.34"
Expand Down
2 changes: 1 addition & 1 deletion clients/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ readme = "README.md"
dependencies = [
"sentry-arroyo>=2.38.7",
"sentry-sdk[http2]>=2.43.0",
"sentry-protos>=0.10.0",
"sentry-protos>=0.15.0",
"confluent_kafka>=2.3.0",
"cronsim>=2.6",
"grpcio>=1.67.0",
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dev = [
"orjson>=3.10.10",
"protobuf>=5.28.3",
"pyyaml>=6.0.2",
"sentry-protos>=0.2.0",
"sentry-protos>=0.15.0",
"flake8>=7.3.0",
"isort>=5.13.2",
"mypy>=1.17.1",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dev = [
"orjson>=3.10.10",
"protobuf>=5.28.3",
"pyyaml>=6.0.2",
"sentry-protos>=0.11.0",
"sentry-protos>=0.15.0",
Comment thread
evanh marked this conversation as resolved.
"flake8>=7.3.0",
"isort>=5.13.2",
"mypy>=1.17.1",
Expand Down
10 changes: 5 additions & 5 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading