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(node): allow user to set the metrics server port #849

Merged
merged 2 commits into from Oct 20, 2023

Conversation

RolandSherwin
Copy link
Member

@RolandSherwin RolandSherwin commented Oct 18, 2023

Description

Summary generated by Reviewpad on 18 Oct 23 14:45 UTC

This pull request includes the following changes:

  • In the file diff for sn_node/src/network_builder.rs, a new field metrics_server_port has been introduced in the NetworkBuilder struct. The field has a default value of 0, and a new method metrics_server_port has been implemented to set the value of this field.

  • The file sn_node/src/main.rs has undergone changes, including the addition of the metrics_server_port field in the Opt struct, allowing users to specify the port for the OpenMetrics Server. The main() function now creates a NodeBuilder instance and sets the metrics_server_port if the "open-metrics" feature flag is enabled. The function start_node() has been renamed to run_node() and now accepts a NodeBuilder instance instead of individual parameters. Lastly, the run_node() function uses the NodeBuilder instance to build and run the node.

  • The file sn_node/src/put_validation.rs has been modified to reorganize the import statements by moving TRANSFER_NOTIF_TOPIC to the correct module. Some references to the Node struct have been updated, and an extra comma has been removed.

  • The file sn_node/src/replication.rs has been updated with changes to import statements. The import statement for Node has been modified from crate::Node to crate::node::Node, and the import statement for libp2p has been updated to include kad::{Record, RecordKey, K_VALUE}. Additionally, the import statements for Result and Marker have been removed.

  • The file sn_node/src/metrics_service.rs includes changes to the run_metrics_server function, which now accepts an additional parameter port of type u16. The line let addr = ([0, 0, 0, 0], 0).into(); has also been modified to let addr = ([0, 0, 0, 0], port).into();.

  • The file sn_node/src/lib.rs has undergone multiple changes, including the removal of the api module and the addition of the node module. Module imports have been reordered and use statements have been updated. The Node struct has been renamed to RunningNode, and the events_channel field of the RunningNode struct has been renamed to node_events_channel. Additionally, implementations for methods in the RunningNode struct have been added.

  • The file sn_node/src/storecost.rs has been deleted, as it contained code related to getting the local store cost in the Node struct.

These changes introduce new features, improve organization and clarity of the code, and address import statement updates and function modifications.

Let me know if you need any further assistance!

@reviewpad reviewpad bot requested a review from joshuef October 18, 2023 14:45
@reviewpad reviewpad bot added Large Large sized PR waiting-for-review labels Oct 18, 2023
@reviewpad
Copy link

reviewpad bot commented Oct 18, 2023

Reviewpad Report

‼️ Errors

  • Unconventional commit detected: 'refactor(node)!: use NodeBuilder to construct and run node
  • also only expose RunningNode to the public API' (757285c)

@RolandSherwin RolandSherwin added this pull request to the merge queue Oct 19, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 19, 2023
@RolandSherwin RolandSherwin added this pull request to the merge queue Oct 19, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 19, 2023
@RolandSherwin RolandSherwin added this pull request to the merge queue Oct 19, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 19, 2023
@RolandSherwin RolandSherwin added this pull request to the merge queue Oct 19, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 19, 2023
@RolandSherwin RolandSherwin added this pull request to the merge queue Oct 20, 2023
@joshuef joshuef removed this pull request from the merge queue due to a manual request Oct 20, 2023
@joshuef joshuef merged commit 421ddb3 into maidsafe:main Oct 20, 2023
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Large Large sized PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants