-
Notifications
You must be signed in to change notification settings - Fork 964
Open
Description
This part in tools/reckless _install_plugin does not seem to work for rust plugins:
test = run([Path(staged_src.source_loc).joinpath(staged_src.entry)],
cwd=str(staging_path), stdout=PIPE, stderr=PIPE,
text=True, timeout=10){
"result": [
null
],
"log": [
"DEBUG: Searching for summars",
"DEBUG: InstInfo(summars, /home/runner/work/plugins/plugins, None, Cargo.toml, Cargo.toml, summars), Source.LOCAL_REPO",
"INFO: found summars in source: /home/runner/work/plugins/plugins",
"DEBUG: entry: Cargo.toml",
"DEBUG: sub-directory: summars",
"DEBUG: Retrieving summars from /home/runner/work/plugins/plugins",
"DEBUG: Install requested from InstInfo(summars, /home/runner/work/plugins/plugins, None, Cargo.toml, Cargo.toml, summars).",
"INFO: cloning Source.LOCAL_REPO InstInfo(summars, /home/runner/work/plugins/plugins, None, Cargo.toml, Cargo.toml, summars)",
"DEBUG: cloned_src: InstInfo(summars, /tmp/reckless-095512175hgd_mrx8/clone, None, Cargo.toml, Cargo.toml, summars/summars)",
"DEBUG: using latest commit of default branch",
"DEBUG: checked out HEAD: 75da2a02de17526e701d8a1454489a71d3e3e062",
"DEBUG: using installer rust",
"DEBUG: creating /tmp/ltests-l_2xm2pn/test_plugin_install_raw_1/lightning-1/reckless/summars",
"DEBUG: creating /tmp/ltests-l_2xm2pn/test_plugin_install_raw_1/lightning-1/reckless/summars/source",
"DEBUG: copying /tmp/reckless-095512175hgd_mrx8/clone/summars/summars tree to /tmp/ltests-l_2xm2pn/test_plugin_install_raw_1/lightning-1/reckless/summars/source/summars",
"DEBUG: linking source /tmp/ltests-l_2xm2pn/test_plugin_install_raw_1/lightning-1/reckless/summars/source/summars/Cargo.toml to /tmp/ltests-l_2xm2pn/test_plugin_install_raw_1/lightning-1/reckless/summars/Cargo.toml",
"DEBUG: InstInfo(summars, /tmp/ltests-l_2xm2pn/test_plugin_install_raw_1/lightning-1/reckless/summars, None, Cargo.toml, Cargo.toml, source/summars)",
"DEBUG: cargo installing from /tmp/ltests-l_2xm2pn/test_plugin_install_raw_1/lightning-1/reckless/summars/source/summars",
"DEBUG: rust project compiled successfully",
"DEBUG: plugin testing error:",
"DEBUG: Error: Lost connection to lightning expecting getmanifest",
"ERROR: plugin testing failed",
"WARNING: summars: installation aborted"
]
}
The error message Error: Lost connection to lightning expecting getmanifest is from the cln-plugin lib and is only triggered if the input stream gets closed:
match input.next().await {
Some(Ok(messages::JsonRpc::Request(id, messages::Request::Getmanifest(m)))) => {
output
.lock()
.await
.send(json!({
"jsonrpc": "2.0",
"result": self.handle_get_manifest(m),
"id": id,
}))
.await?
}
Some(o) => return Err(anyhow!("Got unexpected message {:?} from lightningd", o)),
None => {
return Err(anyhow!(
"Lost connection to lightning expecting getmanifest"
))
}
};LLM says subprocess.run immediately closes it to reattach itself or something and i think that is the case.
If i run the plugin directly in the terminal it just hangs as expected, waiting for the manifest.
Metadata
Metadata
Assignees
Labels
No labels