Depends on D5034
In order to be able to handle multiple connections at the same time, we have to store a collection of clients in the rust state instead of having just one.
Here, I'm adding the collection to the put blob client.
Paths
| Differential D5035 Authored by • karol on Sep 2 2022, 3:52 AM.
Details Summary Depends on D5034 In order to be able to handle multiple connections at the same time, we have to store a collection of clients in the rust state instead of having just one. Here, I'm adding the collection to the put blob client. Test Plan The backup service will not build successfully because of invalid calls from the c++ but I decided to divide the code so the diffs are not too big. This is fixed in the next diff in the stack - D5036 This will work: cd services/backup/blob_client cargo check
Diff Detail
Event TimelineHerald added a reviewer: • jon. · View Herald TranscriptSep 2 2022, 3:52 AM2022-09-02 03:52:11 (UTC-7) Harbormaster returned this revision to the author for changes because remote builds failed.Sep 2 2022, 3:55 AM2022-09-02 03:55:56 (UTC-7) • karol added a parent revision: D5034: [services] Rust Integration - Backup - Rust - Add converting functions. • karol added a child revision: D5036: [services] Rust Integration - Backup - c++ - Multiple put clients. Comment ActionsBackup doesn't build but this is explained in the test plan section. Comment Actions Overall this might work but it seems like having a pool of clients and a queue with tasks could be a better solution.
This revision now requires changes to proceed.Sep 5 2022, 7:58 AM2022-09-05 07:58:57 (UTC-7)
Harbormaster failed remote builds in B11921: Diff 16367!Sep 6 2022, 7:13 AM2022-09-06 07:13:30 (UTC-7) Comment Actions I don't think an approach where every function takes the same parameter is a maintainable one. If all the functions share the same context, we should probably make this context a field of a struct and implement all the functions as methods of this struct. Is it possible to do something like that in cxx?
This revision now requires changes to proceed.Sep 7 2022, 6:10 AM2022-09-07 06:10:16 (UTC-7) Harbormaster failed remote builds in B12014: Diff 16496!Sep 8 2022, 6:30 AM2022-09-08 06:30:23 (UTC-7) tomek added inline comments.
This revision now requires changes to proceed.Sep 9 2022, 4:34 AM2022-09-09 04:34:22 (UTC-7)
• karol mentioned this in D5099: [services] Backup - Blob Get Client - Pass rust string instead of const char*. • karol added inline comments.
Comment Actions The CI reported some compilation issues
This revision now requires changes to proceed.Sep 13 2022, 7:16 AM2022-09-13 07:16:08 (UTC-7)
Harbormaster failed remote builds in B12130: Diff 16652!Sep 14 2022, 1:23 AM2022-09-14 01:23:24 (UTC-7) Comment Actions would really like for this to be rebased, the Arc usage for the other lazy_static items has been removed on master, and would like to avoid potentially adding them back. This revision now requires changes to proceed.Sep 14 2022, 10:48 AM2022-09-14 10:48:52 (UTC-7) Harbormaster failed remote builds in B12157: Diff 16685!Sep 15 2022, 1:30 AM2022-09-15 01:30:50 (UTC-7) Comment Actions Btw, if that was the only concern I think you could just accept it, rebasing to master was pretty easy and straightforward and would enable landing some diffs already reducing cycles. This revision is now accepted and ready to land.Sep 15 2022, 4:23 PM2022-09-15 16:23:39 (UTC-7) This revision was landed with ongoing or failed builds.Sep 16 2022, 1:54 AM2022-09-16 01:54:52 (UTC-7) Closed by commit rCOMM1a07b32b94a7: [services] Rust Integration - Backup - Rust - Multiple put clients (authored by • karol). · Explain Why This revision was automatically updated to reflect the committed changes. Harbormaster failed remote builds in B12201: Diff 16736!Sep 16 2022, 1:56 AM2022-09-16 01:56:42 (UTC-7) Comment Actions Not sure what happened here, but according to CI
We should (almost) never land anything with failed builds!
Revision Contents
Diff 16234 services/backup/blob_client/src/get_client.rs
services/backup/blob_client/src/lib.rs
services/backup/blob_client/src/put_client.rs
|
The red background shows the TouchableOpacity:
I think it would be a be a better user experience if we had the entire item be a touchable instead of just the avatar/username