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

PVF: consider building workers on-demand in tests #1957

Closed
mrcnski opened this issue Oct 20, 2023 · 6 comments · Fixed by #2018
Closed

PVF: consider building workers on-demand in tests #1957

mrcnski opened this issue Oct 20, 2023 · 6 comments · Fixed by #2018
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. T0-node This PR/Issue is related to the topic “node”.

Comments

@mrcnski
Copy link
Contributor

mrcnski commented Oct 20, 2023

Would still like that get_and_check_worker_paths just calls cargo build to provide some better UX for tests. However, this isn't a real blocker as the current behavior isn't changed.

Originally posted by @bkchr in #1771 (review)

See also #1771 (comment).

@mrcnski mrcnski added T0-node This PR/Issue is related to the topic “node”. C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. labels Oct 20, 2023
@eagr
Copy link
Contributor

eagr commented Oct 24, 2023

Wouldn't this cause the tests to time out? Considering the amount of time required to build the workers.

@mrcnski
Copy link
Contributor Author

mrcnski commented Oct 24, 2023

I don't think we have timeouts for tests, at least when I do cargo test locally. But yeah, I'm concerned about getting the UX right, especially on poor hardware. My VPS takes ages to build stuff. And I've noticed the situation after #1771 is a bit better so TBH this is a low priority for me. Thanks for the feedback!

@eagr
Copy link
Contributor

eagr commented Oct 25, 2023

I don't think we have timeouts for tests

Ok, I don't know where did I pick that up :)

My VPS takes ages to build stuff

Same here, which got me thinking about getting Apple M2. Esp. the runtime build, which is insane. I also have a build cache that's growing indefinitely. Is it just me? How do you guys cope with that?

@mrcnski
Copy link
Contributor Author

mrcnski commented Oct 25, 2023

No, it's not just you. :) We all complain about it. I can confirm that M2 helps a lot - it's crazy how fast it compiles. For runtime builds, they are usually unneeded so you can pass SKIP_WASM_BUILD=1. For the build cache, cargo sweep helps. Here are my notes on it:

-d : dry run
-r : recursive
-i : Keep only artifacts made by Toolchains currently installed by rustup
-t : Number of days backwards to keep

cargo sweep -d -r -i
cargo sweep -r -t 5

I think it misses incremental folders so you have to also fd -I incremental -x rm -R. You may also have to rm -Rf ~/.cargo/{git,registry}.

Or you can just use dust (another Rust utility) to find the biggest folder and cargo clean, it's what I do.

@eagr
Copy link
Contributor

eagr commented Oct 25, 2023

Thanks! Life saver! Some of these should go into the onboarding documentation, if any :))

@Polkadot-Forum
Copy link

This issue has been mentioned on Polkadot Forum. There might be relevant details there:

https://forum.polkadot.network/t/hardware-requirements-for-substrate-engineer/1686/13

serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Mar 26, 2024
* fix invalid batch transaction

* RaceState is now trait

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Mar 27, 2024
* fix invalid batch transaction

* RaceState is now trait

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* fix invalid batch transaction

* RaceState is now trait

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* fix invalid batch transaction

* RaceState is now trait

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* fix invalid batch transaction

* RaceState is now trait

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* fix invalid batch transaction

* RaceState is now trait

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 8, 2024
* fix invalid batch transaction

* RaceState is now trait

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* fix invalid batch transaction

* RaceState is now trait

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* fix invalid batch transaction

* RaceState is now trait

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* fix invalid batch transaction

* RaceState is now trait

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* fix invalid batch transaction

* RaceState is now trait

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* fix invalid batch transaction

* RaceState is now trait

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 9, 2024
* fix invalid batch transaction

* RaceState is now trait

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
* fix invalid batch transaction

* RaceState is now trait

* clippy
serban300 pushed a commit to serban300/polkadot-sdk that referenced this issue Apr 10, 2024
* fix invalid batch transaction

* RaceState is now trait

* clippy
bkchr pushed a commit that referenced this issue Apr 10, 2024
* fix invalid batch transaction

* RaceState is now trait

* clippy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. T0-node This PR/Issue is related to the topic “node”.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants