Skip to content

Commit

Permalink
Ensure that server logs are archived.
Browse files Browse the repository at this point in the history
  • Loading branch information
kgpai committed Jan 16, 2024
1 parent 57d8781 commit e43acc2
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 19 deletions.
42 changes: 31 additions & 11 deletions .github/workflows/experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,33 +96,52 @@ jobs:
presto-java-aggregation-fuzzer-run:
runs-on: ubuntu-latest
runs-on: 8-core
container: ghcr.io/facebookincubator/velox-dev:presto-java
needs: compile
timeout-minutes: 120
env:
CCACHE_DIR: "${{ github.workspace }}/.ccache/"
CCACHE_BASEDIR: "${{ github.workspace }}"
LINUX_DISTRO: "centos"
steps:

- name: "Restore ccache"
uses: actions/cache@v3
with:
path: "${{ env.CCACHE_DIR }}"
# We are using the benchmark ccache as it has all
# required features enabled, so no need to create a new one
key: ccache-presto-${{ github.sha }}
restore-keys: |
ccache-presto-
- name: "Checkout Repo"
uses: actions/checkout@v3
with:
path: velox
submodules: 'recursive'
ref: "${{ inputs.ref || 'main' }}"

- name: "Install dependencies"
run: source ./scripts/setup-ubuntu.sh

- name: Download aggregation fuzzer
uses: actions/download-artifact@v3
with:
name: aggregation
- name: "Build"
run: |
cd velox
source /opt/rh/gcc-toolset-9/enable
make debug NUM_THREADS="${{ inputs.numThreads || 8 }}" MAX_HIGH_MEM_JOBS="${{ inputs.maxHighMemJobs || 8 }}" MAX_LINK_JOBS="${{ inputs.maxLinkJobs || 4 }}" EXTRA_CMAKE_FLAGS="-DVELOX_ENABLE_ARROW=ON ${{ inputs.extraCMakeFlags }}"
ccache -s
- name: "Run Aggregate Fuzzer"
run: |
/opt/start-prestojava.sh 2>&1 >> /tmp/server.log &
cd velox
cp ./scripts/etc/hive.properties $PRESTO_HOME/etc/catalog
ls -lR $PRESTO_HOME/etc
/opt/start-prestojava.sh > /tmp/server.log 2>&1 &
sleep 60
/opt/presto-cli --server 127.0.0.1:8080 --execute 'CREATE SCHEMA hive.tpch;'
mkdir -p /tmp/aggregate_fuzzer_repro/
rm -rfv /tmp/aggregate_fuzzer_repro/*
chmod -R 777 /tmp/aggregate_fuzzer_repro
chmod +x velox_aggregation_fuzzer_test
./velox_aggregation_fuzzer_test \
_build/debug/velox/functions/prestosql/fuzzer/velox_aggregation_fuzzer_test \
--seed ${RANDOM} \
--duration_sec 3600 \
--logtostderr=1 \
Expand All @@ -139,6 +158,7 @@ jobs:
name: aggregate-fuzzer-failure-artifacts
path: |
/tmp/aggregate_fuzzer_repro
/tmp/server.log
linux-spark-fuzzer-run:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions scripts/etc/jvm.config.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
-XX:+HeapDumpOnOutOfMemoryError
-XX:+ExitOnOutOfMemoryError
-Djdk.attach.allowAttachSelf=true
-Duser.timezone=America/Los_Angeles
6 changes: 3 additions & 3 deletions scripts/prestojava-container.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ RUN dnf install -y java-11-openjdk less procps python3 tzdata \
&& mkdir -p $PRESTO_HOME/etc/data \
&& mkdir -p /usr/lib/presto/utils


# Setting timezone to deal with Velox timezone conversion problem
ENV TZ=America/Bahia_Banderas
# We set the timezone to America/Los_Angeles due to issue
# detailed here : https://github.com/facebookincubator/velox/issues/8127
ENV TZ=America/Los_Angeles

COPY scripts/etc/config.properties.example $PRESTO_HOME/etc/config.properties
COPY scripts/etc/jvm.config.example $PRESTO_HOME/etc/jvm.config
Expand Down
7 changes: 2 additions & 5 deletions scripts/start-prestojava.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,5 @@

set -e

nohup $PRESTO_HOME/bin/launcher --pid-file=/tmp/pidfile run > /tmp/server.log
#wait a few seconds for presto to start
sleep 60
echo 'CREATE SCHEMA hive.tpch;' > /tmp/hive_create.sql
/opt/presto-cli --server 127.0.0.1:8080 --file /tmp/hive_create.sql
$PRESTO_HOME/bin/launcher --pid-file=/tmp/pidfile run

0 comments on commit e43acc2

Please sign in to comment.