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

[Bug] Examples are flaky #31

Open
gregnazario opened this issue Aug 26, 2024 · 2 comments
Open

[Bug] Examples are flaky #31

gregnazario opened this issue Aug 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@gregnazario
Copy link
Contributor

gregnazario commented Aug 26, 2024

🐛 Bug Description

In CI, it seems like the builds fail periodically because of sequence number synchronization issues (usually because we aren't waiting on the sequence number), or it may be possible we don't use cookie stickiness on backends.

Example: https://github.com/aptos-labs/aptos-python-sdk/actions/runs/10567843264/job/29277642966?pr=30

Rotation to MultiPublicKey complete, new authkey: 0xf24cd6264990e79b343ee05d39d847672240c20d63498a7bc6e3ce4ee444ab49
poetry run python -m examples.read_aggregator
Total circulating APT: 18457257503516241927
poetry run python -m examples.secp256k1_ecdsa_transfer_coin
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 1[96](https://github.com/aptos-labs/aptos-python-sdk/actions/runs/10567843264/job/29277642966?pr=30#step:4:97), in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/runner/work/aptos-python-sdk/aptos-python-sdk/examples/secp256k1_ecdsa_transfer_coin.py", line 68, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/runner/work/aptos-python-sdk/aptos-python-sdk/examples/secp256k1_ecdsa_transfer_coin.py", line 28, in main
    await asyncio.gather(*[alice_fund, bob_fund])
  File "/home/runner/work/aptos-python-sdk/aptos-python-sdk/aptos_sdk/async_client.py", line 920, in fund_account
    raise ApiError(response.text, response.status_code)
aptos_sdk.async_client.ApiError: API error Error(VmError): Invalid transaction: Type: Validation Code: SEQUENCE_NUMBER_TOO_OLD

Second example, also from the faucet https://github.com/aptos-labs/aptos-python-sdk/actions/runs/10567843264/job/29278249030?pr=30

poetry run python -m examples.aptos_token
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/runner/work/aptos-python-sdk/aptos-python-sdk/examples/aptos_token.py", line 125, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/runner/work/aptos-python-sdk/aptos-python-sdk/examples/aptos_token.py", line 30, in main
    await asyncio.gather(*[bob_fund, alice_fund])
  File "/home/runner/work/aptos-python-sdk/aptos-python-sdk/aptos_sdk/async_client.py", line 9[20](https://github.com/aptos-labs/aptos-python-sdk/actions/runs/10567843264/job/29278249030?pr=30#step:4:21), in fund_account
    raise ApiError(response.text, response.status_code)
aptos_sdk.async_client.ApiError: API error Error(VmError): Invalid transaction: Type: Validation Code: SEQUENCE_NUMBER_TOO_OLD
@gregnazario gregnazario added the bug Something isn't working label Aug 26, 2024
@gregnazario gregnazario changed the title [Bug] Multikey rotation example is flaky [Bug] Examples are flaky Aug 26, 2024
@gregnazario
Copy link
Contributor Author

This seems to be derived from the devnet faucet. I'm not sure there was a behavior change. I'm going to bypass the CI for devnet for right now.

@gregnazario
Copy link
Contributor Author

Now there's a different flakiness, where indexer requests fail, because we don't wait for the indexer to update first.

@github-staff github-staff deleted a comment from Lxx-c Oct 23, 2024
@github-staff github-staff deleted a comment from Lxx-c Oct 23, 2024
@github-staff github-staff deleted a comment from Lxx-c Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants
@gregnazario and others