Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add database tracking and report for Push Reliability #769

Merged
merged 15 commits into from
Oct 21, 2024

Conversation

jrconlin
Copy link
Member

@jrconlin jrconlin commented Sep 25, 2024

This PR introduces tracking throughput for the database.

It also introduces the PushReliability reporting skeleton. This will be
fleshed out with full reporting later.

Closes: #SYNC-4324

This PR introduces tracking throughput for the database.

It also introduces the PushReliability reporting skeleton. This will be
fleshed out with full reporting later.

Closes: #SYNC-4324
@@ -34,3 +34,5 @@ ctor.workspace = true
tokio.workspace = true

autoconnect_common = { workspace = true, features = ["test-support"] }

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these features will be used in the next PR.

@@ -310,7 +321,7 @@ mod tests {
#[test]
fn test_tracking_keys() -> ApiResult<()> {
let settings = Settings{
tracking_keys: r#"["BLMymkOqvT6OZ1o9etCqV4jGPkvOXNz5FdBjsAR9zR5oeCV1x5CBKuSLTlHon-H_boHTzMtMoNHsAGDlDB6X7vI"]"#.to_owned(),
tracking_keys: r#"["BLMymkOqvT6OZ1o9etCqV4jGPkvOXNz5FdBjsAR9zR5oeCV1x5CBKuSLTlHon-H_boHTzMtMoNHsAGDlDB6X7"]"#.to_owned(),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified to check for padding stripping.

Copy link
Contributor

@taddes taddes Oct 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this one have the "==" added to end as well, with exclusion of vI?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we were decoding the key from base64, yes. We're currently not doing that so just tweaking the string values to ensure that they match (with and without the padding) should be fine.

If we ever decide to decode these strings and do a byte comparison of the decoded pairs, then we would have to revisit this test, but that's out of scope for this PR.

@jrconlin jrconlin requested review from pjenvey and taddes September 25, 2024 23:33
jrconlin added a commit that referenced this pull request Sep 26, 2024
* This presumes that there's a redis like storage system that can record
  the state transitions of messages.
* function is hidden behind `reliable_report` feature flag
* Requires #769

Closes: SYNC-4419
@jrconlin jrconlin changed the title Feat/sync 4324 track db feat: Add database tracking and report for Push Reliability Sep 27, 2024
taddes
taddes previously requested changes Oct 1, 2024
Copy link
Contributor

@taddes taddes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks for the work on this. Some thoughts on adjustments

autoendpoint/src/routers/common.rs Outdated Show resolved Hide resolved
autoendpoint/src/extractors/subscription.rs Outdated Show resolved Hide resolved
autoendpoint/src/extractors/notification.rs Outdated Show resolved Hide resolved
autoconnect/autoconnect-common/src/protocol.rs Outdated Show resolved Hide resolved
autoendpoint/src/settings.rs Outdated Show resolved Hide resolved
@@ -310,7 +321,7 @@ mod tests {
#[test]
fn test_tracking_keys() -> ApiResult<()> {
let settings = Settings{
tracking_keys: r#"["BLMymkOqvT6OZ1o9etCqV4jGPkvOXNz5FdBjsAR9zR5oeCV1x5CBKuSLTlHon-H_boHTzMtMoNHsAGDlDB6X7vI"]"#.to_owned(),
tracking_keys: r#"["BLMymkOqvT6OZ1o9etCqV4jGPkvOXNz5FdBjsAR9zR5oeCV1x5CBKuSLTlHon-H_boHTzMtMoNHsAGDlDB6X7"]"#.to_owned(),
Copy link
Contributor

@taddes taddes Oct 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this one have the "==" added to end as well, with exclusion of vI?

tests/integration/test_integration_all_rust.py Outdated Show resolved Hide resolved
tests/integration/test_integration_all_rust.py Outdated Show resolved Hide resolved
tests/integration/test_integration_all_rust.py Outdated Show resolved Hide resolved
@jrconlin jrconlin requested a review from taddes October 17, 2024 22:14
autoendpoint/src/extractors/subscription.rs Outdated Show resolved Hide resolved
autoconnect/autoconnect-common/src/protocol.rs Outdated Show resolved Hide resolved
autoendpoint/src/extractors/subscription.rs Outdated Show resolved Hide resolved
autoendpoint/src/extractors/notification.rs Show resolved Hide resolved
autoendpoint/src/settings.rs Outdated Show resolved Hide resolved
stop unwrapping things.
autoendpoint/src/routers/webpush.rs Outdated Show resolved Hide resolved
@jrconlin jrconlin dismissed taddes’s stale review October 21, 2024 15:46

Changes made.

Copy link
Contributor

@taddes taddes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 great stuff, lgtm!

@jrconlin jrconlin merged commit e95063c into master Oct 21, 2024
1 check passed
@jrconlin jrconlin deleted the feat/SYNC-4324_track_db branch October 21, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants