Skip to content

Commit 765b497

Browse files
committed
Remove support for REv2.0
My plan is to remove support for these older versions of the remote execution protocol from bb-remote-execution on 2026-04-01. Right now this support is gated by some configuration options. By removing support for this from bb-browser, it should be a bit easier for people to prepare. If they see actions aren't displayed properly, it means they are still running a version of Bazel that doesn't set Command.output_paths properly.
1 parent ef9eacb commit 765b497

File tree

2 files changed

+10
-48
lines changed

2 files changed

+10
-48
lines changed

cmd/bb_browser/browser_service.go

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -363,13 +363,7 @@ func (s *BrowserService) handleActionCommon(w http.ResponseWriter, req *http.Req
363363
digestFunction := actionDigest.GetDigestFunction()
364364
if actionResult != nil {
365365
actionInfo.OutputDirectories = actionResult.OutputDirectories
366-
if len(actionResult.OutputSymlinks) > 0 {
367-
// REv2.1 uses 'output_symlinks'.
368-
actionInfo.OutputSymlinks = actionResult.OutputSymlinks
369-
} else {
370-
// REv2.0 uses 'output_{directory,file}_symlinks'.
371-
actionInfo.OutputSymlinks = append(append([]*remoteexecution.OutputSymlink(nil), actionResult.OutputDirectorySymlinks...), actionResult.OutputFileSymlinks...)
372-
}
366+
actionInfo.OutputSymlinks = actionResult.OutputSymlinks
373367
actionInfo.OutputFiles = actionResult.OutputFiles
374368

375369
var err error
@@ -414,24 +408,9 @@ func (s *BrowserService) handleActionCommon(w http.ResponseWriter, req *http.Req
414408
for _, outputFiles := range actionInfo.OutputFiles {
415409
foundPaths[outputFiles.Path] = struct{}{}
416410
}
417-
if len(command.OutputPaths) > 0 {
418-
// REv2.1 uses output_paths.
419-
for _, outputPath := range command.OutputPaths {
420-
if _, ok := foundPaths[outputPath]; !ok {
421-
actionInfo.MissingPaths = append(actionInfo.MissingPaths, outputPath)
422-
}
423-
}
424-
} else {
425-
// REv2.0 uses output_{directories,files}.
426-
for _, outputDirectory := range command.OutputDirectories {
427-
if _, ok := foundPaths[outputDirectory]; !ok {
428-
actionInfo.MissingPaths = append(actionInfo.MissingPaths, outputDirectory)
429-
}
430-
}
431-
for _, outputFile := range command.OutputFiles {
432-
if _, ok := foundPaths[outputFile]; !ok {
433-
actionInfo.MissingPaths = append(actionInfo.MissingPaths, outputFile)
434-
}
411+
for _, outputPath := range command.OutputPaths {
412+
if _, ok := foundPaths[outputPath]; !ok {
413+
actionInfo.MissingPaths = append(actionInfo.MissingPaths, outputPath)
435414
}
436415
}
437416
} else if status.Code(err) != codes.NotFound {

cmd/bb_browser/templates/page_command.html

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,12 @@ <h2 class="my-4">Output files</h1>
1414
<th scope="col" style="width: 100%">Filename</th>
1515
</tr>
1616
</thead>
17-
{{with .Command.OutputPaths}}
18-
{{range .}}
19-
<tr class="font-monospace">
20-
<td></td>
21-
<td></td>
22-
<td style="width: 100%; word-break: break-all">{{.}}</td>
23-
</tr>
24-
{{end}}
25-
{{else}}
26-
{{range .Command.OutputDirectories}}
27-
<tr class="font-monospace">
28-
<td></td>
29-
<td></td>
30-
<td style="width: 100%; word-break: break-all">{{.}}/</td>
31-
</tr>
32-
{{end}}
33-
{{range .Command.OutputFiles}}
34-
<tr class="font-monospace">
35-
<td></td>
36-
<td></td>
37-
<td style="width: 100%; word-break: break-all">{{.}}</td>
38-
</tr>
39-
{{end}}
17+
{{range .Command.OutputPaths}}
18+
<tr class="font-monospace">
19+
<td></td>
20+
<td></td>
21+
<td style="width: 100%; word-break: break-all">{{.}}</td>
22+
</tr>
4023
{{end}}
4124
</table>
4225

0 commit comments

Comments
 (0)