-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Migration testing runtime API/Bot #8038
Changes from all commits
4c0abc5
7f9b5b8
4883812
be549b4
8e97733
d84dad4
aeb7a0e
d968f58
ce4128b
ee8ae08
62be119
712c240
9a23940
93f299a
3cea840
ab9d4a3
b13ea31
d3a2368
c8ba546
2f9ad0e
6db195c
b8ab620
be5210d
b5e394b
deb03d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,3 +23,4 @@ rls*.log | |
| **/hfuzz_workspace/ | ||
| .cargo/ | ||
| .cargo-remote.toml | ||
| *.bin | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -149,5 +149,20 @@ pub fn run() -> Result<()> { | |
| Ok((cmd.run(client, backend), task_manager)) | ||
| }) | ||
| }, | ||
| #[cfg(feature = "try-runtime")] | ||
| Some(Subcommand::TryRuntime(cmd)) => { | ||
| let runner = cli.create_runner(cmd)?; | ||
| runner.async_run(|config| { | ||
kianenigma marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| // we don't need any of the components of new_partial, just a runtime, or a task | ||
| // manager to do `async_run`. | ||
| let registry = config.prometheus_config.as_ref().map(|cfg| &cfg.registry); | ||
| let task_manager = sc_service::TaskManager::new( | ||
| config.task_executor.clone(), | ||
| registry, | ||
| ).unwrap(); | ||
kianenigma marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. out of curiosity, why async here ? instead of sync like we do for benchmarks ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remote-externalities is working with async/await, my assumption was that in such case you need to use the async_runner 🤔 |
||
|
|
||
| Ok((cmd.run::<Block, Executor>(config), task_manager)) | ||
| }) | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -234,7 +234,7 @@ pub struct TaskManager { | |
| impl TaskManager { | ||
| /// If a Prometheus registry is passed, it will be used to report statistics about the | ||
| /// service tasks. | ||
| pub(super) fn new( | ||
| pub fn new( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this looks like a structural change but I don't know that much about the client to say. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it is fine but yeah might be worth asking, maybe @cecton? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Normally you don't need to instantiate this but I guess in your case it makes sense if you want to benefit from the clean shutdown of the On the other hand I'm worried by the tokio runtime created later on. You are creating and running 2 tokio runtimes. |
||
| executor: TaskExecutor, | ||
| prometheus_registry: Option<&Registry>, | ||
| ) -> Result<Self, PrometheusError> { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,3 +47,6 @@ std = [ | |
| "sp-tracing/std", | ||
| "sp-std/std", | ||
| ] | ||
| try-runtime = [ | ||
| "frame-support/try-runtime" | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,3 +60,4 @@ std = [ | |
| nightly = [] | ||
| strict = [] | ||
| runtime-benchmarks = [] | ||
| try-runtime = [] | ||
Uh oh!
There was an error while loading. Please reload this page.