Skip to content

Commit

Permalink
chore: Split the user ingress artifacts and the artifacts coming from…
Browse files Browse the repository at this point in the history
… P2P (#3419)

The PR improves the API of the abortable broadcast crate.

```
ubuntu@devenv-container:/ic/rs/p2p/artifact_manager$ bazel test :all --runs_per_test=100 
INFO: Invocation ID: ae9b1dd3-3e96-4a1a-955b-fa628bf3de14
INFO: Analyzed 2 targets (0 packages loaded, 19 targets configured).
INFO: Found 1 target and 1 test target...
INFO: Elapsed time: 2.290s, Critical Path: 1.12s
INFO: 103 processes: 202 linux-sandbox.
INFO: Build completed successfully, 103 total actions
//rs/p2p/artifact_manager:artifact_manager_test                          PASSED in 0.1s
  Stats over 100 runs: max = 0.1s, min = 0.0s, avg = 0.0s, dev = 0.0s

```

---------

Co-authored-by: IDX GitHub Automation <infra+github-automation@dfinity.org>
  • Loading branch information
rumenov and IDX GitHub Automation authored Jan 15, 2025
1 parent 145aff3 commit 5cce4f5
Show file tree
Hide file tree
Showing 16 changed files with 185 additions and 71 deletions.
29 changes: 17 additions & 12 deletions Cargo.Bazel.Fuzzing.json.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"checksum": "befed3db2258ef5e97774c44951feb5c8ca098af84913123d4a8945afeac827c",
"checksum": "ee07bd5cde20eb057c9baa703b47a96ece7ed32714378e3b62f6cb2a1bde2d94",
"crates": {
"abnf 0.12.0": {
"name": "abnf",
Expand Down Expand Up @@ -19466,6 +19466,10 @@
"id": "tokio-socks 0.5.2",
"target": "tokio_socks"
},
{
"id": "tokio-stream 0.1.17",
"target": "tokio_stream"
},
{
"id": "tokio-test 0.4.4",
"target": "tokio_test"
Expand Down Expand Up @@ -46328,7 +46332,7 @@
"target": "tokio"
},
{
"id": "tokio-stream 0.1.16",
"id": "tokio-stream 0.1.17",
"target": "tokio_stream"
}
],
Expand Down Expand Up @@ -46443,7 +46447,7 @@
"target": "tokio"
},
{
"id": "tokio-stream 0.1.16",
"id": "tokio-stream 0.1.17",
"target": "tokio_stream"
},
{
Expand Down Expand Up @@ -73314,7 +73318,7 @@
"target": "tokio"
},
{
"id": "tokio-stream 0.1.16",
"id": "tokio-stream 0.1.17",
"target": "tokio_stream"
}
],
Expand Down Expand Up @@ -73680,14 +73684,14 @@
],
"license_file": "LICENSE"
},
"tokio-stream 0.1.16": {
"tokio-stream 0.1.17": {
"name": "tokio-stream",
"version": "0.1.16",
"version": "0.1.17",
"package_url": "https://github.com/tokio-rs/tokio",
"repository": {
"Http": {
"url": "https://static.crates.io/crates/tokio-stream/0.1.16/download",
"sha256": "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1"
"url": "https://static.crates.io/crates/tokio-stream/0.1.17/download",
"sha256": "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047"
}
},
"targets": [
Expand Down Expand Up @@ -73735,7 +73739,7 @@
"selects": {}
},
"edition": "2021",
"version": "0.1.16"
"version": "0.1.17"
},
"license": "MIT",
"license_ids": [
Expand Down Expand Up @@ -73791,7 +73795,7 @@
"target": "tokio"
},
{
"id": "tokio-stream 0.1.16",
"id": "tokio-stream 0.1.17",
"target": "tokio_stream"
}
],
Expand Down Expand Up @@ -74294,7 +74298,7 @@
"target": "tokio"
},
{
"id": "tokio-stream 0.1.16",
"id": "tokio-stream 0.1.17",
"target": "tokio_stream"
},
{
Expand Down Expand Up @@ -76524,7 +76528,7 @@
"target": "tokio"
},
{
"id": "tokio-stream 0.1.16",
"id": "tokio-stream 0.1.17",
"target": "tokio_stream"
},
{
Expand Down Expand Up @@ -87593,6 +87597,7 @@
"tokio-rustls 0.26.0",
"tokio-serde 0.8.0",
"tokio-socks 0.5.2",
"tokio-stream 0.1.17",
"tokio-test 0.4.4",
"tokio-util 0.7.13",
"toml 0.5.11",
Expand Down
5 changes: 3 additions & 2 deletions Cargo.Bazel.Fuzzing.toml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3262,6 +3262,7 @@ dependencies = [
"tokio-rustls 0.26.0",
"tokio-serde",
"tokio-socks",
"tokio-stream",
"tokio-test",
"tokio-util",
"toml",
Expand Down Expand Up @@ -11421,9 +11422,9 @@ dependencies = [

[[package]]
name = "tokio-stream"
version = "0.1.16"
version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1"
checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047"
dependencies = [
"futures-core",
"pin-project-lite",
Expand Down
29 changes: 17 additions & 12 deletions Cargo.Bazel.json.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"checksum": "16c350a57ca08666035e4f0e31f17c9715860d84ed6755b026870a84de503a09",
"checksum": "af5e4debd1243293865e30a9b64a67f317d54d2087da3adf9fd816ffdd8b1262",
"crates": {
"abnf 0.12.0": {
"name": "abnf",
Expand Down Expand Up @@ -19294,6 +19294,10 @@
"id": "tokio-socks 0.5.2",
"target": "tokio_socks"
},
{
"id": "tokio-stream 0.1.17",
"target": "tokio_stream"
},
{
"id": "tokio-test 0.4.4",
"target": "tokio_test"
Expand Down Expand Up @@ -46135,7 +46139,7 @@
"target": "tokio"
},
{
"id": "tokio-stream 0.1.16",
"id": "tokio-stream 0.1.17",
"target": "tokio_stream"
}
],
Expand Down Expand Up @@ -46250,7 +46254,7 @@
"target": "tokio"
},
{
"id": "tokio-stream 0.1.16",
"id": "tokio-stream 0.1.17",
"target": "tokio_stream"
},
{
Expand Down Expand Up @@ -73160,7 +73164,7 @@
"target": "tokio"
},
{
"id": "tokio-stream 0.1.16",
"id": "tokio-stream 0.1.17",
"target": "tokio_stream"
}
],
Expand Down Expand Up @@ -73526,14 +73530,14 @@
],
"license_file": "LICENSE"
},
"tokio-stream 0.1.16": {
"tokio-stream 0.1.17": {
"name": "tokio-stream",
"version": "0.1.16",
"version": "0.1.17",
"package_url": "https://github.com/tokio-rs/tokio",
"repository": {
"Http": {
"url": "https://static.crates.io/crates/tokio-stream/0.1.16/download",
"sha256": "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1"
"url": "https://static.crates.io/crates/tokio-stream/0.1.17/download",
"sha256": "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047"
}
},
"targets": [
Expand Down Expand Up @@ -73581,7 +73585,7 @@
"selects": {}
},
"edition": "2021",
"version": "0.1.16"
"version": "0.1.17"
},
"license": "MIT",
"license_ids": [
Expand Down Expand Up @@ -73637,7 +73641,7 @@
"target": "tokio"
},
{
"id": "tokio-stream 0.1.16",
"id": "tokio-stream 0.1.17",
"target": "tokio_stream"
}
],
Expand Down Expand Up @@ -74140,7 +74144,7 @@
"target": "tokio"
},
{
"id": "tokio-stream 0.1.16",
"id": "tokio-stream 0.1.17",
"target": "tokio_stream"
},
{
Expand Down Expand Up @@ -76370,7 +76374,7 @@
"target": "tokio"
},
{
"id": "tokio-stream 0.1.16",
"id": "tokio-stream 0.1.17",
"target": "tokio_stream"
},
{
Expand Down Expand Up @@ -87472,6 +87476,7 @@
"tokio-rustls 0.26.0",
"tokio-serde 0.8.0",
"tokio-socks 0.5.2",
"tokio-stream 0.1.17",
"tokio-test 0.4.4",
"tokio-util 0.7.13",
"toml 0.5.11",
Expand Down
5 changes: 3 additions & 2 deletions Cargo.Bazel.toml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3251,6 +3251,7 @@ dependencies = [
"tokio-rustls 0.26.0",
"tokio-serde",
"tokio-socks",
"tokio-stream",
"tokio-test",
"tokio-util",
"toml",
Expand Down Expand Up @@ -11417,9 +11418,9 @@ dependencies = [

[[package]]
name = "tokio-stream"
version = "0.1.16"
version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1"
checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047"
dependencies = [
"futures-core",
"pin-project-lite",
Expand Down
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@ tokio-metrics = "0.4.0"
tokio-rustls = { version = "0.26.0", default-features = false, features = [
"ring",
] }
tokio-stream = "0.1.17"
tokio-test = "0.4.4"
tokio-util = { version = "0.7.13", features = ["full"] }
tonic = "0.12.3"
Expand Down
3 changes: 3 additions & 0 deletions bazel/external_crates.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1296,6 +1296,9 @@ def external_crates_repository(name, cargo_lockfile, lockfile, sanitizers_enable
"ring",
],
),
"tokio-stream": crate.spec(
version = "^0.1.17",
),
"tokio-serde": crate.spec(
version = "^0.8",
features = [
Expand Down
2 changes: 2 additions & 0 deletions rs/p2p/artifact_manager/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ DEPENDENCIES = [
"//rs/interfaces",
"//rs/monitoring/metrics",
"//rs/types/types",
"@crate_index//:futures",
"@crate_index//:prometheus",
"@crate_index//:tokio",
"@crate_index//:tokio-stream",
"@crate_index//:tracing",
]

Expand Down
2 changes: 2 additions & 0 deletions rs/p2p/artifact_manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ documentation.workspace = true
ic-interfaces = { path = "../../interfaces" }
ic-metrics = { path = "../../monitoring/metrics" }
ic-types = { path = "../../types/types" }
futures = { workspace = true }
prometheus = { workspace = true }
tokio = { workspace = true }
tokio-stream = { workspace = true }
tracing = { workspace = true }

[dev-dependencies]
Expand Down
Loading

0 comments on commit 5cce4f5

Please sign in to comment.