Page MenuHomePhabricator

[services] Tests - Backup - Add dynamoDB item size limit
AbandonedPublic

Authored by karol on Jun 22 2022, 3:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 6:56 PM
Unknown Object (File)
Sun, Nov 10, 12:33 PM
Unknown Object (File)
Sat, Nov 9, 4:19 AM
Unknown Object (File)
Tue, Oct 29, 5:25 AM
Unknown Object (File)
Thu, Oct 24, 5:48 AM
Unknown Object (File)
Tue, Oct 22, 2:57 PM
Unknown Object (File)
Fri, Oct 18, 9:43 PM
Unknown Object (File)
Oct 15 2024, 2:00 AM

Details

Reviewers
tomek
varun
ashoat
Summary

Depends on D4324

linear task: https://linear.app/comm/issue/ENG-1288/properly-handle-the-dynamodb-item-size-limit

Adding the same limit as in the previous diff, here, in tests.

Test Plan

-

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

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

I don't feel confident reviewing Rust :(

tomek requested changes to this revision.Jun 23 2022, 6:44 AM
tomek added inline comments.
services/commtest/tests/lib/tools.rs
24–27

Why do we use a function here?

This revision now requires changes to proceed.Jun 23 2022, 6:44 AM
services/commtest/tests/lib/tools.rs
24–27

I wrapped this into a function because I had problems with having it as a variable. const will not work because of the as_u64 which is done in the runtime.

services/commtest/tests/lib/tools.rs
24–27

Sure, const won't work as this value can't be computed in compile time, but maybe we can use let - which is also immutable

karol added inline comments.
services/commtest/tests/lib/tools.rs
24–27

let will not work for the global vars like this. Neither will static (same errors as const)

tomek requested changes to this revision.Jun 30 2022, 6:34 AM
tomek added inline comments.
services/commtest/tests/lib/tools.rs
24–27
This revision now requires changes to proceed.Jun 30 2022, 6:34 AM

In an ideal world, the diff reviewer does not end up having to do research like that – it's on the diff author to Google and figure out best practices in response to a request by the diff reviewer

I think it would be a lot better to use lazy_static from the beginning instead of introducing a function and then replacing it with a static. Is there a reason behind choosing the opposite strategy?

This revision is now accepted and ready to land.Jul 1 2022, 7:33 AM

It's all done in D4425 this can be abandoned