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

Fully functional network scores #5048

Merged
merged 15 commits into from
Oct 28, 2024
Merged

Conversation

dynco-nym
Copy link
Contributor

@dynco-nym dynco-nym commented Oct 28, 2024

This change is Reviewable

- add clap to agent
- agent runs network probe
- /submit endpoint on NS API
- task that queues testruns periodically
- testruns read/write in DB
- testruns are assigned on API
- submit updates testruns correctly on NS API side
- agent registers with API
- agent submits results correctly
Copy link
Contributor

@octol octol left a comment

Choose a reason for hiding this comment

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

I mostly skimmed. If it works, let's plow ahead

Cargo.toml Outdated Show resolved Hide resolved
Copy link

vercel bot commented Oct 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-nextra ❌ Failed (Inspect) Oct 28, 2024 3:41pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
nym-explorer ⬜️ Ignored (Inspect) Visit Preview Oct 28, 2024 3:41pm
nym-next-explorer ⬜️ Ignored (Inspect) Visit Preview Oct 28, 2024 3:41pm

@@ -10,3 +10,6 @@ pub mod completions;

#[cfg(feature = "output_format")]
pub mod output_format;

#[cfg(feature = "models")]
pub mod models;
Copy link
Contributor

Choose a reason for hiding this comment

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

why did you put it in bin-common? it doesn't really feel like it belongs here. why would say nym-api or nym-client ever care about those models?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

why would say nym-api or nym-client ever care about those models?

if they don't, that's why I put it behind models

I needed a place from which both node-status-api and node-status-agent could pull a depending struct because i'd like to avoid having one of them depend on the other.

Can you show me a better place to put it?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd say create another common/<something> crate, I don't want bin-common getting polluted because it's meant to be for common things shared by runnable binaries: like build information, setting up logging, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, moved to a lib called common/models

explorer-api/explorer-client/src/lib.rs Show resolved Hide resolved
nym-node-status-agent/Cargo.toml Show resolved Hide resolved
nym-network-defaults = { git = "https://github.com/nymtech/nym", rev = "f86e08866" }
nym-validator-client = { git = "https://github.com/nymtech/nym", rev = "f86e08866" }
# TODO dz: before Nym API client breaking changes. Update to latest develop once new Nym API is live
nym-network-defaults = { git = "https://github.com/nymtech/nym", branch = "pre-dir-v2-fork" }
Copy link
Contributor

Choose a reason for hiding this comment

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

don't we have to update it to be compatible with magura asap?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need to deploy this to be available for Nym VPN clients ASAP-er

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, totally, I'm just wondering whether it's going to be compatible, but I guess all "old" clients (so this one would apply) should work

nym-node-status-api/migrations/000_init.sql Show resolved Hide resolved
nym-node-status-api/src/http/api/testruns.rs Show resolved Hide resolved
nym-node-status-api/src/monitor/mod.rs Show resolved Hide resolved
nym-node-status-api/src/testruns/mod.rs Outdated Show resolved Hide resolved
nym-node-status-api/src/testruns/mod.rs Outdated Show resolved Hide resolved
nym-node-status-api/src/testruns/mod.rs Show resolved Hide resolved
@dynco-nym dynco-nym merged commit 1c0b992 into dz-node-status-api Oct 28, 2024
17 of 19 checks passed
@dynco-nym dynco-nym deleted the dz-network-probe branch October 28, 2024 15:53
dynco-nym added a commit that referenced this pull request Oct 28, 2024
* Compile & copy wg probe

* Node status agent WIP

* Enable debug logging

* Agent submits results
- add clap to agent
- agent runs network probe
- /submit endpoint on NS API

* Build clients with timeouts

* Update logging and dev scripts

* Replace /blaclisted endpoint

* Testruns fully functional
- task that queues testruns periodically
- testruns read/write in DB

* Probe scores fully working
- testruns are assigned on API
- submit updates testruns correctly on NS API side
- agent registers with API
- agent submits results correctly

* Clippy fixes

* PR feedback

* Clippy again

* PR feedback

* Run clippy earlier in CI

* Make refresh delay configurable in server & agent
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.

3 participants