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

tilt: mac improvements #4181

Merged
merged 2 commits into from
Dec 6, 2024
Merged

Conversation

evan-gray
Copy link
Contributor

@evan-gray evan-gray commented Dec 5, 2024

The following gets all containers running and relevant tests passing with the exception of

  • Near
  • Aptos
  • Sui

That is because those images require instructions sets that are not supported by Rosetta2 (likely AVX). As far as I can tell, pre-built binaries or images do not exist for linux/arm64, but they could potentially be built, akin to what I did for solana-test-validator.

This was tested with 8 CPU / 24 GB memory under Docker resources with the command tilt up -- --ci --num=2 --m1 --near=false --aptos=false --sui=false. Fair warning it took nearly 2 hours, but that was with rebuilding nearly all of the images.

Everything should succeed except

sdk-ci-tests

FAIL src/token_bridge/__tests__/sui-integration.ts
FAIL src/nft_bridge/__tests__/aptos-integration.ts (10.318 s)
FAIL src/token_bridge/__tests__/aptos-integration.ts (10.902 s)
FAIL src/token_bridge/__tests__/near-integration.ts (241.601 s)

query-sdk-ci-tests Solana queries testing rentEpoch - the arm64 solana-test-validator is a different version than the old one. a future PR may attempt to make them the same version (likely updating the amd64 version used, better yet to use the same image)

Additionally, this modifies the sdk-ci-tests to set maxWorkers=50% and exposes a tilt parameter. While in some instances, this may lead to performance improvements due to reusing workers, this is done here in an effort to save resources. In my benchmarking, the process was consuming up to 16GB of memory (and competing for resources) with the existing default workers, while --maxWorkers=1 only required 4GB. Here's the test times from CI a run.

src/token_bridge/__tests__/terra-integration.ts (123.991 s)
src/token_bridge/__tests__/algorand-integration.ts (122.608 s)
src/cosmwasm/query.testnet.test.ts
src/algorand/__tests__/unit.ts (10.144 s)
src/token_bridge/__tests__/sui-integration.ts (56.435 s)
src/relayer/__tests__/wormhole_relayer.ts (407.135 s)
src/utils/repairVaa.test.ts (9.566 s)
src/token_bridge/__tests__/eth-integration.ts (51.297 s)
src/nft_bridge/__tests__/aptos-integration.ts (106.115 s)
src/token_bridge/__tests__/aptos-integration.ts (54.351 s)
src/token_bridge/__tests__/solana-integration.ts (86.633 s)
src/algorand/__tests__/testHelpers.ts
src/token_bridge/__tests__/terra2-integration.ts (49.393 s)
src/token_bridge/__tests__/near-integration.ts (69.41 s)
src/nft_bridge/__tests__/integration.ts (35.875 s)
src/utils/array.test.ts
src/relayer/__tests__/serde.ts
src/bridge/__tests__/wormhole_ibc_e2e.ts (9.164 s)
src/relayer/__tests__/relay_provider.ts
src/vaa/__tests__/circleUnit.ts

The longest test is wormhole_relayer.ts at 407s while the rest of the tests cumulatively are about 780s. Yet, here are the results from a few test runs. [default] [50%] [1]

# current default (--maxWorkers=CPUs-1)
Time:        483.734 s
# --maxWorkers=50%
Time:        491.606 s
# --runInBand / maxWorkers=1
Time:        1214.48 s

@evan-gray evan-gray force-pushed the tilt-m1 branch 3 times, most recently from 990e3ee to 2b0301c Compare December 6, 2024 15:00
@evan-gray
Copy link
Contributor Author

evan-gray commented Dec 6, 2024

Docker resource usage with the new default --maxWorkers=50%. Long term, a better approach would be to remove this deprecated SDK and rely on the new SDK and newer tooling (such as Bun) for the equivalent tests.

image

@evan-gray evan-gray requested a review from kcsongor December 6, 2024 17:16
@evan-gray evan-gray marked this pull request as ready for review December 6, 2024 17:17
@evan-gray evan-gray requested a review from a5-pickle as a code owner December 6, 2024 17:17
@evan-gray evan-gray merged commit 6d15f04 into wormhole-foundation:main Dec 6, 2024
24 checks passed
@evan-gray evan-gray deleted the tilt-m1 branch December 6, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants