Skip to content

Conversation

@chungquantin
Copy link
Contributor

@chungquantin chungquantin commented Apr 23, 2025

Closes #519

Description

  • Instead of returning the path to the runtime WASM binary .wasm, we return the runtime project path. For example, if pop-node/runtime/testnet is selected or inputted, it is returned in the single command output or the .bench file as: --runtime=pop-node/runtime/testnet. Then when running the command, runtime project can be located and rebuilt. If .wasm file is provided, the build process is skipped.

  • Output the relative path of the runtime project in .bench file and the single command output

Before

runtime = "/Users/chungquantin/Developer/pop-network/pop-node/target/release/wbuild/pop-runtime-testnet/pop_runtime_testnet.wasm"

After

runtime = "/Users/chungquantin/Developer/pop-network/pop-node/runtime/testnet"

How to test the PR?

  • Go to pop-node
  • Run the command pop bench pallet
  • Save the configurations to pop-bench.toml
  • View the pop-bench.toml to find the runtime project path is saved in runtime=
  • Run the command pop bench pallet -f pop-bench.toml, now runtime project is rebuilt.
  • To test the WASM file, provide the target path to the WASM binary of a runtime, you will see the build process is skipped.

@chungquantin chungquantin force-pushed the chungquantin/fix-runtime_path branch from 51ddedd to bbe6be5 Compare April 23, 2025 17:17
@chungquantin chungquantin changed the title fix: separate runtime binary path and runtime path fix: separate runtime binary path and project path Apr 23, 2025
@codecov
Copy link

codecov bot commented Apr 23, 2025

Codecov Report

Attention: Patch coverage is 63.70968% with 45 lines in your changes missing coverage. Please review.

Project coverage is 78.92%. Comparing base (5af36d3) to head (bbe6be5).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
crates/pop-cli/src/commands/bench/pallet.rs 60.00% 22 Missing and 12 partials ⚠️
crates/pop-cli/src/common/runtime.rs 73.33% 2 Missing and 6 partials ⚠️
crates/pop-cli/src/commands/bench/overhead.rs 75.00% 1 Missing ⚠️
crates/pop-cli/src/commands/build/runtime.rs 0.00% 1 Missing ⚠️
crates/pop-cli/src/common/try_runtime.rs 75.00% 1 Missing ⚠️
@@            Coverage Diff             @@
##             main     #531      +/-   ##
==========================================
+ Coverage   78.78%   78.92%   +0.13%     
==========================================
  Files          99      100       +1     
  Lines       23186    23513     +327     
  Branches    23186    23513     +327     
==========================================
+ Hits        18268    18558     +290     
- Misses       2719     2743      +24     
- Partials     2199     2212      +13     
Files with missing lines Coverage Δ
crates/pop-cli/src/commands/bench/overhead.rs 85.51% <75.00%> (+0.12%) ⬆️
crates/pop-cli/src/commands/build/runtime.rs 69.67% <0.00%> (-0.58%) ⬇️
crates/pop-cli/src/common/try_runtime.rs 92.04% <75.00%> (+0.01%) ⬆️
crates/pop-cli/src/common/runtime.rs 73.71% <73.33%> (+0.68%) ⬆️
crates/pop-cli/src/commands/bench/pallet.rs 79.75% <60.00%> (+0.28%) ⬆️

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chungquantin chungquantin added the ready-for-final-review The PR is ready for final review label Apr 24, 2025
@chungquantin chungquantin requested a review from AlexD10S April 24, 2025 03:04
@chungquantin chungquantin self-assigned this Apr 24, 2025
Copy link
Collaborator

@AlexD10S AlexD10S left a comment

Choose a reason for hiding this comment

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

Looks great! Nothing to add — LGTM!

@chungquantin chungquantin merged commit 9999726 into main Apr 25, 2025
34 of 36 checks passed
@chungquantin chungquantin deleted the chungquantin/fix-runtime_path branch April 25, 2025 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-final-review The PR is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: predefined runtime in pop-bench.toml won't allow to rebuild the runtime

3 participants