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: running near_workspaces::compile_project concurrently in tests #266

Merged
merged 6 commits into from
Dec 18, 2024

Conversation

dj8yfo
Copy link
Collaborator

@dj8yfo dj8yfo commented Dec 13, 2024

@dj8yfo dj8yfo force-pushed the wasmopt_concurrent branch from d144b24 to d0fa87e Compare December 13, 2024 22:09
@@ -162,19 +162,37 @@ pub fn run(args: Opts) -> eyre::Result<CompilationArtifact> {
color,
)?;

wasm_artifact.path = crate::fs::copy(&wasm_artifact.path, &out_dir)?;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sometimes the final destination file is written with non-wasm-opt-ed content,
which might be the reason of failures in concurrent context when many tests run
near_workspaces::compile_project

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

was able to easily reproduce this on this commit dj8yfo/near-sdk-rs@027ce75

    receipts: [
        ExecutionOutcome {
            transaction_hash: 61H3aajosM8kDV3jbpuzFaAnMrTCb4DL871gVbbocNag,
            block_hash: HVzmo5HTPZJySPhG5CXMPvde5kMTAGigWKgREbttsoBH,
            logs: [],
            receipt_ids: [
                Dm63UmQr9mqrF6mDiRUxHTaWo8ESKbPHr1p9taEzSzaf,
            ],
            gas_burnt: NearGas {
                inner: 888148937360,
            },
            tokens_burnt: NearToken {
                inner: 88814893736000000000,
            },
            executor_id: AccountId(
                "dev-20241216183040-18506921751143",
            ),
            status: Failure(ActionError(ActionError { index: Some(0), kind: FunctionCallError(CompilationError(PrepareError(Deserialization))) })),
        },
    ],
    status: Failure(ActionError(ActionError { index: Some(0), kind: FunctionCallError(CompilationError(PrepareError(Deserialization))) })),
}
thread 'test_storage_deposit_refunds_excessive_deposit' panicked at tests/workspaces.rs:86:5:
assertion failed: res.is_success()


failures:
    simulate_transfer_call_when_called_contract_not_registered_with_ft
    simulate_transfer_call_with_promise_and_refund
    test_close_account_empty_balance
    test_storage_deposit_refunds_excessive_deposit

test result: FAILED. 9 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out; finished in 34.43s

Copy link
Collaborator Author

@dj8yfo dj8yfo Dec 16, 2024

Choose a reason for hiding this comment

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

adding near/near-sdk-rs@ffab607 with patch, pointing to current pr, on top of previous change (near/near-sdk-rs#1277) resolved flaky failures

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@dj8yfo dj8yfo marked this pull request as ready for review December 13, 2024 22:38
@dj8yfo dj8yfo marked this pull request as draft December 16, 2024 10:20
@dj8yfo dj8yfo force-pushed the wasmopt_concurrent branch from d0fa87e to 50516cf Compare December 16, 2024 18:12
@dj8yfo dj8yfo force-pushed the wasmopt_concurrent branch from 50516cf to 9df7503 Compare December 16, 2024 18:16
@dj8yfo dj8yfo changed the title fix: running compile_project concurrently in tests fix: running near_workspaces::compile_project concurrently in tests Dec 16, 2024
@dj8yfo dj8yfo marked this pull request as ready for review December 16, 2024 19:28
@dj8yfo
Copy link
Collaborator Author

dj8yfo commented Dec 16, 2024

@race-of-sloths include

@race-of-sloths
Copy link

race-of-sloths commented Dec 16, 2024

@dj8yfo Thank you for your contribution! Your pull request is now a part of the Race of Sloths!
Weekly streak is on the road, smart strategy! Secure your streak with another PR!

Shows inviting banner with latest news.

Shows profile picture for the author of the PR

Current status: executed
Reviewer Score
@PolyProgrammist 8

Your contribution is much appreciated with a final score of 8!
You have received 92 (80 base + 15% lifetime bonus) Sloth points for this contribution

@PolyProgrammist received 25 Sloth Points for reviewing and scoring this pull request.

What is the Race of Sloths

Race of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow

For contributors:

  • Tag @race-of-sloths inside your pull requests
  • Wait for the maintainer to review and score your pull request
  • Check out your position in the Leaderboard
  • Keep weekly and monthly streaks to reach higher positions
  • Boast your contributions with a dynamic picture of your Profile

For maintainers:

  • Score pull requests that participate in the Race of Sloths and receive a reward
  • Engage contributors with fair scoring and fast responses so they keep their streaks
  • Promote the Race to the point where the Race starts promoting you
  • Grow the community of your contributors

Feel free to check our website for additional details!

Bot commands
  • For contributors
    • Include a PR: @race-of-sloths include to enter the Race with your PR
  • For maintainers:
    • Invite contributor @race-of-sloths invite to invite the contributor to participate in a race or include it, if it's already a runner.
    • Assign points: @race-of-sloths score [1/2/3/5/8/13] to award points based on your assessment.
    • Reject this PR: @race-of-sloths exclude to send this PR back to the drawing board.
    • Exclude repo: @race-of-sloths pause to stop bot activity in this repo until @race-of-sloths unpause command is called

@dj8yfo dj8yfo requested a review from akorchyn December 16, 2024 19:36
Copy link
Collaborator

@PolyProgrammist PolyProgrammist left a comment

Choose a reason for hiding this comment

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

Here - should be near organisation near/near-sdk-rs@ffab607

cargo-near-build/src/fs.rs Show resolved Hide resolved
cargo-near-build/src/fs.rs Show resolved Hide resolved
@dj8yfo dj8yfo requested a review from FroVolod as a code owner December 17, 2024 20:08
@PolyProgrammist PolyProgrammist enabled auto-merge (squash) December 18, 2024 09:02
@PolyProgrammist
Copy link
Collaborator

@race-of-sloths score 8

@PolyProgrammist PolyProgrammist merged commit d15286c into near:main Dec 18, 2024
17 checks passed
@frol frol mentioned this pull request Dec 18, 2024
dj8yfo pushed a commit that referenced this pull request Dec 18, 2024
## 🤖 New release
* `cargo-near`: 0.13.0 -> 0.13.1 (✓ API compatible changes)
* `cargo-near-build`: 0.4.0 -> 0.4.1 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

## `cargo-near`
<blockquote>

##
[0.13.1](cargo-near-v0.13.0...cargo-near-v0.13.1)
- 2024-12-18

### Other

- update `cargo near new` template `image` and `image_digest`
([#269](#269))
</blockquote>

## `cargo-near-build`
<blockquote>

##
[0.4.1](cargo-near-build-v0.4.0...cargo-near-build-v0.4.1)
- 2024-12-18

### Fixed

- running `near_workspaces::compile_project` concurrently in tests
(#266)
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
dj8yfo pushed a commit to dj8yfo/workspaces-rs that referenced this pull request Dec 18, 2024
akorchyn pushed a commit to near/near-workspaces-rs that referenced this pull request Dec 18, 2024
akorchyn pushed a commit to near/near-workspaces-rs that referenced this pull request Dec 18, 2024
## 🤖 New release
* `near-workspaces`: 0.15.0 -> 0.16.0 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.16.0](near-workspaces-v0.15.0...near-workspaces-v0.16.0)
- 2024-12-18

### Fixed

- include fix from near/cargo-near#266 (#395)

### Other

- [**breaking**] updates near-* dependencies to 0.28 release (#392)
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
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