Skip to content

Commit

Permalink
further adjust mzcompose hook
Browse files Browse the repository at this point in the history
  • Loading branch information
ParkMyCar committed Dec 3, 2024
1 parent cf0a817 commit 8f6e5b2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions ci/builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ RUN apt-get update --fix-missing && TZ=UTC DEBIAN_FRONTEND=noninteractive apt-ge
ca-certificates \
curl \
docker.io \
gdb \
git \
gnupg2 \
libxml2 \
Expand Down
16 changes: 8 additions & 8 deletions ci/plugins/mzcompose/hooks/pre-exit
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set -euo pipefail
. misc/shlib/shlib.bash

run() {
bin/ci-builder run stable bin/mzcompose --mz-quiet --find "$BUILDKITE_PLUGIN_MZCOMPOSE_COMPOSITION" "$@"
bin/ci-builder run min bin/mzcompose --mz-quiet --find "$BUILDKITE_PLUGIN_MZCOMPOSE_COMPOSITION" "$@"
}

echo "Collecting logs"
Expand Down Expand Up @@ -47,10 +47,10 @@ mv "$HOME"/cores .

if find cores -name 'core.*' | grep -q .; then
# Best effort attempt to fetch interesting executables to get backtrace of core files
bin/ci-builder run stable cp /mnt/build/debug/clusterd cores/ || true
bin/ci-builder run stable cp /mnt/build/debug/environmentd cores/ || true
bin/ci-builder run stable cp /mnt/build/debug/mz-balancerd cores/balancerd || true
bin/ci-builder run stable cp /mnt/build/debug/sqllogictest cores/ || true
bin/ci-builder run min cp /mnt/build/debug/clusterd cores/ || true
bin/ci-builder run min cp /mnt/build/debug/environmentd cores/ || true
bin/ci-builder run min cp /mnt/build/debug/mz-balancerd cores/balancerd || true
bin/ci-builder run min cp /mnt/build/debug/sqllogictest cores/ || true
run cp sqllogictest:/usr/local/bin/sqllogictest cores/ || true
run cp sqllogictest:/usr/local/bin/clusterd cores/ || true
run cp materialized:/usr/local/bin/environmentd cores/ || true
Expand All @@ -63,14 +63,14 @@ echo "Finding core files"
find cores -name 'core.*' | while read -r core; do
exe=$(echo "$core" | sed -e "s/core\.\(.*\)\.[0-9]*/\1/" -e "s/.*\!//")
# Core dumps can take a while to be written, so if extracting the info fails, try again later
bin/ci-builder run stable gdb --batch -ex "bt full" -ex "thread apply all bt" -ex "quit" cores/"$exe" "$core" > "$core".txt || (sleep 2m; bin/ci-builder run stable gdb --batch -ex "bt full" -ex "thread apply all bt" -ex "quit" cores/"$exe" "$core" > "$core".txt || true)
bin/ci-builder run min gdb --batch -ex "bt full" -ex "thread apply all bt" -ex "quit" cores/"$exe" "$core" > "$core".txt || (sleep 2m; bin/ci-builder run min gdb --batch -ex "bt full" -ex "thread apply all bt" -ex "quit" cores/"$exe" "$core" > "$core".txt || true)
buildkite-agent artifact upload "$core".txt
done
# can be huge, clean up
rm -rf cores

echo "Compressing parallel-workload-queries.log"
bin/ci-builder run stable zstd --rm parallel-workload-queries.log || true
bin/ci-builder run min zstd --rm parallel-workload-queries.log || true

echo "Uploading log artifacts"
mapfile -t artifacts < <(printf "run.log\nservices.log\njournalctl-merge.log\nnetstat-ant.log\nnetstat-panelot.log\nps-aux.log\ndocker-ps-a.log\ndocker-inspect.log\n"; find . -name 'junit_*.xml')
Expand All @@ -82,7 +82,7 @@ CI_ANNOTATE_ERRORS_RESULT=0
# Uploading large files currently sometimes hangs, as a temporary workaround
# timeout and don't fail, TODO(def-) Remove timeout again
timeout 300 buildkite-agent artifact upload "$artifacts_str" || true
bin/ci-builder run stable bin/ci-annotate-errors --test-cmd="$(cat test_cmd)" --test-desc="$(cat test_desc)" "${artifacts[@]}" > ci-annotate-errors.log || CI_ANNOTATE_ERRORS_RESULT=$?
bin/ci-builder run min bin/ci-annotate-errors --test-cmd="$(cat test_cmd)" --test-desc="$(cat test_desc)" "${artifacts[@]}" > ci-annotate-errors.log || CI_ANNOTATE_ERRORS_RESULT=$?
buildkite-agent artifact upload "ci-annotate-errors.log"

if [ ! -s services.log ] && [ "$BUILDKITE_LABEL" != "Maelstrom coverage of persist" ] && [ "$BUILDKITE_LABEL" != "Long single-node Maelstrom coverage of persist" ] && [ "$BUILDKITE_LABEL" != "Maelstrom coverage of txn-wal" ] && [ "$BUILDKITE_LABEL" != "Mz E2E Test" ] && [ "$BUILDKITE_LABEL" != "Output consistency (version for DFR)" ] && [ "$BUILDKITE_LABEL" != "Output consistency (version for CTF)" ] && [ "$BUILDKITE_LABEL" != "QA Canary Environment Base Load" ] && [ "$BUILDKITE_LABEL" != "Parallel Benchmark against QA Canary Environment" ] && [ "$BUILDKITE_LABEL" != "Parallel Benchmark against QA Benchmarking Staging Environment" ] && [ "$BUILDKITE_LABEL" != "Terraform + Helm Chart E2E on AWS" ]; then
Expand Down

0 comments on commit 8f6e5b2

Please sign in to comment.