Skip to content

fix(ctf): bump chainlink-testing-framework to fix Sui/Aptos cwd tar race#22011

Merged
pavel-raykov merged 3 commits intodevelopfrom
fix-sui-ccip-tar-race
Apr 15, 2026
Merged

fix(ctf): bump chainlink-testing-framework to fix Sui/Aptos cwd tar race#22011
pavel-raykov merged 3 commits intodevelopfrom
fix-sui-ccip-tar-race

Conversation

@Fletch153
Copy link
Copy Markdown
Collaborator

@Fletch153 Fletch153 commented Apr 14, 2026

Summary

Bumps github.com/smartcontractkit/chainlink-testing-framework/framework to v0.15.16 across all repo modules to pull in the upstream fix that resolves a long-standing flake in Sui (and latently Aptos) CCIP smoke tests.

Upstream PR: smartcontractkit/chainlink-testing-framework#2519 (merged as v0.15.16).

Evidence — real CI failure

Run 24372896623, job 71183740665, test Test_CCIPTokenTransfer_Sui2EVM_BurnMintTokenPool:

ctf_provider.go:230: Attempt 1/10: Failed to start CTF Sui container:
  create container: created hook: can't copy
  /home/runner/_work/chainlink/chainlink/integration-tests/smoke/ccip to container:
  error compressing file: archive/tar: write too long
ctf_provider.go:230: Attempt 2/10: Failed to start CTF Sui container: ...
ctf_provider.go:230: Attempt 3/10: Failed to start CTF Sui container: ...

Three sequential attempts same error, same cwd. Retry loop absorbed it on that run; the hard-failure mode exhausts all 10 attempts.

Root Cause

CTF's Sui and Aptos blockchain providers unconditionally added a testcontainers.ContainerFile entry sourced from filepath.Abs(in.ContractsDir). When ContractsDir is empty (the chainlink-deployments-framework Sui/Aptos providers never set it — CTFChainProviderConfig exposes no knob), filepath.Abs("") resolves to the process cwd. testcontainers-go then tars the entire cwd into the container.

In CCIP smoke tests, cwd is integration-tests/smoke/ccip/, actively written by deployment/logger.SingleFileLogger (relative baseDir = "logs", autoFlushWriter syncs on every write). Files that grow between os.Stat (header size) and io.Copy (body) trip Go's archive/tar.ErrWriteTooLong.

startContainer in chainlink-deployments-framework/chain/sui/provider/ctf_provider.go:152,226 wraps NewBlockchainNetwork in retry.Do with retry.Attempts(10), retry.Delay(1s) — flake usually self-heals after a few attempts but occasionally exhausts.

Fix

The upstream CTF change gates the Files: entry on in.ContractsDir != "", eliminating the unnecessary cwd tar in the no-contracts path. Zero behaviour change for callers that supply a ContractsDir. Same fix applied to aptos.go. Solana path intentionally untouched (all Solana callers set ContractsDir explicitly).

Safety analysis

  • Non-empty ContractsDir callers: identical behaviour.
  • Empty ContractsDir callers: req.Files = nil. testcontainers-go hook (lifecycle.go:146-172) loops for _, f := range files → zero iterations on nil, no container-side state change.
  • Org-wide caller audit for TypeSui/TypeAptos: 3 callers total (chainlink-deployments-framework Sui provider, chainlink-deployments-framework Aptos provider, chainlink-aptos/integration-tests/ccip/ccip_deployment_test.go) — none pass ContractsDir. The empty path is not a documented default: the CTF Input struct comment scopes the field to Solana.
  • Sui/Aptos containers don't consume tarred / contents anyway — contracts publish host-side via RPC (sui client publish, aptos move publish). req.Files was dead code for these chains.
  • Delta scope: chainlink's CTF pins were at v0.15.13 (most modules) / v0.15.15 (core/scripts) → v0.15.16. Delta in framework/components/blockchain/ is 1 unrelated commit (#2517 update sui version) + the 2 fix commits.

What's In This PR

Module bumps only — no source changes:

  • core/scripts/go.mod
  • deployment/go.mod
  • devenv/go.mod, devenv/fakes/go.mod
  • integration-tests/go.mod, integration-tests/load/go.mod
  • system-tests/lib/go.mod, system-tests/tests/go.mod

Pinned to v0.15.16 (stable release tag).

Test plan

  • go build ./... clean locally across deployment and integration-tests modules
  • go mod tidy clean across all 8 modules
  • CI green — 188 checks pass, 26 skipped, 0 failing (two unrelated flakes — Cron Regression port collision, CCIP Sui upgrade commit-report timeout — passed on a single rerun each)
  • Verified no archive/tar: write too long occurrences in any CI log on this PR

Bumps github.com/smartcontractkit/chainlink-testing-framework/framework
across all repo modules to pull in the upstream fix that gates the
testcontainers ContainerFile entry on a non-empty ContractsDir.

Previously, Sui and Aptos blockchain providers in the framework called
filepath.Abs(in.ContractsDir) and unconditionally added a Files entry
to the container request. Because filepath.Abs("") resolves to cwd,
testcontainers-go tarred the entire test working directory. Any file
that grew between os.Stat (header size) and io.Copy (body) tripped
archive/tar's ErrWriteTooLong guard, surfacing in CCIP Sui smoke tests
as:

  ctf_provider.go:230: Attempt 1/10: Failed to start CTF Sui container:
    create container: created hook: can't copy ... to container:
    error compressing file: archive/tar: write too long

The retry loop (10 attempts, 1s) usually masked the flake but
intermittently exhausted, hard-failing tests like
Test_CCIPTokenTransfer_Sui2EVM_BurnMintTokenPool_WithAllowlist.

Upstream fix: smartcontractkit/chainlink-testing-framework#2519
@github-actions
Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 14, 2026

✅ No conflicts with other open PRs targeting develop

@trunk-io
Copy link
Copy Markdown

trunk-io bot commented Apr 14, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Picks up smartcontractkit/chainlink-testing-framework#2519 refactor
commit (14664092839c) — same behavioural fix, minimized diff.
Pulls in smartcontractkit/chainlink-testing-framework#2519 — the Sui/Aptos
CTF provider cwd tar-race fix. Eliminates intermittent 'archive/tar:
write too long' flakes in Sui CCIP smoke tests.

Tidied go.sum across all 8 modules.
@Fletch153 Fletch153 force-pushed the fix-sui-ccip-tar-race branch from cac4190 to ebb6165 Compare April 14, 2026 18:51
@cl-sonarqube-production
Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@Fletch153 Fletch153 marked this pull request as ready for review April 14, 2026 20:14
@Fletch153 Fletch153 requested review from a team as code owners April 14, 2026 20:14
@Fletch153 Fletch153 requested a review from jmank88 April 15, 2026 08:33
@pavel-raykov pavel-raykov added this pull request to the merge queue Apr 15, 2026
Merged via the queue into develop with commit 7906045 Apr 15, 2026
363 of 367 checks passed
@pavel-raykov pavel-raykov deleted the fix-sui-ccip-tar-race branch April 15, 2026 10:53
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