Skip to content

e2e: fix airdrop race condition by explicitly passing RPC URL#2816

Merged
snormore merged 1 commit intomainfrom
snor/fix-e2e-airdrop-race
Feb 4, 2026
Merged

e2e: fix airdrop race condition by explicitly passing RPC URL#2816
snormore merged 1 commit intomainfrom
snor/fix-e2e-airdrop-race

Conversation

@snormore
Copy link
Contributor

@snormore snormore commented Feb 4, 2026

Summary

  • Fix race condition where solana airdrop runs before client container's entrypoint configures the Solana CLI, causing it to default to mainnet and fail with 429 rate limiting
  • Explicitly pass -u flag with local ledger URL to the airdrop command

Root Cause

When the client container starts, entrypoint.sh first waits for the solana validator to be healthy before running solana config set --url. However, client.go:Start() immediately executes solana airdrop after container startup without waiting for the entrypoint to complete. Since the Solana CLI config hasn't been set yet, it defaults to https://api.mainnet-beta.solana.com/.

Testing Verification

CI e2e tests pass and TestE2E_MultiClient no longer fails with mainnet rate limiting errors.

The solana airdrop command was being executed before the client
container's entrypoint had configured the solana CLI, causing it
to default to mainnet and fail with rate limiting errors.

Fix by explicitly passing the -u flag with the local ledger URL.
@snormore snormore enabled auto-merge (squash) February 4, 2026 18:12
@snormore snormore merged commit 5fd3c07 into main Feb 4, 2026
21 of 23 checks passed
@snormore snormore deleted the snor/fix-e2e-airdrop-race branch February 4, 2026 18:21
bgm-malbeclabs pushed a commit that referenced this pull request Feb 4, 2026
## Summary
- Fix race condition where `solana airdrop` runs before client
container's entrypoint configures the Solana CLI, causing it to default
to mainnet and fail with 429 rate limiting
- Explicitly pass `-u` flag with local ledger URL to the airdrop command

## Root Cause
When the client container starts, `entrypoint.sh` first waits for the
solana validator to be healthy before running `solana config set --url`.
However, `client.go:Start()` immediately executes `solana airdrop` after
container startup without waiting for the entrypoint to complete. Since
the Solana CLI config hasn't been set yet, it defaults to
`https://api.mainnet-beta.solana.com/`.

## Testing Verification
CI e2e tests pass and `TestE2E_MultiClient` no longer fails with mainnet
rate limiting errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants