Skip to content

Commit 3df2de6

Browse files
authored
fix: increase maximum BES event size from binary BES file to 32 MB (#267)
We've observed 17 MB messages in the wild.
1 parent f926001 commit 3df2de6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/plugin/system/bep/bes_pipe.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,11 @@ func (bb *besPipe) streamBesEvents(ctx context.Context, conn *os.File) error {
207207
for {
208208
event := buildeventstream.BuildEvent{}
209209

210-
if err := protodelim.UnmarshalFrom(reader, &event); err != nil {
210+
opts := protodelim.UnmarshalOptions{
211+
MaxSize: 32 * 1024 * 1024, // 32 MB max; we have observed 17 MB BES events in the wild
212+
}
213+
214+
if err := opts.UnmarshalFrom(reader, &event); err != nil {
211215
if errors.Is(err, os.ErrDeadlineExceeded) {
212216
return fmt.Errorf("timeout reached while waiting for BES events")
213217
}

0 commit comments

Comments
 (0)