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

sdk test setup: fix racy access on tmp config file #18628

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

rvantonder
Copy link
Contributor

@rvantonder rvantonder commented Jul 12, 2024

Description

Some test setups call [setup(), setup()] which can cause a race on accessing the tmp config.yaml (which happens in the same tmp directory). This change ensures setup() is creates config.yaml in unique directories.

This issue is probably what caused the flakiness in CI, note the:

Cannot open wallet config file at "/tmp/client.yaml

Test plan

Tested locally that running the test creates separate directories and passes.


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

@rvantonder rvantonder requested a review from a team as a code owner July 12, 2024 00:30
Copy link

vercel bot commented Jul 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
multisig-toolkit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2024 0:40am
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2024 0:40am
sui-kiosk ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2024 0:40am
sui-typescript-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2024 0:40am

Copy link
Contributor

github-actions bot commented Jul 12, 2024

⚠️ 🦋 Changesets Warning: This PR has changes to public npm packages, but does not contain a changeset. You can create a changeset easily by running pnpm changeset in the root of the Sui repo, and following the prompts. If your change does not need a changeset (e.g. a documentation-only change), you can ignore this message. This warning will be removed when a changeset is added to this pull request.

Learn more about Changesets.

@rvantonder rvantonder merged commit 02599ed into main Jul 12, 2024
51 checks passed
@rvantonder rvantonder deleted the rvt/unique-tmp-dir-e2e-ts branch July 12, 2024 05:24
tx-tomcat pushed a commit to tx-tomcat/sui-network that referenced this pull request Jul 29, 2024
## Description 

Some test setups call [`[setup(),
setup()]`](https://github.com/MystenLabs/sui/blob/9c588e14f284a8feb10f29791f32ad6bb3f36ae4/sdk/typescript/test/e2e/coin-with-balance.test.ts#L22)
which can cause a race on accessing the tmp `config.yaml` (which happens
in the same tmp directory). This change ensures `setup()` is creates
`config.yaml` in unique directories.

This issue is probably what caused the flakiness in
[CI](https://github.com/MystenLabs/sui/actions/runs/9897466376/job/27342099106#step:10:2279),
note the:

```
Cannot open wallet config file at "/tmp/client.yaml
```

## Test plan 

Tested locally that running the test creates separate directories and
passes.

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
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.

2 participants