]> Cypherpunks repositories - gostls13.git/commit
internal/trace/v2: dump text trace on failure only if it fits in the log
authorMichael Anthony Knyszek <mknyszek@google.com>
Tue, 21 Nov 2023 16:51:57 +0000 (16:51 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 21 Nov 2023 23:10:51 +0000 (23:10 +0000)
commitff722e607cc131903181fe9d686d4d91ade15a2d
treebc692189a0f4e81b542fcacfcde7292cae0c84af
parente6b76bfc4675eae8d1e4c7e8dc28897339b13824
internal/trace/v2: dump text trace on failure only if it fits in the log

Currently we dump text traces to the build log on failure
unconditionally, but this may cause the old infrastructure's builds'
logs to get truncated. Avoid that by setting a threshold on the maximum
size of the text trace we're willing to dump.

We don't need this workaround on the new infrastructure -- logs don't
get truncated there.

Change-Id: I0f50f50bb4b90f87250b673fbe56f48235325610
Reviewed-on: https://go-review.googlesource.com/c/go/+/544216
Auto-Submit: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/internal/trace/v2/trace_test.go