Skip to content

fix: Update to latest sentry-protos version#651

Merged
untitaker merged 4 commits into
mainfrom
evanh/fix/update-sentry-protos
May 28, 2026
Merged

fix: Update to latest sentry-protos version#651
untitaker merged 4 commits into
mainfrom
evanh/fix/update-sentry-protos

Conversation

@untitaker
Copy link
Copy Markdown
Member

No description provided.

@untitaker untitaker requested a review from a team as a code owner May 28, 2026 16:23
Comment thread pyproject.toml
Comment thread uv.lock
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread Cargo.lock Outdated
Comment thread Cargo.toml
"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

@untitaker untitaker merged commit 048c03f into main May 28, 2026
26 checks passed
@untitaker untitaker deleted the evanh/fix/update-sentry-protos branch May 28, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants