Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.0.1] Fixes for Bazel's own integration tests fail locally on Linux #20821

Merged
merged 3 commits into from
Jan 9, 2024

Commits on Jan 9, 2024

  1. Always add containing trees of input tree file artifacts to the metad…

    …ata map.
    
    This happens for action templates.
    
    The reason is that the Linux sandbox needs to know where the tree file artifact is materialized to, which information is stored in its parent.
    
    The reason for making this a flag was performance, but it's only at most one tree artifact per action, it's a constant time operation per tree artifact and it only happens rarely (on templated actions) so I think this time, simplicity is better than performance.
    
    The surprising change to ActionInputMapHelper was needed because before this change, the tree artifact was a discovered input and therefore was processed by the code path in ActionExecutionFunction.addDiscoveredInputs(), which populated archivedTreeArtifacts but addToMap() did not. It was presumably the bug.
    
    The depOwner argument of putTreeArtifact may also be wrong there. It's at least inconsistent with the other two call sites, but I don't want to add more polish at some risk to this change so I decided to not add it to addArchivedTreeArtifactMaybe().
    
    Progress towards bazelbuild#20753.
    
    RELNOTES: None.
    PiperOrigin-RevId: 596586625
    Change-Id: Ib690a84508da07560ec376d4e87ed8fb2211979f
    lberki authored and iancha1992 committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    addea47 View commit details
    Browse the repository at this point in the history
  2. Rewrite paths of writable directories that are under the execroot.

    This is necessary because that paths of those directories are different when seen by Bazel and by the processes within the sandbox and the sandbox interprets paths to writable directories as within the sandbox.
    
    This is notably the case for $TEST_TMPDIR. The reason why this worked at all is that the $TEST_TMPDIR that Bazel passes to the test is relative to the working directory (it's absolutized in the test wrapper script)
    
    Progress on bazelbuild#20753.
    
    RELNOTES: None.
    PiperOrigin-RevId: 596566851
    Change-Id: Ifb56a3016a521b6a0cd4b5700172951d6feabddf
    lberki authored and iancha1992 committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    b81d07b View commit details
    Browse the repository at this point in the history
  3. Add tree artifact metadata for the coverage post-processing spawn.

    This makes --experimental_split_coverage_postprocessing work in the wake of bazelbuild@fb6658c: before, it was enough to add the metadata of the tree file artifacts to the metadata provider of the post-processing action, but that change made the metadata of the tree artifact necessary, too.
    
    Progress towards bazelbuild#20753.
    
    RELNOTES: None.
    PiperOrigin-RevId: 596929659
    Change-Id: I481ef36328de7f7ab07f2ec7a0ac83d5fd508c36
    lberki authored and iancha1992 committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    2878730 View commit details
    Browse the repository at this point in the history