rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 heartwood0b3b8ee5e19d9d05a746ee92672c35794628ddaf
{
"request": "trigger",
"version": 1,
"event_type": "patch",
"repository": {
"id": "rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5",
"name": "heartwood",
"description": "Radicle Heartwood Protocol & Stack",
"private": false,
"default_branch": "master",
"delegates": [
"did:key:z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT",
"did:key:z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW",
"did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"did:key:z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz",
"did:key:z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz"
]
},
"action": "Created",
"patch": {
"id": "223e55753b8b859f263ab03471b003f379819f1a",
"author": {
"id": "did:key:z6Mku8hpprWTmCv3BqkssCYDfr2feUdyLSUnycVajFo9XVAx",
"alias": "levitte"
},
"title": "cli: Add 'rad node inventory --nid <nid>'",
"state": {
"status": "merged",
"conflicts": []
},
"before": "d9c76893a144fd787654613f2bfb919613014a71",
"after": "0b3b8ee5e19d9d05a746ee92672c35794628ddaf",
"commits": [
"0b3b8ee5e19d9d05a746ee92672c35794628ddaf"
],
"target": "6cfed884bf37cba1e0d8e97fa8b0e94df4a04b1f",
"labels": [],
"assignees": [],
"revisions": [
{
"id": "223e55753b8b859f263ab03471b003f379819f1a",
"author": {
"id": "did:key:z6Mku8hpprWTmCv3BqkssCYDfr2feUdyLSUnycVajFo9XVAx",
"alias": "levitte"
},
"description": "This gives the possibility to see the inventory of another node than self.\nThis does replicatee the functionality of 'rad node routing --nid', but\nfeels like a more intuitive command to try.",
"base": "d9c76893a144fd787654613f2bfb919613014a71",
"oid": "b94eb08e93f0ce192f02a64bc2b107b56c84b0fc",
"timestamp": 1737371307
},
{
"id": "7226cd1008d0206e872c88c308d81c648d6634df",
"author": {
"id": "did:key:z6Mku8hpprWTmCv3BqkssCYDfr2feUdyLSUnycVajFo9XVAx",
"alias": "levitte"
},
"description": "Small nit (@fintohaps)",
"base": "d9c76893a144fd787654613f2bfb919613014a71",
"oid": "0b3b8ee5e19d9d05a746ee92672c35794628ddaf",
"timestamp": 1738237106
},
{
"id": "bb7e900f3bc9988d3dc63c5526688f5cb6fea4f1",
"author": {
"id": "did:key:z6Mku8hpprWTmCv3BqkssCYDfr2feUdyLSUnycVajFo9XVAx",
"alias": "levitte"
},
"description": "Changes:\n- Rebased\n- Removed unused import\n- `cargo fmt`",
"base": "8fd044833e40440e7b9d7a2c08281f404e5f5ed7",
"oid": "8fd044833e40440e7b9d7a2c08281f404e5f5ed7",
"timestamp": 1745314957
},
{
"id": "a75c9364bce29b813ffd52d8f65b4ed0ad757098",
"author": {
"id": "did:key:z6Mku8hpprWTmCv3BqkssCYDfr2feUdyLSUnycVajFo9XVAx",
"alias": "levitte"
},
"description": "Changes:\n- Pushed correct commit",
"base": "8fd044833e40440e7b9d7a2c08281f404e5f5ed7",
"oid": "10daedf96d81a0795756a5d0d4a3e374a9cf7c97",
"timestamp": 1745315012
}
]
}
}
{
"response": "triggered",
"run_id": {
"id": "097e0efd-bc9b-496e-8e1c-31c808dcc721"
},
"info_url": "https://cci.rad.levitte.org//097e0efd-bc9b-496e-8e1c-31c808dcc721.html"
}
Started at: 2025-10-21 20:31:07.676839+02:00
Commands:
$ rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 .
✓ Creating checkout in ./...
✓ Remote cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT added
✓ Remote-tracking branch cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/master created for z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT
✓ Remote cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW added
✓ Remote-tracking branch cloudhead@z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW/master created for z6MktaNvN1KVFMkSRAiN4qK5yvX1zuEEaseeX5sffhzPZRZW
✓ Remote fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM added
✓ Remote-tracking branch fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM/master created for z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM
✓ Remote erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz added
✓ Remote-tracking branch erikli@z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz/master created for z6MkgFq6z5fkF2hioLLSNu1zP2qEL1aHXHZzGH1FLFGAnBGz
✓ Remote lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz added
✓ Remote-tracking branch lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz/master created for z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz
✓ Repository successfully cloned under /opt/radcis/ci.rad.levitte.org/cci/state/097e0efd-bc9b-496e-8e1c-31c808dcc721/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 125 issues · 15 patches │
╰────────────────────────────────────╯
Run `cd ./.` to go to the repository directory.
Exit code: 0
$ rad patch checkout 223e55753b8b859f263ab03471b003f379819f1a
✓ Switched to branch patch/223e557 at revision 7226cd1
✓ Branch patch/223e557 setup to track rad/patches/223e55753b8b859f263ab03471b003f379819f1a
Exit code: 0
$ git config advice.detachedHead false
Exit code: 0
$ git checkout 0b3b8ee5e19d9d05a746ee92672c35794628ddaf
HEAD is now at 0b3b8ee5 cli: Add 'rad node inventory --nid <nid>'
Exit code: 0
$ git show 0b3b8ee5e19d9d05a746ee92672c35794628ddaf
commit 0b3b8ee5e19d9d05a746ee92672c35794628ddaf
Author: Richard Levitte <richard@levitte.org>
Date: Mon Jan 20 12:04:19 2025 +0100
cli: Add 'rad node inventory --nid <nid>'
This gives the possibility to see the inventory of another node than self.
This does replicatee the functionality of 'rad node routing --nid', but
feels like a more intuitive command to try.
diff --git a/radicle-cli/src/commands/node.rs b/radicle-cli/src/commands/node.rs
index 8695ba0f..45bfacc6 100644
--- a/radicle-cli/src/commands/node.rs
+++ b/radicle-cli/src/commands/node.rs
@@ -37,7 +37,7 @@ Usage
rad node debug [<option>...]
rad node connect <nid>@<addr> [<option>...]
rad node routing [--rid <rid>] [--nid <nid>] [--json] [<option>...]
- rad node inventory [<option>...]
+ rad node inventory [--nid <nid>] [<option>...]
rad node events [--timeout <secs>] [-n <count>] [<option>...]
rad node config [--addresses]
rad node db <command> [<option>..]
@@ -56,6 +56,10 @@ Routing options
--nid <nid> Show the routing table entries for the given NID
--json Output the routing table as json
+Inventory options
+
+ --nid <nid> List the inventory of the given NID (default: self)
+
Events options
--timeout <secs> How long to wait to receive an event before giving up
@@ -101,7 +105,9 @@ pub enum Operation {
lines: usize,
},
Status,
- Inventory,
+ Inventory {
+ nid: Option<NodeId>,
+ },
Debug,
Sessions,
Stop,
@@ -171,7 +177,8 @@ impl Args for Options {
let val = parser.value()?;
rid = term::args::rid(&val).ok();
}
- Long("nid") if matches!(op, Some(OperationName::Routing)) => {
+ Long("nid")
+ if matches!(op, Some(OperationName::Routing)) || matches!(op, Some(OperationName::Inventory)) => {
let val = parser.value()?;
nid = term::args::nid(&val).ok();
}
@@ -230,7 +237,7 @@ impl Args for Options {
options,
path: path.unwrap_or(PathBuf::from("radicle-node")),
},
- OperationName::Inventory => Operation::Inventory,
+ OperationName::Inventory => Operation::Inventory { nid },
OperationName::Status => Operation::Status,
OperationName::Debug => Operation::Debug,
OperationName::Sessions => Operation::Sessions,
@@ -286,8 +293,9 @@ pub fn run(options: Options, ctx: impl term::Context) -> anyhow::Result<()> {
} => {
control::start(node, !foreground, verbose, options, &path, &profile)?;
}
- Operation::Inventory => {
- for rid in profile.routing()?.get_inventory(profile.id())? {
+ Operation::Inventory { nid } => {
+ let nid = nid.as_ref().unwrap_or(profile.id());
+ for rid in profile.routing()?.get_inventory(nid)? {
println!("{}", term::format::tertiary(rid));
}
}
Exit code: 0
shell: 'cargo --version rustc --version cargo fmt --check cargo clippy --all-targets --workspace -- --deny clippy::all cargo build --all-targets --workspace cargo doc --workspace cargo test --workspace --no-fail-fast '
Commands:
$ podman run --name 097e0efd-bc9b-496e-8e1c-31c808dcc721 -v /opt/radcis/ci.rad.levitte.org/cci/state/097e0efd-bc9b-496e-8e1c-31c808dcc721/s:/097e0efd-bc9b-496e-8e1c-31c808dcc721/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/097e0efd-bc9b-496e-8e1c-31c808dcc721/w:/097e0efd-bc9b-496e-8e1c-31c808dcc721/w -w /097e0efd-bc9b-496e-8e1c-31c808dcc721/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:bookworm bash /097e0efd-bc9b-496e-8e1c-31c808dcc721/s/script.sh
+ cargo --version
info: syncing channel updates for '1.80-x86_64-unknown-linux-gnu'
info: latest update on 2024-08-08, rust version 1.80.1 (3f5fd8dd4 2024-08-06)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-src'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-src'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
cargo 1.80.1 (376290515 2024-07-16)
+ rustc --version
rustc 1.80.1 (3f5fd8dd4 2024-08-06)
+ cargo fmt --check
Diff in /097e0efd-bc9b-496e-8e1c-31c808dcc721/w/radicle-cli/src/commands/node.rs at line 178:
rid = term::args::rid(&val).ok();
}
Long("nid")
- if matches!(op, Some(OperationName::Routing)) || matches!(op, Some(OperationName::Inventory)) => {
+ if matches!(op, Some(OperationName::Routing))
+ || matches!(op, Some(OperationName::Inventory)) =>
+ {
let val = parser.value()?;
nid = term::args::nid(&val).ok();
}
Exit code: 1
{
"response": "finished",
"result": "failure"
}