Repository navigation
fix(cram): isolate temporary directories per test - #16930
Merged
Merged
Conversation
rgrinberg
force-pushed
the
push-ykurpyoymrux
branch
2 times, most recently
from
November 8, 2026 05:05
4b68e2f to
fa736c9
Compare
rgrinberg
force-pushed
the
push-ykurpyoymrux
branch
2 times, most recently
from
November 8, 2026 06:31
9e7cdbd to
69f3c11
Compare
rgrinberg
added a commit
that referenced
this pull request
Nov 8, 2026
Record the current separation between Cram's internal temporary files and the directory exposed to tests as `TMPDIR`. Writing `main.sh`, `1.output`, and `cram.metadata` inside `TMPDIR` must not corrupt the runner's scripts, captured output, or metadata. Cover `sh`, Bash, and directory tests. Preserve the existing demonstration that different Cram tests currently share `TMPDIR`. This is test-only preparatory coverage for #16930 and passes without the isolation fix. Signed-off-by: Rudi Grinberg <[email protected]>
rgrinberg
force-pushed
the
push-ykurpyoymrux
branch
2 times, most recently
from
November 8, 2026 17:31
a93817a to
96eb60a
Compare
rgrinberg
force-pushed
the
push-ykurpyoymrux
branch
from
November 9, 2026 16:07
96eb60a to
7b40ee2
Compare
rgrinberg
added a commit
that referenced
this pull request
Nov 9, 2026
Extract and expand the temporary-directory environment coverage from #16930 into a test-only prerequisite. Record the runtime value in both regular actions and `(cram ...)` actions for the default, an `env`-stanza override, and an action-level `setenv` override. The probe reads `TMPDIR` on Unix and `TEMP` on Windows; generated paths are normalized without rewriting the explicit override markers. Current `main` replaces both kinds of override with Dune's managed directory in both contexts. The test records that behavior and checks that a second unchanged build reuses regular and Cram results. Signed-off-by: Rudi Grinberg <[email protected]>
rgrinberg
force-pushed
the
push-ykurpyoymrux
branch
from
November 9, 2026 16:29
7b40ee2 to
8cac374
Compare
Initialize the managed temporary directory before interpreting build actions, then preserve action-level overrides when spawning build jobs. Keep the separate temporary-directory default for internal jobs. Create an initially empty tmp directory beneath each Cram scratch directory and pass it through the environment without shell exports or random paths in rule digests. Invalidate old cached rules and Cram actions. Build on the separate override matrix, update its expected observations, and retain isolation, empty-directory, and runner-file separation coverage. Signed-off-by: Rudi Grinberg <[email protected]>
rgrinberg
force-pushed
the
push-ykurpyoymrux
branch
from
November 12, 2026 04:23
8cac374 to
cdc4e9d
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.
Builds on the temporary-directory defaults and override matrix in #16982.
Fix the shared
TMPDIRbehavior demonstrated in #16925 without adding shell exports. Initialize Dune's managed temporary directory when interpreting a build action, before action-levelsetenvnodes. Build-job process spawning preserves that final environment; internal jobs retain their separate Dune temporary directory. Directoryenv-varsbehavior is unchanged.Cram keeps its scripts, captured output, and metadata in its own scratch directory and exposes an initially empty
tmp/child to setup scripts and test commands. The paths are assigned at execution time, not embedded in generated shell commands or rule digests. Invalidate cached rules and Cram actions for the changed behavior.Update the preparatory matrix's expected values for regular-action
setenvand Cram's private directory. Remove the older standalone override test, while retaining isolation, empty-directory, setup-script, and runner-file separation coverage.