Skip to content

Commit 0f65a72

Browse files
committed
🧠 automatically automatically enabling Grafana and SQL Datagen injection (when applicable) when repro model name contains "perf" #6399
1 parent 2c3cd3c commit 0f65a72

File tree

4 files changed

+70
-3
lines changed

4 files changed

+70
-3
lines changed

scripts/cli/playground

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8112,6 +8112,8 @@ function check_for_ec2_instance_running() {
81128112
# loop through the list
81138113
for instance in $(echo $current_list | tr "|" "\n")
81148114
do
8115+
echo ""
8116+
echo ""
81158117
log "💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸"
81168118
log "🤑 you have an ec2 instance $instance running !"
81178119
log "💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸"
@@ -14241,6 +14243,11 @@ playground_run_command() {
1424114243
fi
1424214244
array_flag_list+=("--enable-jmx-grafana")
1424314245
export ENABLE_JMX_GRAFANA=true
14246+
14247+
if [[ -n "$force_interactive_repro" ]]
14248+
then
14249+
force_enable --enable-jmx-grafana ENABLE_JMX_GRAFANA
14250+
fi
1424414251
fi
1424514252

1424614253
if [[ -n "$enable_kcat" ]]
@@ -14257,6 +14264,12 @@ playground_run_command() {
1425714264
log "📊 automatically enabling Grafana as --enable-sql-datagen is set"
1425814265
array_flag_list+=("--enable-jmx-grafana")
1425914266
export ENABLE_JMX_GRAFANA=true
14267+
14268+
if [[ -n "$force_interactive_repro" ]]
14269+
then
14270+
force_enable --enable-sql-datagen SQL_DATAGEN
14271+
force_enable --enable-jmx-grafana ENABLE_JMX_GRAFANA
14272+
fi
1426014273
fi
1426114274

1426214275
if [[ -n "$cluster_type" ]] || [[ -n "$cluster_cloud" ]] || [[ -n "$cluster_region" ]] || [[ -n "$cluster_environment" ]] || [[ -n "$cluster_name" ]] || [[ -n "$cluster_creds" ]] || [[ -n "$cluster_schema_registry_creds" ]]
@@ -15551,6 +15564,13 @@ playground_run_command() {
1555115564
display_docker_container_error_log
1555215565
fi
1555315566
check_for_ec2_instance_running
15567+
15568+
if [ ! -z "$ENABLE_JMX_GRAFANA" ]
15569+
then
15570+
log "🛡️ Prometheus is reachable at http://127.0.0.1:9090"
15571+
log "📛 Pyroscope is reachable at http://127.0.0.1:4040"
15572+
log "📊 Grafana is reachable at http://127.0.0.1:3000 (login/password is admin/password) or JMX metrics are available locally on those ports:"
15573+
fi
1555415574
}
1555515575

1555615576
# :command.function
@@ -18137,7 +18157,21 @@ EOF
1813718157

1813818158
playground generate-fzf-find-files &
1813918159
playground open-docs --only-show-url
18140-
playground run -f $repro_dir/$repro_test_filename --force-interactive-repro $flag_list
18160+
18161+
if [[ "$repro_test_filename" == *"perf"* ]]
18162+
then
18163+
if [[ $test_file == *"connect-debezium-sqlserver"* ]] || [[ $test_file == *"connect-debezium-mysql"* ]] || [[ $test_file == *"connect-debezium-postgresql"* ]] || [[ $test_file == *"connect-debezium-oracle"* ]] || [[ $test_file == *"connect-cdc-oracle"* ]] || [[ $test_file == *"connect-jdbc-sqlserver"* ]] || [[ $test_file == *"connect-jdbc-mysql"* ]] || [[ $test_file == *"connect-jdbc-postgresql"* ]] || [[ $test_file == *"connect-jdbc-oracle"* ]] || [[ $test_file == *"connect-cdc-xstream"* ]]
18164+
then
18165+
log "🌪️ automatically enabling SQL Datagen injection as repro name contains <perf>"
18166+
playground run -f $repro_dir/$repro_test_filename --enable-sql-datagen --force-interactive-repro $flag_list
18167+
else
18168+
log "📊 automatically enabling Grafana as repro name contains <perf>"
18169+
playground run -f $repro_dir/$repro_test_filename --enable-jmx-grafana --force-interactive-repro $flag_list
18170+
fi
18171+
else
18172+
playground run -f $repro_dir/$repro_test_filename --force-interactive-repro $flag_list
18173+
fi
18174+
1814118175
}
1814218176

1814318177
# :command.function

scripts/cli/src/commands/repro/bootstrap.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1279,4 +1279,17 @@ log "🛠️ Number of repro models available: $(get_cli_metric nb_existing_repr
12791279

12801280
playground generate-fzf-find-files &
12811281
playground open-docs --only-show-url
1282-
playground run -f $repro_dir/$repro_test_filename --force-interactive-repro $flag_list
1282+
1283+
if [[ "$repro_test_filename" == *"perf"* ]]
1284+
then
1285+
if [[ $test_file == *"connect-debezium-sqlserver"* ]] || [[ $test_file == *"connect-debezium-mysql"* ]] || [[ $test_file == *"connect-debezium-postgresql"* ]] || [[ $test_file == *"connect-debezium-oracle"* ]] || [[ $test_file == *"connect-cdc-oracle"* ]] || [[ $test_file == *"connect-jdbc-sqlserver"* ]] || [[ $test_file == *"connect-jdbc-mysql"* ]] || [[ $test_file == *"connect-jdbc-postgresql"* ]] || [[ $test_file == *"connect-jdbc-oracle"* ]] || [[ $test_file == *"connect-cdc-xstream"* ]]
1286+
then
1287+
log "🌪️ automatically enabling SQL Datagen injection as repro name contains <perf>"
1288+
playground run -f $repro_dir/$repro_test_filename --enable-sql-datagen --force-interactive-repro $flag_list
1289+
else
1290+
log "📊 automatically enabling Grafana as repro name contains <perf>"
1291+
playground run -f $repro_dir/$repro_test_filename --enable-jmx-grafana --force-interactive-repro $flag_list
1292+
fi
1293+
else
1294+
playground run -f $repro_dir/$repro_test_filename --force-interactive-repro $flag_list
1295+
fi

scripts/cli/src/commands/run.sh

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,11 @@ then
271271
fi
272272
array_flag_list+=("--enable-jmx-grafana")
273273
export ENABLE_JMX_GRAFANA=true
274+
275+
if [[ -n "$force_interactive_repro" ]]
276+
then
277+
force_enable --enable-jmx-grafana ENABLE_JMX_GRAFANA
278+
fi
274279
fi
275280

276281
if [[ -n "$enable_kcat" ]]
@@ -287,6 +292,12 @@ then
287292
log "📊 automatically enabling Grafana as --enable-sql-datagen is set"
288293
array_flag_list+=("--enable-jmx-grafana")
289294
export ENABLE_JMX_GRAFANA=true
295+
296+
if [[ -n "$force_interactive_repro" ]]
297+
then
298+
force_enable --enable-sql-datagen SQL_DATAGEN
299+
force_enable --enable-jmx-grafana ENABLE_JMX_GRAFANA
300+
fi
290301
fi
291302

292303
if [[ -n "$cluster_type" ]] || [[ -n "$cluster_cloud" ]] || [[ -n "$cluster_region" ]] || [[ -n "$cluster_environment" ]] || [[ -n "$cluster_name" ]] || [[ -n "$cluster_creds" ]] || [[ -n "$cluster_schema_registry_creds" ]]
@@ -1570,4 +1581,11 @@ else
15701581

15711582
display_docker_container_error_log
15721583
fi
1573-
check_for_ec2_instance_running
1584+
check_for_ec2_instance_running
1585+
1586+
if [ ! -z "$ENABLE_JMX_GRAFANA" ]
1587+
then
1588+
log "🛡️ Prometheus is reachable at http://127.0.0.1:9090"
1589+
log "📛 Pyroscope is reachable at http://127.0.0.1:4040"
1590+
log "📊 Grafana is reachable at http://127.0.0.1:3000 (login/password is admin/password) or JMX metrics are available locally on those ports:"
1591+
fi

scripts/cli/src/lib/cli_function.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,6 +1617,8 @@ function check_for_ec2_instance_running() {
16171617
# loop through the list
16181618
for instance in $(echo $current_list | tr "|" "\n")
16191619
do
1620+
echo ""
1621+
echo ""
16201622
log "💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸"
16211623
log "🤑 you have an ec2 instance $instance running !"
16221624
log "💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸💸"

0 commit comments

Comments
 (0)