Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

fix(cli): remove if for try runtime #316

Merged
merged 3 commits into from
Jun 27, 2023
Merged

Conversation

cowboy-bebug
Copy link
Contributor

Description

Please describe your pull request and link relevant issues.

Type of changes

  • build: Changes that affect the build system or external dependencies (eg, Cargo, Docker)
  • ci: Changes to CI configuration
  • docs: Changes to documentation only
  • feat: Changes to add a new feature
  • fix: Changes to fix a bug
  • refactor: Changes that do not alter functionality
  • style: Changes to format the code
  • test: Changes to add missing tests or correct existing tests

Checklist

  • Tests for the changes have been added
  • Necessary documentation is added (if appropriate)
  • Formatted with cargo fmt --all
  • Linted with cargo clippy --all-features --all-targets
  • Tested with cargo test --workspace --all-features --all-targets

@cowboy-bebug
Copy link
Contributor Author

Both commands should work

cargo run --release --features=try-runtime --features=bajun --bin=bajun-para \
  try-runtime \
    --runtime=./target/release/wbuild/bajun-runtime/bajun_runtime.compact.compressed.wasm \
    --wasm-execution=compiled \
    --chain=./resources/bajun/bajun-raw.json \
    on-runtime-upgrade --checks live \
    --uri="ws://rpc-parachain.bajun.network:9944"

cargo run --release --features=try-runtime --features=ajuna --bin=ajuna-para \
  try-runtime \
    --runtime=./target/release/wbuild/ajuna-runtime/ajuna_runtime.compact.compressed.wasm \
    --wasm-execution=compiled \
    --chain=./resources/ajuna/ajuna-raw.json \
    on-runtime-upgrade --checks live \
    --uri="ws://rpc-parachain.ajuna.network:9944"

@codecov
Copy link

codecov bot commented Jun 23, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.03 ⚠️

Comparison is base (26e1572) 71.16% compared to head (654797d) 71.14%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #316      +/-   ##
===========================================
- Coverage    71.16%   71.14%   -0.03%     
===========================================
  Files           33       33              
  Lines         3357     3358       +1     
===========================================
  Hits          2389     2389              
- Misses         968      969       +1     
Impacted Files Coverage Δ
pallets/ajuna-awesome-avatars/src/migration/v5.rs 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@darkfriend77 darkfriend77 self-requested a review June 26, 2023 13:20
darkfriend77
darkfriend77 previously approved these changes Jun 26, 2023
@darkfriend77
Copy link
Contributor

darkfriend77 commented Jun 26, 2023

Both commands should work

cargo run --release --features=try-runtime --features=bajun --bin=bajun-para \
  try-runtime \
    --runtime=./target/release/wbuild/bajun-runtime/bajun_runtime.compact.compressed.wasm \
    --wasm-execution=compiled \
    --chain=./resources/bajun/bajun-raw.json \
    on-runtime-upgrade --checks live \
    --uri="ws://rpc-parachain.bajun.network:9944"

cargo run --release --features=try-runtime --features=ajuna --bin=ajuna-para \
  try-runtime \
    --runtime=./target/release/wbuild/ajuna-runtime/ajuna_runtime.compact.compressed.wasm \
    --wasm-execution=compiled \
    --chain=./resources/ajuna/ajuna-raw.json \
    on-runtime-upgrade --checks live \
    --uri="ws://rpc-parachain.ajuna.network:9944"

Can you fix the error, so we can merge?
@cowboy-bebug

error[E0308]: mismatched types
   --> node/cli/src/para/command.rs:330:5
    |
194 | /      match &cli.subcommand {
195 | |          Some(Subcommand::BuildSpec(cmd)) => {
196 | |              let runner = cli.create_runner(cmd)?;
197 | |              runner.sync_run(|config| cmd.run(config.chain_spec, config.network))
...   |
330 | |/                 runner.async_run(|_| {
331 | ||                     Ok((
332 | ||                         cmd.run::<AjunaBlock, HostFunctionsOf<AjunaRuntimeExecutor>, _>(Some(
333 | ||                             timestamp_with_aura_info::<AjunaBlock>(6000),
...   ||
336 | ||                     ))
337 | ||                 })
    | ||__________________^ expected `()`, found enum `Result`
...   |
446 | |          },
447 | |      }
    | |______- expected this to be `()`

@cowboy-bebug cowboy-bebug force-pushed the el/chore-fix-try-runtime branch from c3e8f3d to a74567d Compare June 27, 2023 07:49
@cowboy-bebug
Copy link
Contributor Author

@darkfriend77 When you run the command against bajun, you'll see this line fail:

assert!(player_configs_account_ids.len() > 800 && player_configs_account_ids.len() < 1_000);

@DidacSF will be able to help you out. It's most likely the data on bajun-kusama have changed since.

@DidacSF
Copy link
Contributor

DidacSF commented Jun 27, 2023

@darkfriend77 When you run the command against bajun, you'll see this line fail:

assert!(player_configs_account_ids.len() > 800 && player_configs_account_ids.len() < 1_000);

@DidacSF will be able to help you out. It's most likely the data on bajun-kusama have changed since.

Yeah, I've updated the estimates using the latest data from Kusama, that should put us in a more accurate details when performing the migration

@darkfriend77
Copy link
Contributor

@darkfriend77 When you run the command against bajun, you'll see this line fail:

assert!(player_configs_account_ids.len() > 800 && player_configs_account_ids.len() < 1_000);

@DidacSF will be able to help you out. It's most likely the data on bajun-kusama have changed since.

Yep, I already did that locally to have it reflect the balun storage. However, this will fail for Rococo, so we will need to have it set in different versions. @cowboy-bebug @DidacSF

Copy link
Contributor

@darkfriend77 darkfriend77 left a comment

Choose a reason for hiding this comment

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

good

Copy link
Contributor

Choose a reason for hiding this comment

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

error[E0308]: mismatched types
--> node/cli/src/para/command.rs:330:5
|
194 | / match &cli.subcommand {
195 | | Some(Subcommand::BuildSpec(cmd)) => {
196 | | let runner = cli.create_runner(cmd)?;
197 | | runner.sync_run(|config| cmd.run(config.chain_spec, config.network))
... |
330 | |/ runner.async_run(|| {
331 | || Ok((
332 | || cmd.run::<AjunaBlock, HostFunctionsOf, >(Some(
333 | || timestamp_with_aura_info::(6000),
... ||
336 | || ))
337 | || })
| ||
__________^ expected (), found enum Result
... |
446 | | },
447 | | }
| |
- expected this to be ()

@darkfriend77 darkfriend77 merged commit 50bed35 into develop Jun 27, 2023
@darkfriend77 darkfriend77 deleted the el/chore-fix-try-runtime branch June 27, 2023 16:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants