Skip to content

fix Sui fund account with retry - #2799

Merged
FelixFan1992 merged 3 commits into
mainfrom
fix-sui-fund-account
Sep 4, 2026
Merged

FelixFan1992 merged 3 commits into
mainfrom
fix-sui-fund-account

Conversation

@FelixFan1992

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI lite review requested due to automatic review settings September 3, 2026 21:18
@FelixFan1992
FelixFan1992 requested a review from a team as a code owner September 3, 2026 21:18
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

👋 FelixFan1992, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions

github-actions Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

📊 API Diff Results

No changes detected for module github.com/smartcontractkit/chainlink-testing-framework/framework

View full report

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new retry classifier treats context.DeadlineExceeded as non-retryable, which can block retries on per-attempt timeouts and undermine the PR’s core goal.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR improves reliability of Sui account funding during container startup by adding bounded retries around the faucet /gas call, reducing flakiness caused by the faucet HTTP handler not being ready immediately after the port starts listening.

Changes:

  • Add bounded retry/backoff logic with per-request and overall timeouts for Sui faucet funding.
  • Introduce structured error classification (faucetStatusError + isRetryableFaucetErr) to decide which failures should be retried.
  • Thread caller context into fundAccount from newSui so funding respects upstream cancellation.
File summaries
File Description
framework/components/blockchain/sui.go Adds retry + timeout behavior for Sui faucet funding and updates the call site to pass context.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +139 to +143
// A cancelled/deadline-exceeded context means the caller (or the total budget) has
// given up; never retry, just propagate.
if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) {
return false
}
Comment on lines +131 to +135
// isRetryableFaucetErr classifies faucet /gas errors. Transient failures (faucet still
// warming up, brief network blips, rate limiting, 5xx) are retried; failures that retrying
// cannot fix (a malformed request, an already-cancelled context, 4xx other than 429) stop
// immediately so they don't burn the retry budget and prolong startup/teardown.
func isRetryableFaucetErr(err error) bool {
@FelixFan1992
FelixFan1992 merged commit 7effeef into main Sep 4, 2026
61 checks passed
@FelixFan1992
FelixFan1992 deleted the fix-sui-fund-account branch September 4, 2026 14:06
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