Commit 00bb86b
Fix crash on remote-only action template outputs
Fixes the following type of crash when the outputs of an action template are built with BwoB without being downloaded:
```
java.lang.RuntimeException: Unrecoverable error while evaluating node 'TargetCompletionKey{topLevelArtifactContext=com.google.devtools.build.lib.analysis.TopLevelArtifactContext@90504ed, actionLookupKey=ConfiguredTargetKey{label=//a:main, config=BuildConfigurationKey[ace1802e9ffc3691a893a40a89ff0d55ab85b5bb1a265fd1bb830b1af3f3a0e0]}, willTest=false}' (requested by nodes 'BuildDriverKey of ActionLookupKey: ConfiguredTargetKey{label=//a:main, config=BuildConfigurationKey[4e639ef1ee6b55f3683fb1281a60a624b3a6eb2ef19705d98d7e875872945deb]}')
at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:551)
at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:435)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.compute(Unknown Source)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.compute(Unknown Source)
at java.base/java.util.concurrent.ForkJoinTask$InterruptibleTask.exec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: generating action for artifact File:[[<execution_root>]bazel-out/darwin_arm64-fastbuild/bin]a/_objs/main/dir is not an ActionExecutionMetadata
at com.google.common.base.Preconditions.checkState(Preconditions.java:603)
at com.google.devtools.build.lib.remote.RemoteImportantOutputHandler.getGeneratingAction(RemoteImportantOutputHandler.java:191)
at com.google.devtools.build.lib.remote.RemoteImportantOutputHandler.downloadArtifact(RemoteImportantOutputHandler.java:164)
at com.google.devtools.build.lib.remote.RemoteImportantOutputHandler.ensureToplevelArtifacts(RemoteImportantOutputHandler.java:117)
at com.google.devtools.build.lib.remote.RemoteImportantOutputHandler.processOutputsAndGetLostArtifacts(RemoteImportantOutputHandler.java:72)
at com.google.devtools.build.lib.skyframe.CompletionFunction.informImportantOutputHandler(CompletionFunction.java:431)
at com.google.devtools.build.lib.skyframe.CompletionFunction.compute(CompletionFunction.java:327)
at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:471)
```
Closes #26143.
PiperOrigin-RevId: 776209213
Change-Id: Id17372a202cab5b57bc9fccfdba53291fd08a91b1 parent d49967e commit 00bb86b
File tree
2 files changed
+59
-5
lines changed- src
- main/java/com/google/devtools/build/lib/remote
- test/shell/bazel/remote
2 files changed
+59
-5
lines changedLines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
| |||
190 | 192 | | |
191 | 193 | | |
192 | 194 | | |
193 | | - | |
194 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
195 | 198 | | |
196 | 199 | | |
197 | 200 | | |
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
574 | 625 | | |
575 | 626 | | |
576 | 627 | | |
| |||
0 commit comments