Skip to content

fix(aptos): use 127.0.0.1 for CTF RPC URL to avoid IPv6 flakes on CI#1082

Closed
graham-chainlink wants to merge 1 commit into
mainfrom
ggoh/fix-aptos-ctf-ipv6-flake
Closed

fix(aptos): use 127.0.0.1 for CTF RPC URL to avoid IPv6 flakes on CI#1082
graham-chainlink wants to merge 1 commit into
mainfrom
ggoh/fix-aptos-ctf-ipv6-flake

Conversation

@graham-chainlink

Copy link
Copy Markdown
Collaborator

Summary

TestChain_ReadOnly was failing on Linux CI with dial tcp [::1]:<port>: connection refused when calling the Aptos REST API. testcontainers exposes nodes as http://localhost:<port>, which Go often resolves to IPv6 (::1) on Linux runners, while Docker port mappings are bound on IPv4 only.

This change builds the Aptos node URL from the allocated freeport using 127.0.0.1 explicitly, refactors container startup to use retry-go (consistent with other CTF providers), and replaces the fixed sleep readiness loop with retry-based health polling. The test also uses testutils.DefaultNetworkOnce and the read-write client for deploy calls.

@changeset-bot

changeset-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 00349fc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
chainlink-deployments-framework Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

TestChain_ReadOnly failed with dial tcp [::1]:port connection refused because
testcontainers returns localhost URLs that Go resolves to IPv6 on Linux runners
while Docker port mappings listen on IPv4. Build the Aptos node URL from the
allocated freeport on 127.0.0.1, align container startup with retry-go, and
improve readiness polling.
@graham-chainlink graham-chainlink force-pushed the ggoh/fix-aptos-ctf-ipv6-flake branch from 645054b to 00349fc Compare July 1, 2026 02:33
@graham-chainlink graham-chainlink deleted the ggoh/fix-aptos-ctf-ipv6-flake branch July 1, 2026 03:12
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.

1 participant