Skip to content

Commit

Permalink
When a TreeFileArtifact is on the inputs of an action, add the expans…
Browse files Browse the repository at this point in the history
…ion of its parent to the input metadata map (not just its state)

The lack of this caused breakage in a very specific case: when an action had a TreeFileArtifact on its inputs (but not its parent) and its parent was discovered as an input, the expansion of the parent wouldn't be present in the ArtifactExpander and thus would be missing from the inputs of the sandboxed/remoted action.

RELNOTES: None.
PiperOrigin-RevId: 597522977
Change-Id: Ia5967c9a88fb8f4fa3d5f5ae725feac3d734cf17
  • Loading branch information
lberki authored and copybara-github committed Jan 11, 2024
1 parent 5c5839f commit aa9b1a4
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,13 @@ static void addToMap(
SpecialArtifact treeArtifact = key.getParent();
TreeArtifactValue treeArtifactValue =
((ActionExecutionValue) value).getTreeArtifactValue(treeArtifact);
inputMap.putTreeArtifact(treeArtifact, treeArtifactValue, /* depOwner= */ treeArtifact);
addArchivedTreeArtifactMaybe(
treeArtifact, treeArtifactValue, archivedTreeArtifacts, inputMap, key);
expandTreeArtifactAndPopulateArtifactData(
treeArtifact,
treeArtifactValue,
expandedArtifacts,
archivedTreeArtifacts,
inputMap,
treeArtifact);
consumer.accumulate(treeArtifactValue);
}
FileArtifactValue metadata = ((ActionExecutionValue) value).getExistingFileArtifactValue(key);
Expand Down

0 comments on commit aa9b1a4

Please sign in to comment.