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

fix: Handle peers with zero messages when printing status #1008

Merged
merged 2 commits into from
Jun 5, 2023

Conversation

sanjayprabhu
Copy link
Contributor

@sanjayprabhu sanjayprabhu commented Jun 5, 2023

Motivation

yarn status is printing NaN because there's hub with 0 messages in the network right now.

Change Summary

Describe the changes being made in 1-2 concise sentences.

Merge Checklist

Choose all relevant options below by adding an x now or at any time before submitting for review

Additional Context

If this is a relatively large or complex change, provide more details here that will help reviewers


PR-Codex overview

This PR adds a patch to handle peers with no messages in the status command of the @farcaster/hubble package.

Detailed summary

  • Added a conditional statement to skip peers with no messages in the cli.ts file.
  • Calculated message percentage for each peer and pushed it to the msgPercents array.
  • No other notable changes were made.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@changeset-bot
Copy link

changeset-bot bot commented Jun 5, 2023

🦋 Changeset detected

Latest commit: 0542a44

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@farcaster/hubble Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov
Copy link

codecov bot commented Jun 5, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (c6fc422) 74.75% compared to head (0542a44) 74.75%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1008   +/-   ##
=======================================
  Coverage   74.75%   74.75%           
=======================================
  Files          69       69           
  Lines        6449     6449           
  Branches     1546     1546           
=======================================
  Hits         4821     4821           
  Misses       1530     1530           
  Partials       98       98           

see 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sanjayprabhu sanjayprabhu merged commit 6667748 into farcasterxyz:main Jun 5, 2023
@sanjayprabhu sanjayprabhu deleted the fix_status_nan branch June 5, 2023 22:10
bhgomes pushed a commit to bhgomes/farcasterxyz-hub-monorepo that referenced this pull request Jun 15, 2023
…yz#1008)

* fix: Handle peers with zero messages when printing status

* Add changeset
bhgomes pushed a commit to bhgomes/farcasterxyz-hub-monorepo that referenced this pull request Jun 15, 2023
…yz#1008)

* fix: Handle peers with zero messages when printing status

* Add changeset
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.

1 participant