Page MenuHomePhabricator

[services] Rust Integration - Backup - Stop rethrowing in add attachments utility
AbandonedPublic

Authored by karol on Sep 1 2022, 11:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 26, 8:47 PM
Unknown Object (File)
Wed, Jun 26, 1:36 AM
Unknown Object (File)
Wed, Jun 26, 1:36 AM
Unknown Object (File)
Wed, Jun 26, 1:30 AM
Unknown Object (File)
Tue, Jun 25, 9:43 AM
Unknown Object (File)
May 26 2024, 8:15 PM
Unknown Object (File)
May 7 2024, 3:06 AM
Unknown Object (File)
May 2 2024, 12:47 PM

Details

Summary

Depends on D5027

Linear task: https://linear.app/comm/issue/ENG-1727/catch-stdexception-in-base-reactors

We started using rust, and we use functions that return Result. That Result is then converted into a std::exception in c++ when it returns Err. All over the place in the reactors we handle std::runtime_errors but we should go higher in the hierarchy and catch std::exceptions.

Here, I removed rethrowing in add attachments utility as it is caught in the base reactors (earlier in this stack).

Test Plan
cd services
yarn run-integration-tests backup

Works as before (of course, you have to start backup and blob services first).

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

karol retitled this revision from [services] Rust Integration - Backup - Stop rethrowing in add attachments reactor to [services] Rust Integration - Backup - Stop rethrowing in add attachments utility.Sep 2 2022, 12:01 AM
karol edited the summary of this revision. (Show Details)
karol edited the test plan for this revision. (Show Details)
karol added reviewers: tomek, max.
tomek requested changes to this revision.Sep 5 2022, 7:31 AM
tomek added inline comments.
services/backup/src/Reactors/server/AddAttachmentsUtility.cpp
53

Now status is set only once at the beginning of the function. This doesn't make too much sense and we can simplify the code.

This revision now requires changes to proceed.Sep 5 2022, 7:31 AM
karol added inline comments.
services/backup/src/Reactors/server/AddAttachmentsUtility.cpp
53

I just realized this should be abandoned as add att util doesn't inherit from reactors