Skip to content

Commit 347ccfe

Browse files
authored
Merge pull request #1935 from avdv/windows-build-event-upload
Retry uploading build events more often
2 parents 1bd3c46 + 13312bf commit 347ccfe

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

.bazelrc.common

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ build:ci-common --repository_cache=~/repo-cache/
6363
build:ci-common --experimental_repository_cache_hardlinks
6464

6565
# Use a remote cache during CI
66-
build:ci-windows-bindist --bes_upload_mode=wait_for_upload_complete --bes_timeout=60s
66+
build:ci-windows-bindist --bes_upload_mode=wait_for_upload_complete --bes_timeout=600s
67+
# On Github CI for Windows, we see intermittent connection failures to BuildBuddy
68+
# (see https://github.com/buildbuddy-io/buildbuddy/issues/4467)
69+
# increase the retries as a workaround.
70+
build:ci-windows-bindist --experimental_build_event_upload_max_retries=256
6771
build:remote-cache --remote_cache=grpcs://remote.buildbuddy.io
6872
build:ci-common --remote_timeout=3600
6973
# Avoid failures of the form `deadline exceeded after 14999958197ns DEADLINE_EXCEEDED`.

.github/workflows/workflow.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,25 @@ jobs:
199199
# NOTE keep in sync with tests/RunTests.hs
200200
bazel run @stackage-pinning-test-unpinned//:pin
201201
bazel build @stackage-pinning-test//:hspec
202+
203+
- name: Collect Logs
204+
id: collect_logs
205+
if: failure()
206+
shell: bash
207+
run: |
208+
mkdir -p logs
209+
if [[ ${{ matrix.module }} == 'rules_haskell_tests' ]]; then
210+
dir=rules_haskell_tests
211+
else
212+
dir=.
213+
fi
214+
export PATH=$HOME/bazel:$PATH
215+
base=$( cd "$dir" ; bazel info output_base )
216+
find "$base" -mindepth 1 -maxdepth 1 -name "java*.log.*" -print0 | xargs -0rI % cp % logs/
217+
218+
- name: Upload Logs
219+
if: ${{ failure() && steps.collect_logs.conclusion == 'success' }}
220+
uses: actions/upload-artifact@v3
221+
with:
222+
name: Logs ${{ matrix.os }} ${{ matrix.module }} ${{ matrix.bzlmod }}
223+
path: logs

0 commit comments

Comments
 (0)