Page MenuHomePhabricator

[services] Backup - Move reactors' implementations to source files
ClosedPublic

Authored by karol on Apr 19 2022, 5:11 AM.
Tags
None
Referenced Files
F2190689: D3780.id11796.diff
Thu, Jul 4, 12:10 PM
Unknown Object (File)
Wed, Jul 3, 9:15 PM
Unknown Object (File)
Tue, Jul 2, 1:56 PM
Unknown Object (File)
Mon, Jul 1, 8:20 AM
Unknown Object (File)
Sun, Jun 30, 5:03 PM
Unknown Object (File)
Sat, Jun 29, 10:23 PM
Unknown Object (File)
Wed, Jun 26, 9:27 AM
Unknown Object (File)
Wed, Jun 26, 9:27 AM

Details

Summary

Depends on D3779

https://linear.app/comm/issue/ENG-917/try-to-move-reactors-implementations-to-cpp-files

Moving reactors' implementations to the source files.

Test Plan
cd services
yarn run-backup-server

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

karol edited the test plan for this revision. (Show Details)
karol added a reviewer: tomek.
ashoat added a subscriber: jim.

I'm confused because there is a lot of red in the diff, but not a lot of green. But the diff says it is moving stuff. Where is the stuff getting moved to? I should see some green in a .cpp file, right?

services/backup/CMakeLists.txt
39–44 ↗(On Diff #11608)

@jimpo is there a better way to do this?

tomek requested changes to this revision.EditedApr 21 2022, 9:18 AM

Agree with @ashoat - the disproportion is concerning. Could you explain what's going on?

Edit: it's just due to how Phabricator displays this diff. When a file is split, it shows it twice:

  1. In the source, all the code that stays is white and the code that is moved is red
  2. In the destination, it shows moved code in white

The 2nd is confusing, but it happens because Phabricator "thinks" that the code was copied from somewhere, so it shows the original content in white. So every white code in .cpp should be green

This revision now requires changes to proceed.Apr 21 2022, 9:18 AM

Nice! I like the fact that you spend time cleaning the imports after this refactoring

services/backup/src/Reactors/client/blob/BlobAppendHolderClientReactor.h
10 ↗(On Diff #11715)

Why do we need to add an import? The amount of code decreased, so the number of imports shouldn't grow, right?

This revision now requires review to proceed.Apr 21 2022, 9:27 AM

rebase in progress

In D3780#105381, @palys-swm wrote:

Agree with @ashoat - the disproportion is concerning. Could you explain what's going on?

Edit: it's just due to how Phabricator displays this diff. When a file is split, it shows it twice:

  1. In the source, all the code that stays is white and the code that is moved is red
  2. In the destination, it shows moved code in white

The 2nd is confusing, but it happens because Phabricator "thinks" that the code was copied from somewhere, so it shows the original content in white. So every white code in .cpp should be green

Thanks for clarifying!

Another rebase in progress

Highlighting my question for @jimpo again (@karol-bisztyga feel free to ping him if no response)

services/backup/CMakeLists.txt
39–44 ↗(On Diff #11796)

@jimpo is there a better way to do this?

karol added inline comments.
services/backup/CMakeLists.txt
39–44 ↗(On Diff #11796)

we can use GLOB_RECURSE

ashoat added a reviewer: ashoat. ashoat removed 1 blocking reviewer(s): jim.

Awesome

This revision is now accepted and ready to land.Apr 25 2022, 9:46 AM