Page MenuHomePhabricator

[services] Tunnelbroker - Changes to handle empty `message_id` inside the Rust `send_by_fcm_client` function
AbandonedPublic

Authored by max on Sep 6 2022, 6:51 AM.
Tags
None
Referenced Files
F4096521: D5067.diff
Sun, Feb 16, 10:48 PM
Unknown Object (File)
Tue, Jan 28, 3:43 AM
Unknown Object (File)
Jan 12 2025, 12:01 AM
Unknown Object (File)
Jan 9 2025, 7:00 AM
Unknown Object (File)
Jan 5 2025, 11:09 AM
Unknown Object (File)
Jan 5 2025, 11:09 AM
Unknown Object (File)
Dec 15 2024, 10:17 AM
Unknown Object (File)
Dec 15 2024, 10:16 AM

Details

Summary

This diff introduces following changes to the Rust send_by_fcm_client function:

  • As we don't use message_id anywhere at the upper level we should not return it;
  • Properly handling errors by checking the results vector instead of the upper level only.

Related Linear task: ENG-1740

Test Plan
  1. Successfully built using Docker.
  2. Successfully call the function from C++:
#include "cxxbridge_code/src/lib.rs.h"
#include "rust/cxx.h
...
const std::string server_key = argv[1];
const std::string device_token = argv[2];
const std::string message_title = argv[3];
const std::string message_body = argv[4];
sendNotifToFCM(server_key, device_token, message_title, message_body);

Diff Detail

Repository
rCOMM Comm
Branch
void-for-fcm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

max held this revision as a draft.
max published this revision for review.Sep 6 2022, 6:57 AM
max edited the summary of this revision. (Show Details)
max edited the test plan for this revision. (Show Details)
max added reviewers: karol, tomek, varun.

We really need to get a test suite going, these test plans should just be a CI check

Abandon due to ENG-1764: Distinguish common and wrong/expired device token errors in Rust notification library.