-
Notifications
You must be signed in to change notification settings - Fork 13
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
no-dpki
flag
#236
no-dpki
flag
#236
Conversation
NB: Once the associated holochain pr #4209 is reviewed and merged, this pr needs to be updated to follow the version of holochain that includes the edit to We cannot rely on the tests/CI in this pr until the holochain version update is complete. |
@maackle I've created this issue that grants us the ability to use DeepKey in test-mode where DeepKey generates a device seed that can only be used for testing especially using Tryorama. |
processes: Mutex::default(), | ||
}, | ||
); | ||
} | ||
|
||
let lair_stderr_log_path = player_dir.join(LAIR_STDERR_LOG_FILENAME); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lair is started in-process with holochain now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎸
@@ -58,5 +41,10 @@ pub(crate) fn reset() -> Result<(), ResetError> { | |||
} | |||
} | |||
|
|||
NEXT_ADMIN_PORT.store(ADMIN_PORT_RANGE.start, atomic::Ordering::SeqCst); | |||
if let Err(err) = std::fs::remove_dir_all(PLAYERS_DIR_PATH) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In very few cases this directory is already gone. That shouldn't make the whole call fail.
reason: "Holochain ready message not found.".to_string(), | ||
}), | ||
Ok(Ok(Ok(()))) => { | ||
*processes = Some(PlayerProcesses { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only keep the process reference in memory if startup succeeded.
} | ||
.unwrap_err(); | ||
|
||
if let Err(err) = conductor.kill() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise kill process.
@@ -384,7 +420,7 @@ export class TryCpConductor implements IConductor { | |||
data: request, | |||
}); | |||
assert(response.type === "dna_registered"); | |||
return (response as AdminApiResponseDnaRegistered).data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these types can be inferred by virtue of the preceding assertion.
Cargo.toml
Outdated
@@ -10,8 +10,8 @@ resolver = "2" | |||
|
|||
[workspace.dependencies] | |||
futures = "0.3" | |||
hdi = "0.5.0-dev.1" | |||
hdk = "0.4.0-dev.1" | |||
hdi = "0.5.0-dev.17" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these no longer compatible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They weren't with the Rust client that I started using in the integration test. But now that can be reverted. Thanks for pointing that out.
if (options?.dpkiNetworkSeed) { | ||
args.push("--dpki-network-seed", options.dpkiNetworkSeed); | ||
} | ||
args.push("network"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This arg building logic for the sandbox is too fiddly. We could really do with a single way of creating conductor config files and just launch the sandbox with that instead... both things we can't do currently!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Completely agree. I think we need to enrich the holochain
command with some config subcommands and remove hc sandbox altogether.
@@ -133,20 +150,27 @@ export class Conductor implements IConductor { | |||
signalingServerUrl: URL, | |||
options?: CreateConductorOptions | |||
) { | |||
if (options?.noDpki && options?.dpkiNetworkSeed) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the opposite also be checked? If you enable DPKI then the dpkiNetworkSeed
should be required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will default to deepkey-test
, so it's not required. I'll add that to the option documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, this is a lot of changes for the title of this PR ; ) - lgtm
Yes, this has gotten out of hands since its beginning ;-) |
Co-authored-by: David Braden <[email protected]>
Updates:
no-dpki
flag to instantiate a disabledDpkiConfig
in the test conductor (both in local and trycp)NB: This depends on holochain pr #4209, which contains the necessary updates to
hc sandbox
in order for this PR to correctly run.