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

Migrate supernode to use new config parser #12

Merged
merged 111 commits into from
Feb 12, 2024
Merged

Conversation

hamishcoleman
Copy link
Contributor

A number of documentation cleanups as well

Since the two supernode list variables are special cased, they dont get
the usual commented out but still present help output when their list is
empty.  This is confusing.

They still output their help text, if that level of output is requested.
This is also confusing.

They get strange blank lines after them.  This could be confusing.

Rather than trying to do three confusing things before breakfast, reduce
this confusion a little bit.  The least we can do is output a commented
out and empty version of the list.
By adding an initfunc to the random number generator, we can ensure that
the same init sequence is done on all apps.  This also helps to
modularise the random number code and reduce the number of headers
needed.
Since the supernode has a different set of defaults, the config dump is
actually different to that shown by the edge.  This cut-and-pastes the
debug config CLI sub commands from edge into supernode.
@hamishcoleman hamishcoleman self-assigned this Feb 12, 2024
@codecov-commenter
Copy link

codecov-commenter commented Feb 12, 2024

Codecov Report

Attention: 321 lines in your changes are missing coverage. Please review.

Comparison is base (37e4ff4) 43.48% compared to head (523bf1d) 40.57%.

Files Patch % Lines
apps/supernode.c 0.00% 110 Missing ⚠️
src/conffile.c 40.00% 87 Missing ⚠️
src/metrics.c 15.62% 27 Missing ⚠️
src/sn_utils.c 70.78% 26 Missing ⚠️
apps/edge.c 34.61% 17 Missing ⚠️
src/peer_info.c 56.25% 14 Missing ⚠️
src/management.c 0.00% 13 Missing ⚠️
src/n2n.c 50.00% 12 Missing ⚠️
src/random_numbers.c 75.00% 7 Missing ⚠️
src/edge_utils.c 72.72% 3 Missing ⚠️
... and 3 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #12      +/-   ##
==========================================
- Coverage   43.48%   40.57%   -2.91%     
==========================================
  Files          39       52      +13     
  Lines        5899     8959    +3060     
==========================================
+ Hits         2565     3635    +1070     
- Misses       3334     5324    +1990     

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

@hamishcoleman hamishcoleman merged commit b952ae7 into n42n:main Feb 12, 2024
32 checks passed
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.

2 participants