ref(managed): Implement Managed::zip function#6174
Conversation
cd5bb4a to
10a6fe8
Compare
|
@Dav1dde Please take a look at this implementation for the zip function. Thanks! |
|
@pierceroberts you will have to fix the title, you can see the error
|
|
|
@olksdr I fixed the failing pipeline. I did add the log to the unreleased section. Let me know if I need to move that. Thanks! |
|
MIght be a flaky test in the integration test suit: If it passes, Should I create an issue for it? |
| - Use dedicated secret to sign upload URLs. ([#6132](https://github.com/getsentry/relay/pull/6132)) | ||
| - Inline small attachments instead of uploading to objectstore. ([#6165](https://github.com/getsentry/relay/pull/6165)) | ||
| - Retry 500 responses from objectstore. ([#6162](https://github.com/getsentry/relay/pull/6162)) | ||
| - Implement Managed::zip function. ([#6174](https://github.com/getsentry/relay/pull/6174)) |
There was a problem hiding this comment.
Can remove the changelog now, added the skip-changelog label
| ) -> Result<Managed<Box<Envelope>>, BadStoreRequest> { | ||
| let event_id = common::event_id_from_items(&items) | ||
| .reject2(&items, &managed_err)? | ||
| let merged = Managed::zip(managed_err, items); |
There was a problem hiding this comment.
This can be simplified to:
Managed::zip(managed_err, items).try_map(|(_, items), _| {
let event_id = common::event_id_from_items(&items)?.unwrap_or_default();
let envelope = Envelope::from_request(Some(event_id), meta).with_items(items);
Ok::<_, BadStoreRequest>(Box::new(envelope))
})Which then we might as well inline and we can drop the helper.
Relates to #5985.
And implements: #6088
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.