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
Closed
fix(aptos): use 127.0.0.1 for CTF RPC URL to avoid IPv6 flakes on CI#1082graham-chainlink wants to merge 1 commit into
graham-chainlink wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 00349fc The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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.
645054b to
00349fc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TestChain_ReadOnlywas failing on Linux CI withdial tcp [::1]:<port>: connection refusedwhen calling the Aptos REST API. testcontainers exposes nodes ashttp://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.1explicitly, refactors container startup to useretry-go(consistent with other CTF providers), and replaces the fixed sleep readiness loop with retry-based health polling. The test also usestestutils.DefaultNetworkOnceand the read-write client for deploy calls.