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

chore(monitoring): add 'is_alive' client #1862

Closed
wants to merge 1 commit into from

Conversation

Itay-Tsabary-Starkware
Copy link
Contributor

@Itay-Tsabary-Starkware Itay-Tsabary-Starkware commented Nov 6, 2024

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.54%. Comparing base (3fed084) to head (873c4f0).

Additional details and impacted files
@@                Coverage Diff                 @@
##           spr/main/837f4a70    #1862   +/-   ##
==================================================
  Coverage              54.54%   54.54%           
==================================================
  Files                      2        2           
  Lines                     55       55           
  Branches                  55       55           
==================================================
  Hits                      30       30           
  Misses                    25       25           

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

Copy link
Collaborator

@nadin-Starkware nadin-Starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @Itay-Tsabary-Starkware)


crates/monitoring_endpoint/src/test_utils.rs line 21 at r1 (raw file):

impl IsAliveClient {
    pub fn new(socket: SocketAddr) -> Self {
        let client = hyper::Client::new();

Please add it to the imports and use Client::new

Code quote:

 hyper::Client

crates/monitoring_endpoint/src/test_utils.rs line 30 at r1 (raw file):

        self.client
            .request(build_request(&self.socket.ip(), self.socket.port(), "alive"))

Use the const

Code quote:

"alive"

crates/monitoring_endpoint/src/test_utils.rs line 40 at r1 (raw file):

        while !(self.query_alive().await) {
            info!("Waiting for node to be alive: {}.", counter);
            tokio::time::sleep(Duration::from_secs(1)).await;

Same

Code quote:

tokio::time::sleep

Copy link
Collaborator

@nadin-Starkware nadin-Starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Itay-Tsabary-Starkware)

@Itay-Tsabary-Starkware
Copy link
Contributor Author

✓ Commit merged in pull request #1864

@github-actions github-actions bot locked and limited conversation to collaborators Nov 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants