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

Unify sandbox/remote handling of empty TreeArtifact inputs #15449

Merged
merged 1 commit into from
May 10, 2022
Merged

Unify sandbox/remote handling of empty TreeArtifact inputs #15449

merged 1 commit into from
May 10, 2022

Commits on May 10, 2022

  1. Unify sandbox/remote handling of empty TreeArtifact inputs

    Actions that take a TreeArtifact as input should see a corresponding
    directory even if the TreeArtifact is empty.
    
    Previously, SandboxHelpers contained special handling for the case of
    empty TreeArtifact action inputs to ensure that they are added to the
    sandbox as empty directories. As pointed out in a comment, this logic
    should live in SpawnInputExpander, where it would also apply to remote
    execution.
    
    This commit adds a integration tests for this previously untested case,
    extracts the logic into SpawnInputExpander and adapts
    DirectoryTreeBuilder to handle empty TreeArtifacts when creating the
    Merkle trees.
    
    Note: The Merkle tree builder now reports an error when it encounters a
    non-empty TreeArtifact. Such an artifact should have been expanded by
    SpawnInputExpander and if it wasn't, e.g. because it wasn't properly
    registered with Skyframe, it can't be expanded at this point anyway.
    The tests uncovered that the spawn for split coverage postprocessing declared the
    coverage dir artifact as such an input. In this case, it can simply be
    removed as the coverage script creates the coverage dir if it doesn't
    exist.
    
    Closes #15276.
    
    PiperOrigin-RevId: 446452587
    fmeum authored and ckolli5 committed May 10, 2022
    Configuration menu
    Copy the full SHA
    d238c53 View commit details
    Browse the repository at this point in the history