Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
99b5375
increase the dbCreateThreads to 8
mershad-manesh Mar 17, 2026
7d548d1
Build using 1 thread per core
mershad-manesh Mar 17, 2026
c2b9f54
use the built in no-transfer-progress
mershad-manesh Mar 17, 2026
1941e58
try to improve the smoke tests and how we build
mershad-manesh Mar 17, 2026
6fa2213
undo change to build
mershad-manesh Mar 17, 2026
3e49d92
deal with Grafana IT failing due to another element blocking it
mershad-manesh Mar 18, 2026
0f9874d
add retry functionalities... hopefully this reduces the selenium test…
mershad-manesh Mar 18, 2026
215a5f9
remove vi and fakeTimer
mershad-manesh Mar 18, 2026
e175883
add failsafe
mershad-manesh Mar 18, 2026
464c4f1
more changes
mershad-manesh Mar 18, 2026
c747e23
more improvements
mershad-manesh Mar 18, 2026
9a01eb7
does this work?
mershad-manesh Mar 18, 2026
93a8950
remove fakeTimer
mershad-manesh Mar 18, 2026
2d145d9
enable smoke tests
mershad-manesh Mar 18, 2026
ac2f8ac
tweak the integration test script
mershad-manesh Mar 18, 2026
fc6c65a
improve logging and calling out errors
mershad-manesh Mar 19, 2026
35548f2
set the id,location,broker_url
mershad-manesh Mar 19, 2026
b74816f
Revert "set the id,location,broker_url"
mershad-manesh Mar 19, 2026
36c55a3
Merge remote-tracking branch 'origin/develop' into mem/improvements
mershad-manesh Mar 23, 2026
f27c1b2
Merge remote-tracking branch 'origin/develop' into mem/improvements
mershad-manesh Mar 24, 2026
f5d1c06
Merge remote-tracking branch 'origin/develop' into mem/improvements
mershad-manesh Mar 25, 2026
313788c
parallel tweaks
mershad-manesh Mar 27, 2026
fb15769
reduce redundant calls
mershad-manesh Mar 27, 2026
60e4f1d
Merge remote-tracking branch 'origin/develop' into mem/improvements
mershad-manesh Mar 27, 2026
f1a2068
tweak smoke tests
mershad-manesh Mar 27, 2026
00577bd
don't hide flaky test failures, even if they pass on re-run
mershad-manesh Mar 27, 2026
622c70b
disable flaky test job for now
mershad-manesh Mar 30, 2026
ec43484
delete build trigger file
mershad-manesh Mar 30, 2026
89c0e52
reduce the parallelism to 8 across smoke tests
mershad-manesh Mar 30, 2026
e8d8e90
revert core and minion parallelism back to 10 !smoke
mershad-manesh Mar 30, 2026
54298bf
set implicit wait to 0 and then set it back after we are done.
mershad-manesh Mar 30, 2026
b43e6dd
force a build !smoke
mershad-manesh Mar 30, 2026
2e2adb1
Merge branch 'develop' into mem/improvements
mershad-manesh Apr 9, 2026
858fbab
Implement few improvements
mershad-manesh Apr 9, 2026
971a8f0
fix an issue with itest and unskip few UI tests with some tweaks
mershad-manesh Apr 9, 2026
7feeccd
Update .circleci/main/commands/executions/run-smoke-tests.yml
mershad-manesh Apr 9, 2026
3f59e4f
Update .circleci/main/commands/executions/run-integration-tests.yml
mershad-manesh Apr 9, 2026
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
2 changes: 1 addition & 1 deletion .circleci/epoch
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# increment this to force a full build
26
27
2 changes: 1 addition & 1 deletion .circleci/main/commands/executions/run-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ commands:
;;
esac
echo "export OPENNMS_VERSION=\"$OPENNMS_VERSION\"" >> $BASH_ENV
./compile.pl -DskipTests=true -Dbuild.skip.tarball=false \
./compile.pl -DskipTests=true -DskipITs=true -Dbuild.skip.tarball=false \
-Daether.connector.resumeDownloads=false \
-Daether.connector.basic.threads=1 \
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \
Expand Down
22 changes: 21 additions & 1 deletion .circleci/main/commands/executions/run-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,31 @@ commands:

(date '+%T' || :) > ~/test-results/system-logs/docker_stats 2>&1
(docker stats --all --no-stream || :) >> ~/test-results/system-logs/docker_stats 2>&1
(docker ps ---all || :) >> ~/test-results/system-logs/docker_stats 2>&1
(docker ps --all || :) >> ~/test-results/system-logs/docker_stats 2>&1
for CONTAINER in `docker ps --all --quiet`; do
((docker logs --timestamps "$CONTAINER" 2>&1 | tail -n 20 ) || :) > ~/test-results/system-logs/"docker-${CONTAINER}.log" 2>&1
done
- run:
name: Collect flaky test evidence
when: always
command: |
mkdir -p ~/test-results/flaky-evidence
if [ -d /tmp/flaky-evidence ] && [ "$(find /tmp/flaky-evidence -name '*.xml' | wc -l)" -gt 0 ]; then
(
cd /tmp/flaky-evidence &&
find . -name '*.xml' -exec cp --parents {} ~/test-results/flaky-evidence/ \;
)
echo "#### Flaky tests detected (passed only after retry):"
find /tmp/flaky-evidence -name '*.xml' | sed 's|.*/TEST-||;s|\.xml||' | sort -u
else
echo "No flaky tests detected."
fi
- store_test_results:
path: ~/test-results
- store_artifacts:
when: always
path: ~/test-results/flaky-evidence
destination: flaky-evidence
- run:
name: Copy artifacts on failure
when: on_fail
Expand All @@ -72,5 +91,6 @@ commands:
cp -R ~/build-results ~/failure-artifacts/ || true
cp -R ~/generated-tests ~/failure-artifacts/ || true
- store_artifacts:
when: on_fail
path: ~/failure-artifacts
destination: failure-artifacts
36 changes: 33 additions & 3 deletions .circleci/main/commands/executions/run-smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ commands:
rerun-failtest-count:
default: 0
type: integer
allow-failures:
description: "Exit 0 regardless of test outcome (use for quarantined suites)"
default: false
type: boolean
steps:
- run:
name: Enable swap
Expand All @@ -20,13 +24,17 @@ commands:
cat /proc/sys/vm/swappiness
- load-oci:
match: amd64
- restore-maven-cache
- run:
name: Smoke Tests
no_output_timeout: 30m
no_output_timeout: 60m
command: |
export CCI_RERUN_FAILTEST=<< parameters.rerun-failtest-count >>
<<# parameters.allow-failures >>
.circleci/scripts/smoke.sh << parameters.suite >> || true
<</ parameters.allow-failures >>
<<^ parameters.allow-failures >>
.circleci/scripts/smoke.sh << parameters.suite >>
<</ parameters.allow-failures >>
- run:
name: Gather system logs
when: always
Expand All @@ -38,7 +46,7 @@ commands:

(date '+%T' || :) > ~/test-results/system-logs/docker_stats 2>&1
(docker stats --all --no-stream || :) >> ~/test-results/system-logs/docker_stats 2>&1
(docker ps ---all || :) >> ~/test-results/system-logs/docker_stats 2>&1
(docker ps --all || :) >> ~/test-results/system-logs/docker_stats 2>&1
for CONTAINER in `docker ps --all --quiet`; do
((docker logs --timestamps "$CONTAINER" 2>&1 | tail -n 20 ) || :) > ~/test-results/system-logs/"docker-${CONTAINER}.log" 2>&1
done
Expand All @@ -55,8 +63,29 @@ commands:
cp -R ~/project/smoke-test/target/*.{flv,mp4} ~/test-artifacts/recordings || true
cp -R ~/project/smoke-test/target/screenshots ~/test-artifacts/ || true
cp -R ~/project/smoke-test/target/logs ~/test-artifacts/ || true
- run:
name: Collect flaky test evidence
when: always
command: |
mkdir -p ~/test-results/flaky-evidence
if [ -d /tmp/flaky-evidence ] && [ "$(find /tmp/flaky-evidence -name '*.xml' | wc -l)" -gt 0 ]; then
(
cd /tmp/flaky-evidence || exit 1
find . -name '*.xml' -type f | while read -r xml; do
xml="${xml#./}"
mkdir -p ~/test-results/flaky-evidence/"$(dirname "$xml")"
cp "$xml" ~/test-results/flaky-evidence/"$xml"
done
)
echo "#### Flaky tests detected (passed only after retry):"
find /tmp/flaky-evidence -name '*.xml' | sed 's|.*/TEST-||;s|\.xml||' | sort -u
fi
- store_test_results:
path: ~/test-results
- store_artifacts:
when: always
path: ~/test-results/flaky-evidence
destination: flaky-evidence
- run:
name: Copy artifacts on failure
when: on_fail
Expand All @@ -65,5 +94,6 @@ commands:
cp -R ~/test-results ~/failure-artifacts/ || true
cp -R ~/test-artifacts ~/failure-artifacts/ || true
- store_artifacts:
when: on_fail
path: ~/failure-artifacts
destination: failure-artifacts
16 changes: 9 additions & 7 deletions .circleci/main/commands/generic/generic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ commands:
do_sudo chmod a+x /usr/local/bin/download-artifacts.pl
fi

do_sudo apt-get -y --allow-releaseinfo-change update && \
do_sudo apt-get -y -q --no-install-recommends install \
libdatetime-format-iso8601-perl \
libjson-pp-perl \
libwww-perl \
liblwp-protocol-https-perl \
liblwp-useragent-determined-perl
if ! dpkg -s libdatetime-format-iso8601-perl libjson-pp-perl libwww-perl liblwp-protocol-https-perl liblwp-useragent-determined-perl >/dev/null 2>&1; then
do_sudo apt-get -y --allow-releaseinfo-change update && \
do_sudo apt-get -y -q --no-install-recommends install \
libdatetime-format-iso8601-perl \
libjson-pp-perl \
libwww-perl \
liblwp-protocol-https-perl \
liblwp-useragent-determined-perl
fi
1 change: 0 additions & 1 deletion .circleci/main/commands/oci/trivy-analyze.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
commands:
trivy-analyze:
steps:
- download-download-artifacts
- cached-checkout
- attach_workspace:
at: ~/project
Expand Down
5 changes: 2 additions & 3 deletions .circleci/main/jobs/tarball-assembly-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
resource_class: large
parameters:
number-vcpu:
default: 6
default: 4
type: integer
vaadin-javamaxmem:
default: 1g
Expand All @@ -18,8 +18,7 @@ jobs:
name: Assemble tarballs and related artifacts
command: |
ulimit -n 65536 || :
export MAVEN_OPTS="-Xmx8g -XX:ReservedCodeCacheSize=1g -XX:+TieredCompilation"
export MAVEN_ARGS="install"
export MAVEN_OPTS="-Xmx6g -XX:ReservedCodeCacheSize=1g -XX:+TieredCompilation"
export MAVEN_ARGS="install"
# release branches should enable extra "production" stuff like license indexing
case "${CIRCLE_BRANCH}" in
Expand Down
13 changes: 13 additions & 0 deletions .circleci/main/jobs/tests/smoke/smoke-test-flaky.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
jobs:
smoke-test-flaky:
executor: smoke-test-executor
parallelism: 2
resource_class: medium+
steps:
- cached-checkout
- attach_workspace:
at: ~/
- run-smoke-tests:
suite: flaky
rerun-failtest-count: 2
allow-failures: true
2 changes: 1 addition & 1 deletion .circleci/main/jobs/tests/smoke/smoke-test-minion.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jobs:
smoke-test-minion:
executor: smoke-test-executor
parallelism: 4
parallelism: 10
resource_class: medium+
steps:
- cached-checkout
Expand Down
2 changes: 1 addition & 1 deletion .circleci/main/jobs/tests/smoke/smoke-test-sentinel.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jobs:
smoke-test-sentinel:
executor: smoke-test-executor
parallelism: 4
parallelism: 8
resource_class: medium+
steps:
- cached-checkout
Expand Down
1 change: 1 addition & 0 deletions .circleci/main/jobs/tests/smoke/smoke-test.index
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
#jobs:tests/smoke/smoke-test-minion#
#jobs:tests/smoke/smoke-test-sentinel#
#jobs:tests/smoke/smoke-test-minimal#
#jobs:tests/smoke/smoke-test-flaky#
11 changes: 11 additions & 0 deletions .circleci/main/workflows/workflows_v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,17 @@
"sentinel-image-single-arch-linux-amd64"
]
},
"smoke-test-flaky": {
"context": [
"CircleCI",
"docker-publish-account"
],
"requires": [
"horizon-image-single-arch-linux-amd64",
"minion-image-single-arch-linux-amd64",
"sentinel-image-single-arch-linux-amd64"
]
},
"tarball-assembly-only": {
"context": [
"CircleCI"
Expand Down
3 changes: 1 addition & 2 deletions .circleci/scripts/find-tests/find-tests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/usr/bin/env python3
#!/usr/bin/env python3
import argparse
import os
import re
Expand Down Expand Up @@ -55,7 +55,6 @@ def generate_test_lists(maven_project_root, changes_only=True, unit_test_output=
for file_changed in other_files_changed:
print(file_changed)

print(list(test_files_changed))
modules_with_test_changes = project.get_modules_related_to(test_files_changed)
print("Modules with test changes:")
for test_module_with_changes in modules_with_test_changes:
Expand Down
2 changes: 2 additions & 0 deletions .circleci/scripts/find-tests/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ def get_parent_branch(repo_path):
match = re.match(r'parent_branch: (.*)$', line, re.M | re.I)
if match:
parent_branch = match.group(1)
if parent_branch is None:
raise ValueError("Could not find 'parent_branch:' entry in .nightly file")
return parent_branch.strip()


Expand Down
68 changes: 40 additions & 28 deletions .circleci/scripts/itest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -e
set -o pipefail

FIND_TESTS_DIR="target/find-tests"
NODE_INDEX="${CIRCLE_NODE_INDEX:-0}"
NODE_TOTAL="${CIRCLE_NODE_TOTAL:-1}"

# attempt to work around repository flakiness
retry()
Expand Down Expand Up @@ -49,9 +51,15 @@ echo "#### Determining tests to run"
perl -pi -e "s,/home/circleci,${HOME},g" target/structure-graph.json
find_tests
if [ ! -s /tmp/this_node_projects ]; then
echo "No tests to run."
echo "#### Node $NODE_INDEX/$NODE_TOTAL: No tests assigned, skipping"
exit 0
fi
PROJECT_COUNT=$(wc -l < /tmp/this_node_projects)
TEST_COUNT=$(wc -l < /tmp/this_node_tests 2>/dev/null || echo 0)
IT_COUNT=$(wc -l < /tmp/this_node_it_tests 2>/dev/null || echo 0)
echo "#### Node $NODE_INDEX/$NODE_TOTAL: $PROJECT_COUNT projects | $TEST_COUNT unit tests | $IT_COUNT integration tests"

echo "#### Node $NODE_INDEX/$NODE_TOTAL: Setting up local dependencies"

echo "#### Set loopback to 127.0.0.1"
sudo sed -i 's/127.0.1.1/127.0.0.1/g' /etc/hosts
Expand All @@ -65,39 +73,39 @@ echo "#### Setting up Postgres"
echo "#### Installing other dependencies"
# limit the sources we need to update
sudo rm -f /etc/apt/sources.list.d/*
# kill other apt commands first to avoid problems locking /var/lib/apt/lists/lock - see https://discuss.circleci.com/t/could-not-get-lock-var-lib-apt-lists-lock/28337/6

# kill other apt commands first to avoid problems locking /var/lib/apt/lists/lock
sudo killall -9 apt || true && \
retry sudo apt update && \
retry sudo env DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install \
ca-certificates \
tzdata \
software-properties-common \
debconf-utils
retry sudo apt update && \
retry sudo env DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install \
ca-certificates \
tzdata \
software-properties-common \
debconf-utils

# install some keys
curl -sSf https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
curl -sSf https://debian.opennms.org/OPENNMS-GPG-KEY | sudo tee -a /etc/apt/trusted.gpg.d/opennms_key.asc

# limit more sources and add mirrors
echo "deb mirror://mirrors.ubuntu.com/mirrors.txt $(lsb_release -cs) main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs) main restricted" | sudo tee -a /etc/apt/sources.list
sudo add-apt-repository -y 'deb http://debian.opennms.org stable main'

# add the R repository
sudo add-apt-repository -y "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"

retry sudo apt update && \
RRDTOOL_VERSION=$(apt-cache show rrdtool | grep Version: | grep -v opennms | awk '{ print $2 }') && \
echo '* libraries/restart-without-asking boolean true' | sudo debconf-set-selections && \
retry sudo env DEBIAN_FRONTEND=noninteractive apt -f --no-install-recommends install \
openjdk-17-jdk-headless \
r-base \
"rrdtool=$RRDTOOL_VERSION" \
jrrd2 \
jicmp \
jicmp6 \
|| exit 1
RRDTOOL_VERSION=$(apt-cache show rrdtool | grep Version: | grep -v opennms | awk '{ print $2 }') && \
echo '* libraries/restart-without-asking boolean true' | sudo debconf-set-selections && \
retry sudo env DEBIAN_FRONTEND=noninteractive apt -f --no-install-recommends install \
openjdk-17-jdk-headless \
r-base \
"rrdtool=$RRDTOOL_VERSION" \
jrrd2 \
jicmp \
jicmp6 \
|| exit 1

export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
export MAVEN_OPTS="$MAVEN_OPTS -Xmx4g -XX:ReservedCodeCacheSize=1g"
Expand Down Expand Up @@ -132,9 +140,7 @@ else
fi
fi

MAVEN_COMMANDS=("install")

echo "#### Building Assembly Dependencies"
echo "#### Node $NODE_INDEX/$NODE_TOTAL: Building Assembly Dependencies"
./compile.pl "${MAVEN_ARGS[@]}" \
-P'!checkstyle' \
-P'!production' \
Expand Down Expand Up @@ -164,7 +170,7 @@ ionice nice ./compile.pl "${MAVEN_ARGS[@]}" \
-DskipITs=false \
--batch-mode \
"${CCI_FAILURE_OPTION:--fail-fast}" \
-Dorg.opennms.core.test-api.dbCreateThreads=1 \
-Dorg.opennms.core.test-api.dbCreateThreads=8 \
-Dorg.opennms.core.test-api.snmp.useMockSnmpStrategy=false \
-Dtest="$(< /tmp/this_node_tests paste -s -d, -)" \
-Dit.test="$(< /tmp/this_node_it_tests paste -s -d, -)" \
Expand Down Expand Up @@ -196,8 +202,14 @@ while [ "$TEST_EXIT" -ne 0 ] && [ "$RETRIES_LEFT" -gt 0 ]; do
echo "#### Failed tests: $FAILED_TESTS"
RETRIED_TESTS="$FAILED_TESTS"

# Clean failed test XML reports so fresh results are written
# Preserve failing XMLs as flaky evidence before overwriting with retry results
FLAKY_EVIDENCE_DIR="/tmp/flaky-evidence/attempt-${ATTEMPT}"
mkdir -p "${FLAKY_EVIDENCE_DIR}"
set +e +o pipefail
find . \( -path "*/failsafe-reports/TEST-*.xml" -o -path "*/surefire-reports/TEST-*.xml" \) \
-exec grep -l -E 'failures="[1-9]|errors="[1-9]' {} + 2>/dev/null \
| xargs -I{} cp {} "${FLAKY_EVIDENCE_DIR}/"
# Now delete originals so fresh results are written by the retry
find . \( -path "*/failsafe-reports/TEST-*.xml" -o -path "*/surefire-reports/TEST-*.xml" \) \
-exec grep -l -E 'failures="[1-9]|errors="[1-9]' {} + 2>/dev/null \
| xargs rm -f
Expand Down Expand Up @@ -234,7 +246,7 @@ while [ "$TEST_EXIT" -ne 0 ] && [ "$RETRIES_LEFT" -gt 0 ]; do
-DskipITs=false \
--batch-mode \
--fail-at-end \
-Dorg.opennms.core.test-api.dbCreateThreads=1 \
-Dorg.opennms.core.test-api.dbCreateThreads=8 \
-Dorg.opennms.core.test-api.snmp.useMockSnmpStrategy=false \
--projects "$(< /tmp/this_node_projects paste -s -d, -)" \
install
Expand Down
Loading
Loading