Page MenuHomePhabricator

[services] Backup - add Database Manager base
ClosedPublic

Authored by karol on Feb 3 2022, 6:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 24, 11:41 PM
Unknown Object (File)
Tue, Apr 23, 6:09 PM
Unknown Object (File)
Tue, Apr 23, 6:09 PM
Unknown Object (File)
Tue, Apr 23, 6:09 PM
Unknown Object (File)
Tue, Apr 23, 6:09 PM
Unknown Object (File)
Tue, Apr 23, 6:09 PM
Unknown Object (File)
Tue, Apr 23, 6:03 PM
Unknown Object (File)
Mon, Apr 22, 12:40 PM

Details

Summary

Base/inner functions for the database manager. This diff may be beneficial for this task https://linear.app/comm/issue/ENG-324/avoid-repetitions-in-services-code because this is the mutual code that may be put in a separate place.

Depends on D3081

Test Plan
cd services
yarn run-backup-service

Still builds

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

karol edited the summary of this revision. (Show Details)
karol edited the test plan for this revision. (Show Details)
karol added reviewers: tomek, max, varun.

I guess this code was tested with later diffs, but it would be nice if test plan was not just . for arc to allow creating a diff, but some explanation. Even if it's hard to test a diff in isolation (which we should aim for), we can describe which parts of the whole testing procedure specifically verified the given diff.

This revision is now accepted and ready to land.Feb 7 2022, 3:10 AM
This revision now requires review to proceed.Feb 7 2022, 3:10 AM
ashoat requested changes to this revision.Feb 7 2022, 9:45 AM

I agree – the test plan should always be included. In my most recent stack (React Native upgrade) I had a test plan that I copy-pasted for many of the diffs, but for each diff I thought about the test plan. In many cases I specified something more specific than the copy-paste, and only used the copy-paste when it actually applied.

services/backup/docker-server/contents/server/src/DatabaseManager.h
56 ↗(On Diff #9212)

I thought we had concluded that this is an anti-pattern? We don't have to prioritize removing all of the current cases, but we should avoid introducing new ones

This revision now requires changes to proceed.Feb 7 2022, 9:45 AM
tomek added inline comments.
services/backup/docker-server/contents/server/src/DatabaseManager.h
56 ↗(On Diff #9365)
ashoat requested changes to this revision.Feb 8 2022, 8:14 PM

My feedback that I requested changes for above was not addressed

This revision now requires changes to proceed.Feb 8 2022, 8:14 PM

Sorry about not addressing the comments.

So the main problem here is the test plan. I'm not really sure what I could do as a test for this change. There are just some template functions. Once they're used in some specialized examples, it will be easier to come up with a testing plan for them.
The reason I didn't put a test plan at all is I couldn't see any other way to test this but just to check if it builds successfully. And I assumed that is concluded automatically by putting a diff up.
Will it suffice to write in the test plan something like this?

cd services
yarn run-backup-service

Still builds

Otherwise I don't really know what to put there.

services/backup/docker-server/contents/server/src/DatabaseManager.h
56 ↗(On Diff #9365)

Right, thanks.

karol edited the test plan for this revision. (Show Details)
karol edited the summary of this revision. (Show Details)

remove redundant std::move

That test plan is certainly better than nothing :)

I think some of the DynamoDB stuff would need to be tested, but hoping/assuming that gets handled down the line.

This revision is now accepted and ready to land.Feb 9 2022, 9:34 PM

Database tests are coming in the future diffs.