mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
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:
committed by
GitHub
parent
81c68c5595
commit
dc6fe9a395
Generated
-3
@@ -9212,7 +9212,6 @@ dependencies = [
|
|||||||
"substrate-build-script-utils",
|
"substrate-build-script-utils",
|
||||||
"substrate-frame-rpc-system",
|
"substrate-frame-rpc-system",
|
||||||
"substrate-prometheus-endpoint",
|
"substrate-prometheus-endpoint",
|
||||||
"try-runtime-cli",
|
|
||||||
"xcm",
|
"xcm",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -10617,7 +10616,6 @@ dependencies = [
|
|||||||
"substrate-state-trie-migration-rpc",
|
"substrate-state-trie-migration-rpc",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"tokio",
|
"tokio",
|
||||||
"try-runtime-cli",
|
|
||||||
"wait-timeout",
|
"wait-timeout",
|
||||||
"xcm",
|
"xcm",
|
||||||
]
|
]
|
||||||
@@ -15865,7 +15863,6 @@ dependencies = [
|
|||||||
"async-trait",
|
"async-trait",
|
||||||
"clap",
|
"clap",
|
||||||
"frame-remote-externalities",
|
"frame-remote-externalities",
|
||||||
"frame-try-runtime",
|
|
||||||
"hex",
|
"hex",
|
||||||
"log",
|
"log",
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master
|
|||||||
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
substrate-prometheus-endpoint = { 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 }
|
|
||||||
|
|
||||||
# Polkadot
|
# Polkadot
|
||||||
polkadot-cli = { git = "https://github.com/paritytech/polkadot", features = ["rococo-native"] , branch = "master" }
|
polkadot-cli = { git = "https://github.com/paritytech/polkadot", features = ["rococo-native"] , branch = "master" }
|
||||||
@@ -80,7 +79,6 @@ runtime-benchmarks = [
|
|||||||
"polkadot-cli/runtime-benchmarks",
|
"polkadot-cli/runtime-benchmarks",
|
||||||
]
|
]
|
||||||
try-runtime = [
|
try-runtime = [
|
||||||
"try-runtime-cli/try-runtime",
|
|
||||||
"parachain-template-runtime/try-runtime"
|
"parachain-template-runtime/try-runtime"
|
||||||
]
|
]
|
||||||
network-protocol-staging = [
|
network-protocol-staging = [
|
||||||
|
|||||||
@@ -35,12 +35,9 @@ pub enum Subcommand {
|
|||||||
#[command(subcommand)]
|
#[command(subcommand)]
|
||||||
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
|
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
|
||||||
|
|
||||||
/// Try some testing command against a specified runtime state.
|
/// Try-runtime has migrated to a standalone
|
||||||
#[cfg(feature = "try-runtime")]
|
/// [CLI](<https://github.com/paritytech/try-runtime-cli>). The subcommand exists as a stub and
|
||||||
TryRuntime(try_runtime_cli::TryRuntimeCmd),
|
/// deprecation notice. It will be removed entirely some time after Janurary 2024.
|
||||||
|
|
||||||
/// Errors since the binary was not build with `--features try-runtime`.
|
|
||||||
#[cfg(not(feature = "try-runtime"))]
|
|
||||||
TryRuntime,
|
TryRuntime,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -216,32 +216,7 @@ pub fn run() -> Result<()> {
|
|||||||
_ => Err("Benchmarking sub-command unsupported".into()),
|
_ => Err("Benchmarking sub-command unsupported".into()),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
#[cfg(feature = "try-runtime")]
|
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::TryRuntime(cmd)) => {
|
|
||||||
use parachain_template_runtime::MILLISECS_PER_BLOCK;
|
|
||||||
use try_runtime_cli::block_building_info::timestamp_with_aura_info;
|
|
||||||
|
|
||||||
let runner = cli.create_runner(cmd)?;
|
|
||||||
|
|
||||||
type HostFunctions =
|
|
||||||
(sp_io::SubstrateHostFunctions, frame_benchmarking::benchmarking::HostFunctions);
|
|
||||||
|
|
||||||
// grab the task manager.
|
|
||||||
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))?;
|
|
||||||
|
|
||||||
let info_provider = timestamp_with_aura_info(MILLISECS_PER_BLOCK);
|
|
||||||
|
|
||||||
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()),
|
|
||||||
None => {
|
None => {
|
||||||
let runner = cli.create_runner(&cli.run.normalize())?;
|
let runner = cli.create_runner(&cli.run.normalize())?;
|
||||||
let collator_options = cli.run.collator_options();
|
let collator_options = cli.run.collator_options();
|
||||||
|
|||||||
@@ -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" }
|
sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "master" }
|
||||||
sc-sysinfo = { 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" }
|
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" }
|
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" }
|
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" }
|
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-kusama-runtime/try-runtime",
|
||||||
"asset-hub-westend-runtime/try-runtime",
|
"asset-hub-westend-runtime/try-runtime",
|
||||||
"shell-runtime/try-runtime",
|
"shell-runtime/try-runtime",
|
||||||
"try-runtime-cli/try-runtime",
|
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -55,12 +55,9 @@ pub enum Subcommand {
|
|||||||
#[command(subcommand)]
|
#[command(subcommand)]
|
||||||
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
|
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
|
||||||
|
|
||||||
/// Try some testing command against a specified runtime state.
|
/// Try-runtime has migrated to a standalone
|
||||||
#[cfg(feature = "try-runtime")]
|
/// [CLI](<https://github.com/paritytech/try-runtime-cli>). The subcommand exists as a stub and
|
||||||
TryRuntime(try_runtime_cli::TryRuntimeCmd),
|
/// deprecation notice. It will be removed entirely some time after January 2024.
|
||||||
|
|
||||||
/// Errors since the binary was not build with `--features try-runtime`.
|
|
||||||
#[cfg(not(feature = "try-runtime"))]
|
|
||||||
TryRuntime,
|
TryRuntime,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -731,29 +731,7 @@ pub fn run() -> Result<()> {
|
|||||||
_ => Err("Benchmarking sub-command unsupported".into()),
|
_ => Err("Benchmarking sub-command unsupported".into()),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
#[cfg(feature = "try-runtime")]
|
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::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::Key(cmd)) => Ok(cmd.run(&cli)?),
|
Some(Subcommand::Key(cmd)) => Ok(cmd.run(&cli)?),
|
||||||
None => {
|
None => {
|
||||||
let runner = cli.create_runner(&cli.run.normalize())?;
|
let runner = cli.create_runner(&cli.run.normalize())?;
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ cargo-check-try-runtime:
|
|||||||
extends:
|
extends:
|
||||||
- .docker-env
|
- .docker-env
|
||||||
- .common-refs
|
- .common-refs
|
||||||
|
variables:
|
||||||
|
RUSTFLAGS: "-D warnings"
|
||||||
# this is an artificial job dependency, for pipeline optimization using GitLab's DAGs
|
# this is an artificial job dependency, for pipeline optimization using GitLab's DAGs
|
||||||
needs:
|
needs:
|
||||||
- job: check-runtime-benchmarks
|
- job: check-runtime-benchmarks
|
||||||
|
|||||||
Reference in New Issue
Block a user