Skip to content

Feature/coverage rta #620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9af6432
write system information as well
dothebart Nov 19, 2024
61c7c41
attempt adding coverage builds
dothebart Feb 5, 2025
415bf08
revert
dothebart Feb 5, 2025
952a1b3
work on using podman instead of docker
dothebart Mar 11, 2025
1890d51
trace
dothebart Mar 12, 2025
539d09f
trace
dothebart Mar 12, 2025
48b499b
debug
dothebart Mar 13, 2025
ec6e2b9
debug
dothebart Mar 13, 2025
d3dd6a5
debug
dothebart Mar 13, 2025
636d7ec
specify docker default args
dothebart Mar 13, 2025
5f22d41
specify docker default args
dothebart Mar 13, 2025
f22478c
revert
dothebart Mar 13, 2025
1652059
debug
dothebart Mar 14, 2025
26dcd84
debug
dothebart Mar 14, 2025
06158dd
specify memory
dothebart Mar 14, 2025
256a3e6
specify memory
dothebart Mar 14, 2025
e3ca14c
specify memory
dothebart Mar 14, 2025
9c1d91c
specify memory
dothebart Mar 14, 2025
36bc190
silence
dothebart Apr 4, 2025
31da73d
use default container args
dothebart Apr 4, 2025
a79b86d
use default container args
dothebart Apr 4, 2025
879d991
use default container args
dothebart Apr 4, 2025
bd3b48e
use default container args
dothebart Apr 4, 2025
c27ecd1
silence
dothebart Apr 4, 2025
4eff2a5
add pppid
dothebart Apr 4, 2025
40132b3
fix script?
dothebart Apr 7, 2025
6ce1635
make the noise
dothebart Apr 7, 2025
e5d8769
set var in both cases
dothebart Apr 7, 2025
e06a591
abort on error
dothebart Apr 8, 2025
60b7aaa
move if to the top
dothebart Apr 8, 2025
abdf471
properly configure git
dothebart Apr 8, 2025
1e146fb
properly configure git
dothebart Apr 8, 2025
afbf968
try not to join arguments
dothebart Apr 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions helper.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
set -gx KEYNAME 86FEC04D
set -gx KEYNAME_OLD 115E1684

if test -f /usr/bin/podman
echo podman
set -xg DOCKER "podman"
set -xg DOCKER_URL_PREFIX "docker.io/"
set -xg DEFAULT_DOCKER_ARGS --pids-limit 256704
else
set -xg DOCKER "docker"
set -xg DOCKER_URL_PREFIX ""
end


function lockDirectory
# Now grab the lock ourselves:
set -l pid (echo %self)
Expand Down Expand Up @@ -2278,6 +2289,7 @@ function findArangoDBVersion
echo "ARANGODB_SNIPPETS: $ARANGODB_SNIPPETS"
echo "ARANGODB_TGZ_UPSTREAM: $ARANGODB_TGZ_UPSTREAM"
echo "DOCKER_TAG: $DOCKER_TAG"
echo "DOCKER: $DOCKER"
echo '------------------------------------------------------------------------------'
echo
end
Expand Down
233 changes: 119 additions & 114 deletions helper.linux.fish

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions jenkins/docker/starter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ if test -z "$SSH_AUTH_SOCK"; then
agentstarted=1
fi

docker run -v $HOME/.ssh:/root/.ssh arangodb/ssh-client ssh -o StrictHostKeyChecking=no -T [email protected]
"$DOCKER" run -v $HOME/.ssh:/root/.ssh arangodb/ssh-client ssh -o StrictHostKeyChecking=no -T [email protected]

docker run \
"$DOCKER" run \
-e "PDOCKER=`getent group docker | cut -d: -f3`" \
-e "PGID=`id -g`" \
-e "PHOME=$HOME" \
Expand Down
12 changes: 6 additions & 6 deletions jenkins/forTestDocker.fish
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ and setArchSuffix
and set -xg HUB_COMMUNITY "arangodb/arangodb-test:$DOCKER_TAG_JENKINS$archSuffix"
and buildDockerImage $HUB_COMMUNITY
and validateDockerImageIfNeeded $HUB_COMMUNITY
and docker push $HUB_COMMUNITY
and docker tag $HUB_COMMUNITY $GCR_REG_PREFIX$HUB_COMMUNITY
and docker push $GCR_REG_PREFIX$HUB_COMMUNITY
and "$DOCKER" push $HUB_COMMUNITY
and "$DOCKER" tag $HUB_COMMUNITY $GCR_REG_PREFIX$HUB_COMMUNITY
and "$DOCKER" push $GCR_REG_PREFIX$HUB_COMMUNITY
and echo $HUB_COMMUNITY >> $WORKSPACE/imagenames.log
and echo $GCR_REG_PREFIX$HUB_COMMUNITY >> $WORKSPACE/imagenames.log

Expand All @@ -61,9 +61,9 @@ and downloadRclone
and setArchSuffix
and set -xg HUB_ENTERPRISE "arangodb/enterprise-test:$DOCKER_TAG_JENKINS$archSuffix"
and buildDockerImage $HUB_ENTERPRISE
and docker push $HUB_ENTERPRISE
and docker tag $HUB_ENTERPRISE $GCR_REG_PREFIX$HUB_ENTERPRISE
and docker push $GCR_REG_PREFIX$HUB_ENTERPRISE
and "$DOCKER" push $HUB_ENTERPRISE
and "$DOCKER" tag $HUB_ENTERPRISE $GCR_REG_PREFIX$HUB_ENTERPRISE
and "$DOCKER" push $GCR_REG_PREFIX$HUB_ENTERPRISE
and echo $HUB_ENTERPRISE >> $WORKSPACE/imagenames.log
and echo $GCR_REG_PREFIX$HUB_ENTERPRISE >> $WORKSPACE/imagenames.log

Expand Down
6 changes: 3 additions & 3 deletions jenkins/forTestDockerCommunity.fish
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ and setArchSuffix
and set -xg HUB_COMMUNITY "arangodb/arangodb-test:$DOCKER_TAG_JENKINS$archSuffix"
and buildDockerImage $HUB_COMMUNITY
and validateDockerImageIfNeeded $HUB_COMMUNITY
and docker push $HUB_COMMUNITY
and docker tag $HUB_COMMUNITY $GCR_REG_PREFIX$HUB_COMMUNITY
and docker push $GCR_REG_PREFIX$HUB_COMMUNITY
and "$DOCKER" push $HUB_COMMUNITY
and "$DOCKER" tag $HUB_COMMUNITY $GCR_REG_PREFIX$HUB_COMMUNITY
and "$DOCKER" push $GCR_REG_PREFIX$HUB_COMMUNITY
and echo $HUB_COMMUNITY >> $WORKSPACE/imagenames.log
and echo $GCR_REG_PREFIX$HUB_COMMUNITY >> $WORKSPACE/imagenames.log

Expand Down
6 changes: 3 additions & 3 deletions jenkins/forTestDockerEnterprise.fish
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ and setArchSuffix
and set -xg HUB_ENTERPRISE "arangodb/enterprise-test:$DOCKER_TAG_JENKINS$archSuffix"
and buildDockerImage $HUB_ENTERPRISE
and validateDockerImageIfNeeded $HUB_COMMUNITY
and docker push $HUB_ENTERPRISE
and docker tag $HUB_ENTERPRISE $GCR_REG_PREFIX$HUB_ENTERPRISE
and docker push $GCR_REG_PREFIX$HUB_ENTERPRISE
and "$DOCKER" push $HUB_ENTERPRISE
and "$DOCKER" tag $HUB_ENTERPRISE $GCR_REG_PREFIX$HUB_ENTERPRISE
and "$DOCKER" push $GCR_REG_PREFIX$HUB_ENTERPRISE
and echo $HUB_ENTERPRISE >> $WORKSPACE/imagenames.log
and echo $GCR_REG_PREFIX$HUB_ENTERPRISE >> $WORKSPACE/imagenames.log

Expand Down
4 changes: 4 additions & 0 deletions jenkins/helper/aggregate_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ def combine_coverage_dirs_multi(cfg,
if combined_dir.exists():
shutil.rmtree(str(combined_dir))
combined_dir.mkdir()
coverage_dir = base_dir / 'coverage'
# if coverage_dir.exists():
# shutil.rmtree(str(coverage_dir))
coverage_dir.mkdir()
count = 0
jobcount = 0
if len(sub_jobs) == 0:
Expand Down
2 changes: 1 addition & 1 deletion jenkins/helper/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def kill_children(identifier, params, children):
killed.append(one_child.pid)
err += add_message_to_report(
params,
f"{identifier}: killing {one_child.name()} - {str(one_child.pid)}",
f"{identifier}: killing {one_child.name()} - {str(one_child.pid)} Parent: {str(one_child.ppid)}",
True, True)
one_child.resume()
except FileNotFoundError:
Expand Down
2 changes: 1 addition & 1 deletion jenkins/helper/runAnyPerformanceResults.fish
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ if count $src/results-*.csv > /dev/null
end

echo "Generating images"
docker run -v (pwd)/work:/work pavlov99/gnuplot gnuplot $gp
"$DOCKER" run -v (pwd)/work:/work pavlov99/gnuplot gnuplot $gp
or begin
echo "=== $gp ==="
cat $gp
Expand Down
14 changes: 7 additions & 7 deletions jenkins/helper/server.inc
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ echo "AUTH: $ARANGO_AUTH"
echo "EDITION: $ARANGO_EDITION"
echo

docker kill $ARANGO_DOCKER_NAME > /dev/null 2>&1 || true
docker rm -fv $ARANGO_DOCKER_NAME > /dev/null 2>&1 || true
docker pull $DOCKER_IMAGE
docker run --rm --cap-add SYS_NICE $DOCKER_IMAGE arangosh --version | tee ./${ARANGO_DOCKER_NAME}.txt
"$DOCKER" kill $ARANGO_DOCKER_NAME > /dev/null 2>&1 || true
"$DOCKER" rm -fv $ARANGO_DOCKER_NAME > /dev/null 2>&1 || true
"$DOCKER" pull $DOCKER_IMAGE
"$DOCKER" run --rm --cap-add SYS_NICE $DOCKER_IMAGE arangosh --version | tee ./${ARANGO_DOCKER_NAME}.txt
export SERVER_FULL_VERSION=$(cat ./${ARANGO_DOCKER_NAME}.txt | grep -oP '^server-version: \K.*$')

OUTDIR="`pwd`/output"
rm -rf $OUTDIR
mkdir $OUTDIR
DOCKER_AUTH=""
STARTER_AUTH=""
DOCKER_CMD="docker run --rm --hostname localhost --cap-add SYS_NICE --name $ARANGO_DOCKER_NAME -d $EXPORT_PORTS -v $OUTDIR:/testrun"
DOCKER_CMD="$DOCKER run --rm --hostname localhost --cap-add SYS_NICE --name $ARANGO_DOCKER_NAME -d $EXPORT_PORTS -v $OUTDIR:/testrun"
#DOCKER_IMAGE="registry.arangodb.biz:5000/arangodb/linux-${ARANGO_EDITION}-maintainer:$ARANGO_BRANCH"
STARTER_CMD="arangodb --starter.address localhost --starter.local --server.storage-engine $ARANGO_STORAGE_ENGINE --starter.data-dir /testrun ${MMFILES_DEPRECATED_OPTION}"
STARTER_MODE=""
Expand Down Expand Up @@ -101,7 +101,7 @@ command="$DOCKER_CMD $DOCKER_AUTH $DOCKER_IMAGE /testrun/starter.sh $STARTER_CMD
echo $command
$command

trap "$(trap -p | grep EXIT | sed "s/.*-- '\(.*\)'.EXIT/\1;/g")docker rm -fv $ARANGO_DOCKER_NAME ; sudo chown jenkins:jenkins -R output ; tar czf arango_data.tar.gz output" EXIT
trap "$(trap -p | grep EXIT | sed "s/.*-- '\(.*\)'.EXIT/\1;/g") "$DOCKER" rm -fv $ARANGO_DOCKER_NAME ; sudo chown jenkins:jenkins -R output ; tar czf arango_data.tar.gz output" EXIT

echo "Waiting until ArangoDB is ready on port ${ARANGO_PORTS[0]}"

Expand Down Expand Up @@ -131,7 +131,7 @@ done

if [ $count -ge 240 ]; then
echo "docker logs:"
docker logs $ARANGO_DOCKER_NAME
"$DOCKER" logs $ARANGO_DOCKER_NAME

echo
echo "curl:"
Expand Down
4 changes: 2 additions & 2 deletions jenkins/runGobenchPerformance.fish
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ and popd

and sudo rm -rf work/database $simple/results.csv
and echo "==== starting performance run ===="
and echo "docker run -e ARANGO_LICENSE_KEY=$ARANGODB_LICENSE_KEY -v (pwd)/work/ArangoDB:/ArangoDB -v (pwd)/work:/data -v $simple:/performance -v $gobenchdir:/gobench"
and echo "$DOCKER run -e ARANGO_LICENSE_KEY=$ARANGODB_LICENSE_KEY -v (pwd)/work/ArangoDB:/ArangoDB -v (pwd)/work:/data -v $simple:/performance -v $gobenchdir:/gobench"

and for protocol in VST HTTP
echo "Protocol: " $protocol
docker run \
"$DOCKER" run \
--cap-add SYS_NICE \
-e ARANGO_LICENSE_KEY=$ARANGODB_LICENSE_KEY \
-e ARANGO_BRANCH=$ARANGODB_BRANCH \
Expand Down
2 changes: 1 addition & 1 deletion jenkins/runGobenchPerformanceResults.fish
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ if test (count work/images/*.png) -gt 0
end

echo "Generating images"
docker run -v (pwd)/work:/work pavlov99/gnuplot gnuplot $gp
"$DOCKER" run -v (pwd)/work:/work pavlov99/gnuplot gnuplot $gp
34 changes: 24 additions & 10 deletions jenkins/runRTAtest.fish
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
#!/usr/bin/env fish
set -l fish_trace on
source jenkins/helper/jenkins.fish

cleanPrepareLockUpdateClear2
TT_init
set -xg RTA_EDITION "C,Cr2"

and eval $EDITION
and eval $TEST_SUITE
and setAllLogsToWorkspace
and switchBranches $ARANGODB_BRANCH $ENTERPRISE_BRANCH true
and updateDockerBuildImage
if test "$ENTERPRISEEDITION" = "On"
set -xg RTA_EDITION "EP,EPr2"
end
if test "$ASAN" = "true"
echo "San build"
sanOn
and buildSanFlags "$WORKDIR/work/ArangoDB"
end
if test "$COVERAGE" = "true"
echo "Coverage build"
coverageOn
and buildSanFlags "$WORKDIR/work/ArangoDB"
end
if test "$BUILD_MODE" = "debug"
echo "switching to debug build"
debugMode
Expand All @@ -23,18 +27,24 @@ if test "$BUILD_MODE" = "release"
echo "switching to release build"
releaseMode
end


and maintainerOn
and eval $EDITION
and eval $TEST_SUITE
and setAllLogsToWorkspace
and switchBranches $ARANGODB_BRANCH $ENTERPRISE_BRANCH true
and updateDockerBuildImage
and begin
end
and pingDetails
and TT_setup
and oskarCompile
and TT_compile
and downloadAuxBinariesToBuildBin

and checkoutRTA
and cd work/release-test-automation/
if test "$ENTERPRISEEDITION" = "On"
set -xg RTA_EDITION "EP,EPr2"
end
and bash -x ./jenkins/oskar_tar.sh $argv
and eval "bash -x ./jenkins/oskar_tar.sh $argv"

set -l s $status

Expand All @@ -46,6 +56,10 @@ for f in $matches
echo $f | grep -qv testreport ; and echo "mv $f $WORKSPACE" ; and mv $f $WORKSPACE; or echo "skipping $f"
end

if test "$COVERAGE" = "true"
collectCoverage
end

unlockDirectory

exit $s
6 changes: 3 additions & 3 deletions jenkins/runSimplePerformance.fish
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ and sudo rm -rf work/database $simple/results.csv
and cat /proc/sys/kernel/core_pattern
and echo "==== starting performance run ===="
and if test -z "$DOCKER_IMAGE"
docker run \
"$DOCKER" run \
--ulimit core=-1 \
-e ARANGO_LICENSE_KEY=$ARANGODB_LICENSE_KEY \
-v (pwd)/work/ArangoDB:/ArangoDB \
Expand All @@ -44,7 +44,7 @@ and if test -z "$DOCKER_IMAGE"
/data/database \
--javascript.script simple/$ARANGODB_TEST_CONFIG"
else
docker run \
"$DOCKER" run \
--ulimit core=-1 \
-e ARANGO_LICENSE_KEY=$ARANGODB_LICENSE_KEY \
-v (pwd)/work:/data \
Expand All @@ -63,7 +63,7 @@ end
set -l s $status

if count $simple/core* >/dev/null
docker run \
"$DOCKER" run \
-v $simple:/performance \
--rm \
$DOCKER_IMAGE \
Expand Down
3 changes: 3 additions & 0 deletions scripts/checkoutRTA.fish
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ ssh -o StrictHostKeyChecking=no -T git@$ARANGODB_GIT_HOST
cd $INNERWORKDIR
and git config --global http.postBuffer 524288000
and git config --global https.postBuffer 524288000
and git config --global user.email "[email protected]"
and git config --global user.name "Release test automation"

# and git config --global pull.rebase true
and if test ! -d release-test-automation/.git
rm -rf release-test-automation
Expand Down
2 changes: 1 addition & 1 deletion scripts/lib/build.fish
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ function runMake
make $MAKEFLAGS $argv[1] 2>&1
or exit $status
else
echo make output in work/buildArangoDB.log
echo make output in work/buildArangoDB.log
set -l ep ""

if test "$SHOW_DETAILS" = "Ping"
Expand Down