Skip to content

Commit 2120e45

Browse files
committed
Match runtime readiness to Paper version
1 parent a201ae3 commit 2120e45

4 files changed

Lines changed: 28 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ jobs:
8080
run: |
8181
bash -n tools/perf/prepare-phase2-protocol-client.sh
8282
bash -n tools/perf/run-phase2-runtime-once.sh
83+
bash tools/perf/run-phase2-runtime-once.sh --self-test
8384
node --check tools/perf/phase2-protocol-client.js
8485
8586
- name: Run checks and build production jar

.github/workflows/phase2-packet-capture.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ jobs:
104104
run: |
105105
bash -n tools/perf/prepare-phase2-protocol-client.sh
106106
bash -n tools/perf/run-phase2-runtime-once.sh
107+
bash tools/perf/run-phase2-runtime-once.sh --self-test
107108
node --check tools/perf/phase2-protocol-client.js
108109
node --check tools/perf/analyze-phase2-protocol-trace.js
109110
node tools/perf/analyze-phase2-protocol-trace.js --self-test

.github/workflows/phase2-runtime-ab.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ jobs:
104104
run: |
105105
bash -n tools/perf/prepare-phase2-protocol-client.sh
106106
bash -n tools/perf/run-phase2-runtime-once.sh
107+
bash tools/perf/run-phase2-runtime-once.sh --self-test
107108
node --check tools/perf/phase2-protocol-client.js
108109
pwsh -NoProfile -File tools/perf/analyze-phase2-abba.ps1 -SelfTest
109110
pwsh -NoProfile -File tools/perf/analyze-phase2-pcap.ps1 -SelfTest

tools/perf/run-phase2-runtime-once.sh

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,30 @@ set -euo pipefail
55
# invoke this script sequentially in the desired ABBA order; it deliberately
66
# owns only one JVM/run so cleanup failures cannot leak state into the next one.
77

8+
plugin_enabled_log_marker() {
9+
case "${1:-}" in
10+
26.1.2|26.2)
11+
printf '[InteractionVisualizer] Enabled for Paper %s!' "$1"
12+
;;
13+
*)
14+
return 64
15+
;;
16+
esac
17+
}
18+
19+
if [[ "${1:-}" == --self-test ]]; then
20+
[[ "$(plugin_enabled_log_marker 26.1.2)" == \
21+
'[InteractionVisualizer] Enabled for Paper 26.1.2!' ]]
22+
[[ "$(plugin_enabled_log_marker 26.2)" == \
23+
'[InteractionVisualizer] Enabled for Paper 26.2!' ]]
24+
if plugin_enabled_log_marker 26.3 >/dev/null 2>&1; then
25+
echo 'runtime harness accepted an unsupported Paper version' >&2
26+
exit 1
27+
fi
28+
printf '{"passed":true,"paperEnableMarkers":["26.1.2","26.2"]}\n'
29+
exit 0
30+
fi
31+
832
script_directory="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
933
protocol_client_source="$script_directory/phase2-protocol-client.js"
1034
protocol_trace_analyzer_source="$script_directory/analyze-phase2-protocol-trace.js"
@@ -590,7 +614,7 @@ fi
590614
) > "$server_log" 2>&1 &
591615
server_pid=$!
592616

593-
wait_for_log "[InteractionVisualizer] Enabled for Paper 26.1.2!" 240
617+
wait_for_log "$(plugin_enabled_log_marker "$paper_version")" 240
594618
wait_for_log "Done (" 240
595619

596620
python3 - "/proc/$server_pid/cmdline" "$jvm_command_line_metadata" "$server_pid" \

0 commit comments

Comments
 (0)