Skip to content

Conversation

@kenkania
Copy link

@kenkania kenkania commented Sep 23, 2025

Add a PR-triggered “Perf Test” GitHub Actions workflow with concurrency control and JDK 21 that authenticates to Google Cloud and introduce a CLI run_test.sh to run Maven dependency resolution tests for performance validation

📍Where to Start

Start with the workflow definition in perf-test.yaml to understand CI behavior, then review the command flow in run_test.sh and the test project POMs under tests/.


Macroscope summarized 7ce6ad9. (Automatic summaries will resume when PR exits draft mode or review begins).

#!/usr/bin/env bash

set -e

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A failed mvn (or Docker) command can be reported as success because the pipeline’s exit status is that of tee, not the build command.

This happens because set -e is enabled but set -o pipefail isn’t, so failures in pipelines are ignored.

Consider enabling pipefail (e.g. add set -o pipefail after set -e) so that the script exits on any command failure within pipelines.

+set -o pipefail

🚀 Reply to ask Macroscope to explain or update this suggestion.

👍 Helpful? React to give us feedback.

}

mkdir -p "$RUN_DIR"
cp -rf $TEST_DIR/. "$RUN_DIR"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script can unintentionally copy the entire filesystem root into the test directory if TEST_DIR is empty or unset, which is dangerous and may partially succeed before failing.

This occurs because cp -rf $TEST_DIR/. "$RUN_DIR" expands to cp -rf /. "$RUN_DIR" when TEST_DIR is empty or unset.

Consider validating that TEST_DIR is non-empty and points to an existing directory before performing the copy, and exit with an error if the check fails.

+if [[ -z "$TEST_DIR" || ! -d "$TEST_DIR" ]]; then
+    echo "Error: TEST_DIR must be a non-empty directory" >&2
+    exit 1
+fi

🚀 Reply to ask Macroscope to explain or update this suggestion.

👍 Helpful? React to give us feedback.

@kenkania kenkania changed the title Perf ken Wagon perf improvements Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants