Repository navigation
fix(server): Forward-compatible AttachmentType - #1638
Conversation
| .take_item_by(|item| item.attachment_type() == Some(&AttachmentType::Breadcrumbs)); | ||
| let breadcrumbs2 = envelope | ||
| .take_item_by(|item| item.attachment_type() == Some(AttachmentType::Breadcrumbs)); | ||
| .take_item_by(|item| item.attachment_type() == Some(&AttachmentType::Breadcrumbs)); |
There was a problem hiding this comment.
AttachmentType is not Copy anymore, because one of its variants now contains a String.
iker-barriocanal
left a comment
There was a problem hiding this comment.
Why are we adding an Unknown(String) variant instead of a specific variant for the view hierarchy? Having a fallback unknown variant seems ok to me, but I wonder if it's the best solution for that specific case we're now trying to solve.
@iker-barriocanal we will add a specific variant for the view hierarchy in a different PR, so this PR actually won't help with the rollout of that new type. It only ensures that when we add attachment types in the future, envelopes will not be dropped by external Relays. |
As we did in #1246 for
ItemType, add anUnknown(String)variant toAttachmentType. Whenaccept_unknown_itemsis set to false, items with this attachment type will be dropped.This will allow outdated external Relays to forward new attachment types instead of dropping the entire envelope.
This defect was discovered in getsentry/rfcs#33, which introduces a new attachment type.