Skip to content

Isolate cargo target dir in auto build tests - #2803

Merged
leighmcculloch merged 1 commit into
mainfrom
isolate-auto-build-target-dirs
Oct 15, 2026
Merged

leighmcculloch merged 1 commit into
mainfrom
isolate-auto-build-target-dirs

Conversation

@leighmcculloch

Copy link
Copy Markdown
Member

What

Give each auto-build integration test its own CARGO_TARGET_DIR inside its sandbox temp dir.

Why

Parallel tests building the same fixture share one target dir, and the CLI rewrites the output wasm in place after cargo releases its lock, so a concurrent test can read an empty file and fail with unexpected end-of-file (at offset 0x0) (failed run).

Known limitations

Each test now compiles its dependencies from scratch, and concurrent stellar contract build runs on one workspace can still collide for users since the in-place rewrite in build.rs is not atomic.

Copilot AI lite review requested due to automatic review settings October 15, 2026 00:05
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Oct 15, 2026
@leighmcculloch
leighmcculloch requested a review from fnando October 15, 2026 00:05

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.

🟢 Approval recommended

The targeted test changes consistently isolate build output, with no unresolved findings.

0 open findings

What changed in this PR

This PR isolates Cargo build artifacts for the auto-build integration tests, preventing parallel tests from rewriting the same output file.

Changes:

  • Sets CARGO_TARGET_DIR to each test’s sandbox directory for eight deploy and upload auto-build cases.
File Description
cmd/​crates/​soroban-test/​tests/​it/​integration/​auto_build.rs Gives each affected test an isolated build target directory.

🧠 Review effort: Lite


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

@leighmcculloch

Copy link
Copy Markdown
Member Author

This change may be unnecessary after this is fixed:

But in general it seems like a better idea to have build tests be isolated, so I think it is still a good idea to merge this. If we find that over time the tests take too long as a result we could wind this back, or look at other solutions.

@leighmcculloch

Copy link
Copy Markdown
Member Author

Making this change doesn't appear to negatively impact the RPC tests runtime. I guess because they run concurrently. 🎉

@leighmcculloch
leighmcculloch merged commit 94b86ff into main Oct 15, 2026
151 checks passed
@leighmcculloch
leighmcculloch deleted the isolate-auto-build-target-dirs branch October 15, 2026 04:35
@github-project-automation github-project-automation Bot moved this from Backlog (Not Ready) to Done in DevX Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants