Skip to content
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

Remove deprecated TryRuntime subcommand #4017

Merged
merged 3 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@ members = [
"substrate/utils/frame/rpc/state-trie-migration-rpc",
"substrate/utils/frame/rpc/support",
"substrate/utils/frame/rpc/system",
"substrate/utils/frame/try-runtime/cli",
"substrate/utils/prometheus",
"substrate/utils/substrate-bip39",
"substrate/utils/wasm-builder",
Expand Down
5 changes: 0 additions & 5 deletions cumulus/polkadot-parachain/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ pub enum Subcommand {
/// The pallet benchmarking moved to the `pallet` sub-command.
#[command(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),

/// 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,
}

const AFTER_HELP_EXAMPLE: &str = color_print::cstr!(
Expand Down
6 changes: 2 additions & 4 deletions cumulus/polkadot-parachain/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,9 +549,8 @@ pub fn run() -> Result<()> {
},
Some(Subcommand::ExportGenesisHead(cmd)) => {
let runner = cli.create_runner(cmd)?;
runner.sync_run(|config| {
construct_partials!(config, |partials| cmd.run(partials.client))
})
runner
.sync_run(|config| construct_partials!(config, |partials| cmd.run(partials.client)))
},
Some(Subcommand::ExportGenesisWasm(cmd)) => {
let runner = cli.create_runner(cmd)?;
Expand Down Expand Up @@ -601,7 +600,6 @@ pub fn run() -> Result<()> {
_ => Err("Benchmarking sub-command unsupported".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())?;
Expand Down
3 changes: 0 additions & 3 deletions polkadot/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ sp-io = { path = "../../substrate/primitives/io" }
sp-keyring = { path = "../../substrate/primitives/keyring" }
sp-maybe-compressed-blob = { path = "../../substrate/primitives/maybe-compressed-blob" }
frame-benchmarking-cli = { path = "../../substrate/utils/frame/benchmarking-cli", optional = true }
try-runtime-cli = { path = "../../substrate/utils/frame/try-runtime/cli", optional = true }
sc-cli = { path = "../../substrate/client/cli", optional = true }
sc-service = { path = "../../substrate/client/service", optional = true }
polkadot-node-metrics = { path = "../node/metrics" }
Expand All @@ -57,7 +56,6 @@ cli = [
"sc-service",
"sc-tracing",
"service",
"try-runtime-cli",
]
runtime-benchmarks = [
"frame-benchmarking-cli?/runtime-benchmarks",
Expand All @@ -70,7 +68,6 @@ full-node = ["service/full-node"]
try-runtime = [
"service/try-runtime",
"sp-runtime/try-runtime",
"try-runtime-cli/try-runtime",
]
fast-runtime = ["service/fast-runtime"]
pyroscope = ["pyro", "pyroscope_pprofrs"]
Expand Down
5 changes: 0 additions & 5 deletions polkadot/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ pub enum Subcommand {
#[command(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),

/// 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,

/// Key management CLI utilities
#[command(subcommand)]
Key(sc_cli::KeySubcommand),
Expand Down
7 changes: 0 additions & 7 deletions polkadot/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,13 +476,6 @@ pub fn run() -> Result<()> {
}
},
Some(Subcommand::Key(cmd)) => Ok(cmd.run(&cli)?),
#[cfg(feature = "try-runtime")]
Some(Subcommand::TryRuntime) => Err(try_runtime_cli::DEPRECATION_NOTICE.to_owned().into()),
#[cfg(not(feature = "try-runtime"))]
Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the node. \
You can enable it with `--features try-runtime`."
.to_owned()
.into()),
Some(Subcommand::ChainInfo(cmd)) => {
let runner = cli.create_runner(cmd)?;
Ok(runner.sync_run(|config| cmd.run::<service::Block>(&config))?)
Expand Down
15 changes: 15 additions & 0 deletions prdoc/pr_4017.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
title: Complete removal of `TryRuntime` subcommand

doc:
- audience: Node Operator
description: |
The deprecated `try-runtime` subcommand and `try-runtime-cli` crate has been completely removed.
If you are not already, you should be using the standalone CLI at https://github.com/paritytech/try-runtime-cli.

crates:
- name: polkadot-parachain-bin
bump: patch
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making these patch because the subcommands were already a noop.

- name: polkadot-cli
bump: patch
- name: staging-node-cli
bump: patch
4 changes: 0 additions & 4 deletions substrate/bin/node/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ node-primitives = { path = "../primitives" }
sc-cli = { path = "../../../client/cli", optional = true }
frame-benchmarking-cli = { path = "../../../utils/frame/benchmarking-cli", optional = true }
node-inspect = { package = "staging-node-inspect", path = "../inspect", optional = true }
try-runtime-cli = { path = "../../../utils/frame/try-runtime/cli", optional = true }
serde_json = { workspace = true, default-features = true }

[dev-dependencies]
Expand Down Expand Up @@ -172,7 +171,6 @@ node-inspect = { package = "staging-node-inspect", path = "../inspect", optional
frame-benchmarking-cli = { path = "../../../utils/frame/benchmarking-cli", optional = true }
substrate-build-script-utils = { path = "../../../utils/build-script-utils", optional = true }
substrate-frame-cli = { path = "../../../utils/frame/frame-utilities-cli", optional = true }
try-runtime-cli = { path = "../../../utils/frame/try-runtime/cli", optional = true }
sc-cli = { path = "../../../client/cli", optional = true }
pallet-balances = { path = "../../../frame/balances" }
sc-storage-monitor = { path = "../../../client/storage-monitor" }
Expand All @@ -188,7 +186,6 @@ cli = [
"sc-service/rocksdb",
"substrate-build-script-utils",
"substrate-frame-cli",
"try-runtime-cli",
]
runtime-benchmarks = [
"frame-benchmarking-cli/runtime-benchmarks",
Expand Down Expand Up @@ -232,7 +229,6 @@ try-runtime = [
"pallet-treasury/try-runtime",
"sp-runtime/try-runtime",
"substrate-cli-test-utils/try-runtime",
"try-runtime-cli/try-runtime",
]

[[bench]]
Expand Down
5 changes: 0 additions & 5 deletions substrate/bin/node/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ pub enum Subcommand {
#[command(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),

/// 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

damn we didn't mark this as deprecated before, so it will be a breaking chaneg in all node side code of all teams... wdyt about making it deprecated now, and removing one version later? we can still fully remove it from our codebase.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual command has been a noop for a few releases, it only logged that it's deprecated with instructions to use the dedicated cli :)

TryRuntime,

/// Key management cli utilities
#[command(subcommand)]
Key(sc_cli::KeySubcommand),
Expand Down
6 changes: 0 additions & 6 deletions substrate/bin/node/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,6 @@ pub fn run() -> Result<()> {
Ok((cmd.run(client, backend, Some(aux_revert)), task_manager))
})
},
#[cfg(feature = "try-runtime")]
Some(Subcommand::TryRuntime) => Err(try_runtime_cli::DEPRECATION_NOTICE.into()),
#[cfg(not(feature = "try-runtime"))]
Some(Subcommand::TryRuntime) => Err("TryRuntime wasn't enabled when building the node. \
You can enable it with `--features try-runtime`."
.into()),
Some(Subcommand::ChainInfo(cmd)) => {
let runner = cli.create_runner(cmd)?;
runner.sync_run(|config| cmd.run::<Block>(&config))
Expand Down
63 changes: 0 additions & 63 deletions substrate/utils/frame/try-runtime/cli/Cargo.toml

This file was deleted.

Loading
Loading