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

fix(nayduck) - The nayduck infra looks for the test contracts in the wrong place. #12750

Open
wacban opened this issue Jan 16, 2025 · 0 comments
Labels
C-good-first-issue Category: issues that are self-contained and easy for newcomers to work on.

Comments

@wacban
Copy link
Contributor

wacban commented Jan 16, 2025

Description

The nayduck infra tries to load the contracts from the source code directory:

def load_test_contract(
filename: str = 'backwards_compatible_rs_contract.wasm') -> bytearray:
"""Loads a WASM file from near-test-contracts package.
This is just a convenience function around load_binary_file which loads
files from ../runtime/near-test-contracts/res directory. By default
test_contract_rs.wasm is loaded.
"""
repo_dir = pathlib.Path(__file__).resolve().parents[2]
path = repo_dir / 'runtime/near-test-contracts/res' / filename
return load_binary_file(path)

The actual contracts however are stored in the out dir:

fn build_contract(dir: &str, args: &[&str], output: &str) -> Result<(), Error> {
let target_dir = out_dir();

This results in the contracts used by nayduck never being updated. If the old contract somehow gets lost, some tests will immediately start failing.

Please fix it so that the nayduck python tests always use the correct contracts.

More context:
https://near.zulipchat.com/#narrow/channel/295302-general/topic/nayduck/near/494153129

Potential fix - needs testing and finishing:
#12748

@wacban wacban added the C-good-first-issue Category: issues that are self-contained and easy for newcomers to work on. label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-good-first-issue Category: issues that are self-contained and easy for newcomers to work on.
Projects
None yet
Development

No branches or pull requests

1 participant