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(p2p): regression after entrypoint refactor #1088

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

jansegre
Copy link
Member

@jansegre jansegre commented Jul 19, 2024

Motivation

#1086 introduced a regression as can be seen in the failed docker build, during the image test

Acceptance Criteria

  • Entrypoint.peer_id should default to None (mypy didn't catch this)
  • defer.gatherResults had to be chained before passing it to set
  • ProtocolMessages.PEERS data was being constructed with Entrypoint objects, which can't be used in json.dumps, it needed to be converted to str
  • Adjust PeerId.__str__ so it uses str(entrypoint) instead of repr(entrypoint) to keep it less verbose
  • Add tests that cover all the lines that have errors

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@jansegre jansegre self-assigned this Jul 19, 2024
@jansegre jansegre requested a review from msbrogli as a code owner July 19, 2024 01:16
@jansegre jansegre requested a review from glevco July 19, 2024 01:16
Copy link

codecov bot commented Jul 19, 2024

Codecov Report

Attention: Patch coverage is 84.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 85.10%. Comparing base (eb74c11) to head (835b227).
Report is 1 commits behind head on master.

Files Patch % Lines
hathor/p2p/peer_discovery/dns.py 90.47% 2 Missing ⚠️
hathor/p2p/peer_id.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1088      +/-   ##
==========================================
+ Coverage   84.98%   85.10%   +0.11%     
==========================================
  Files         310      310              
  Lines       23495    23506      +11     
  Branches     3549     3551       +2     
==========================================
+ Hits        19968    20005      +37     
+ Misses       2824     2799      -25     
+ Partials      703      702       -1     

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

@jansegre jansegre force-pushed the fix/entrypoint-regression branch from a490159 to 835b227 Compare July 19, 2024 22:40
@jansegre jansegre force-pushed the fix/entrypoint-regression branch from 835b227 to 0a76090 Compare July 22, 2024 19:25
@jansegre jansegre merged commit b98b938 into master Jul 22, 2024
@jansegre jansegre deleted the fix/entrypoint-regression branch July 22, 2024 19:25
This was referenced Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants