Fix CI check and remove try-runtime command (#3046)

* CI: Fix check-try-runtime

(preparation for the monorepo)

Warnings should be treated as errors here, since this is how it will
be done in the monorepo.
I expect to see two errors in this check now.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Allow deprecated

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Remove try-runtime command

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* make it compile

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Remove try-runtime-cli dependency

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2023-08-23 16:15:13 +02:00
committed by GitHub
parent 81c68c5595
commit dc6fe9a395
8 changed files with 10 additions and 68 deletions
-2
View File
@@ -67,7 +67,6 @@ sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "master" }
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "master" }
try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true }
sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
frame-rpc-system = { package = "substrate-frame-rpc-system", git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "master" }
@@ -124,5 +123,4 @@ try-runtime = [
"asset-hub-kusama-runtime/try-runtime",
"asset-hub-westend-runtime/try-runtime",
"shell-runtime/try-runtime",
"try-runtime-cli/try-runtime",
]
+3 -6
View File
@@ -55,12 +55,9 @@ pub enum Subcommand {
#[command(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
/// Try some testing command against a specified runtime state.
#[cfg(feature = "try-runtime")]
TryRuntime(try_runtime_cli::TryRuntimeCmd),
/// Errors since the binary was not build with `--features try-runtime`.
#[cfg(not(feature = "try-runtime"))]
/// Try-runtime has migrated to a standalone
/// [CLI](<https://github.com/paritytech/try-runtime-cli>). The subcommand exists as a stub and
/// deprecation notice. It will be removed entirely some time after January 2024.
TryRuntime,
}
+1 -23
View File
@@ -731,29 +731,7 @@ pub fn run() -> Result<()> {
_ => Err("Benchmarking sub-command unsupported".into()),
}
},
#[cfg(feature = "try-runtime")]
Some(Subcommand::TryRuntime(cmd)) => {
use try_runtime_cli::block_building_info::timestamp_with_aura_info;
// grab the task manager.
let runner = cli.create_runner(cmd)?;
let registry = &runner.config().prometheus_config.as_ref().map(|cfg| &cfg.registry);
let task_manager =
sc_service::TaskManager::new(runner.config().tokio_handle.clone(), *registry)
.map_err(|e| format!("Error: {:?}", e))?;
type HostFunctions =
(sp_io::SubstrateHostFunctions, frame_benchmarking::benchmarking::HostFunctions);
let info_provider = timestamp_with_aura_info(6000);
runner.async_run(|_| {
Ok((cmd.run::<Block, HostFunctions, _>(Some(info_provider)), task_manager))
})
},
#[cfg(not(feature = "try-runtime"))]
Some(Subcommand::TryRuntime) => Err("Try-runtime was not enabled when building the node. \
You can enable it with `--features try-runtime`."
.into()),
Some(Subcommand::TryRuntime) => Err("The `try-runtime` subcommand has been migrated to a standalone CLI (https://github.com/paritytech/try-runtime-cli). It is no longer being maintained here and will be removed entirely some time after January 2024. Please remove this subcommand from your runtime and use the standalone CLI.".into()),
Some(Subcommand::Key(cmd)) => Ok(cmd.run(&cli)?),
None => {
let runner = cli.create_runner(&cli.run.normalize())?;