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: replicator as package #64

Merged
merged 7 commits into from
Aug 4, 2023
Merged

Conversation

gk-kindred
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Aug 1, 2023

Codecov Report

Patch coverage: 2.79% and project coverage change: -3.16% ⚠️

Comparison is base (9c43ba7) 65.03% compared to head (b37978f) 61.88%.
Report is 1 commits behind head on master.

❗ Current head b37978f differs from pull request most recent head 252e55d. Consider uploading reports for the commit 252e55d to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #64      +/-   ##
==========================================
- Coverage   65.03%   61.88%   -3.16%     
==========================================
  Files          90       88       -2     
  Lines        4814     4909      +95     
==========================================
- Hits         3131     3038      -93     
- Misses       1683     1871     +188     
Files Changed Coverage Δ
packages/cohort_banking/src/app.rs 0.00% <0.00%> (ø)
...kages/cohort_banking/src/callbacks/oo_installer.rs 0.00% <0.00%> (ø)
...ges/cohort_banking/src/callbacks/state_provider.rs 0.00% <0.00%> (ø)
...cohort_banking/src/callbacks/statemap_installer.rs 0.00% <0.00%> (ø)
packages/cohort_banking/src/metrics.rs 0.00% <0.00%> (ø)
packages/cohort_banking/src/model/bank_account.rs 66.66% <ø> (ø)
packages/cohort_banking/src/model/requests.rs 91.66% <ø> (ø)
packages/cohort_banking/src/model/snapshot.rs 66.66% <ø> (ø)
packages/cohort_sdk/src/cohort.rs 0.00% <0.00%> (ø)
packages/cohort_sdk/src/delay_controller.rs 0.00% <0.00%> (ø)
... and 19 more

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gk-kindred gk-kindred marked this pull request as ready for review August 3, 2023 01:08
let pg_statemap_installer = StatemapInstallerImpl {
database: Arc::clone(&database),
max_retry: env_var_with_defaults!("BANK_STATEMAP_INSTALLER_MAX_RETRY", u32, 3),
retry_wait_ms: env_var_with_defaults!("BANK_STATEMAP_INSTALL_RETRY_WAIT_MS", u64, 2),
Copy link
Contributor

@fmarek-kindred fmarek-kindred Aug 4, 2023

Choose a reason for hiding this comment

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

the default as 2ms is too small. Should it be 2000?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

2ms on retry was installing it successfully on my machine. And as this is just an example, I didn't consider the scenario of deploy + test. When you test on your machine, if it takes more than 1 attempt, feel free to bump that value. But probably not 2000ms as that would impact our metrics.

Choose a reason for hiding this comment

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

2000ms between retry attempts (if I'm reading this right)? Seems a little excessive, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah, I am guessing that was a typo

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, I actually thought this setting is the max wait time for exponential wait-retry.

Comment on lines -8 to -25
async-trait = { workspace = true }
env_logger = { workspace = true }
log = { workspace = true }
futures = { version = "0.3.28" }
opentelemetry_api = { version = "0.19.0" }
opentelemetry_sdk = { version = "0.19.0", features = ["metrics", "rt-tokio"] }
opentelemetry = { version = "0.19.0" }
rand = { version = "0.8.5" }
rdkafka = { version = "0.33.0", features = ["sasl"] }
rdkafka-sys = { version = "4.3.0" }
serde = { workspace = true }
serde_json = { workspace = true }
strum = { version = "0.25", features = ["derive"] }
talos_agent = { path = "../talos_agent" }
talos_suffix = { path = "../talos_suffix" }
talos_certifier = { path = "../talos_certifier" }
talos_certifier_adapters = { path = "../talos_certifier_adapters" }
uuid = { version = "1.2.2", features = ["v4"] }
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not picky on this ones, but if it was aligned already why to destroy? :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh, I didn't notice the alignment, I think its the new toml VSCode extension I am using that auto formatted it.

Copy link
Contributor

@fmarek-kindred fmarek-kindred left a comment

Choose a reason for hiding this comment

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

Left some comments here and there but nothing critical really. Good work, mate! We might want to revisit -> Result<..., String> to become -> Result<..., XyzError>.

@gk-kindred
Copy link
Collaborator Author

Left some comments here and there but nothing critical really. Good work, mate! We might want to revisit -> Result<..., String> to become -> Result<..., XyzError>.

Yes, this will get handled with the PR that handles replicator error

@gk-kindred gk-kindred merged commit c23c658 into master Aug 4, 2023
2 checks passed
@gk-kindred gk-kindred deleted the feature/replicator-as-package branch August 4, 2023 12:19
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