From 17d99c54cd202a68803d847f3c11cb4031861acc Mon Sep 17 00:00:00 2001 From: skestwal Date: Thu, 6 Nov 2025 15:39:53 +0530 Subject: [PATCH 1/3] refactor(release-scripts): enable branch reuse for reruns and update old chart version Signed-off-by: skestwal --- ci-scripts/release-tests.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ci-scripts/release-tests.sh b/ci-scripts/release-tests.sh index 15bca45..65a4d6d 100755 --- a/ci-scripts/release-tests.sh +++ b/ci-scripts/release-tests.sh @@ -17,7 +17,16 @@ function configure_run() { testname="$3" git checkout "$SOURCE_BRANCH" - git checkout -b "$branch" + git pull origin "$SOURCE_BRANCH" + + if git show-ref --verify --quiet refs/heads/"$branch"; then + echo "$(date -u +'%Y-%m-%dT%H:%M:%S,%N+00:00') INFO Branch $branch exists, updating it" + git checkout "$branch" + git pull origin "$branch" # Pull existing branch changes + else + echo "$(date -u +'%Y-%m-%dT%H:%M:%S,%N+00:00') INFO Creating new branch $branch" + git checkout -b "$branch" + fi echo " export DURATION=$DURATION From f4d659f864b986e2f0d7486f67ed264dd538b2e6 Mon Sep 17 00:00:00 2001 From: skestwal Date: Mon, 10 Nov 2025 18:16:21 +0530 Subject: [PATCH 2/3] refactor(release-scripts): improve branch and PR reuse for release testing - Check both local and remote branches to enable proper branch reuse - Reuse existing open PRs instead of creating duplicates for same branch - Clean up old test.env configuration before adding new settings to prevent duplication Signed-off-by: skestwal --- ci-scripts/release-tests.sh | 59 ++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 21 deletions(-) diff --git a/ci-scripts/release-tests.sh b/ci-scripts/release-tests.sh index 65a4d6d..30c643d 100755 --- a/ci-scripts/release-tests.sh +++ b/ci-scripts/release-tests.sh @@ -19,15 +19,20 @@ function configure_run() { git checkout "$SOURCE_BRANCH" git pull origin "$SOURCE_BRANCH" - if git show-ref --verify --quiet refs/heads/"$branch"; then + if git show-ref --verify --quiet refs/heads/"$branch" || git show-ref --verify --quiet refs/remotes/origin/"$branch"; then echo "$(date -u +'%Y-%m-%dT%H:%M:%S,%N+00:00') INFO Branch $branch exists, updating it" - git checkout "$branch" - git pull origin "$branch" # Pull existing branch changes + git checkout "$branch" 2>/dev/null || git checkout -b "$branch" origin/"$branch" + git pull origin "$branch" else echo "$(date -u +'%Y-%m-%dT%H:%M:%S,%N+00:00') INFO Creating new branch $branch" git checkout -b "$branch" fi + if [ -f test.env ]; then + sed -i.bak '/^export DURATION=/,/^export RHDH_HELM_CHART_VERSION=/d' test.env + rm -f test.env.bak + fi + echo " export DURATION=$DURATION export PRE_LOAD_DB=true @@ -50,27 +55,39 @@ export RHDH_HELM_CHART_VERSION='$RHDH_HELM_CHART_VERSION' git commit -am "chore($ticket): $testname on $branch" git push -u origin "$branch" - echo "$(date -u +'%Y-%m-%dT%H:%M:%S,%N+00:00') INFO Created and pushed branch ${branch}" + echo "$(date -u +'%Y-%m-%dT%H:%M:%S,%N+00:00') INFO Pushed branch ${branch}" git checkout "$SOURCE_BRANCH" - curl_data='{ - "title": "chore('"$ticket"'): '"$branch"'", - "body": "**'"$testname"'**: '"$VERSION_OLD"' vs. '"$VERSION_NEW"' testing. This is to get perf&scale data for `'"$branch"'`", - "head": "'"$branch"'", - "base": "'"$SOURCE_BRANCH"'", - "draft": true - }' - curl_out="$( curl \ - -L \ - --silent \ - -X POST \ + + pr_number=$( curl -L --silent \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer $GITHUB_TOKEN" \ -H "X-GitHub-Api-Version: 2022-11-28" \ - "https://api.github.com/repos/redhat-performance/backstage-performance/pulls" \ - -d "$curl_data" - )" - pr_number=$( echo "$curl_out" | jq -rc '.number' ) + "https://api.github.com/repos/redhat-performance/backstage-performance/pulls?head=redhat-performance:$branch&state=open" \ + | jq -rc '.[0].number // empty' + ) + + if [ -z "$pr_number" ] ; then + curl_data='{ + "title": "chore('"$ticket"'): '"$branch"'", + "body": "**'"$testname"'**: '"$VERSION_OLD"' vs. '"$VERSION_NEW"' testing. This is to get perf&scale data for `'"$branch"'`", + "head": "'"$branch"'", + "base": "'"$SOURCE_BRANCH"'", + "draft": true + }' + curl_out="$( curl \ + -L \ + --silent \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/redhat-performance/backstage-performance/pulls" \ + -d "$curl_data" + )" + pr_number=$( echo "$curl_out" | jq -rc '.number' ) + fi + curl_comment_out="$( curl \ -L \ --silent \ @@ -143,8 +160,8 @@ function storage_limit_test() { # !!! Configure here !!! VERSION_OLD="1.7" VERSION_NEW="1.8" -RHDH_HELM_CHART_VERSION_OLD=1.7.1 -RHDH_HELM_CHART_VERSION_NEW=1.8-145-CI +RHDH_HELM_CHART_VERSION_OLD=1.7.2 +RHDH_HELM_CHART_VERSION_NEW=1.8-164-CI SOURCE_BRANCH_OLD=rhdh-v1.7.x SOURCE_BRANCH_NEW=main compare_previous_test "RHIDP-9162" From cb3762b2d782b0a05b08b2b39a79bcd6dcafdceb Mon Sep 17 00:00:00 2001 From: skestwal Date: Thu, 13 Nov 2025 10:56:35 +0530 Subject: [PATCH 3/3] update(release-scripts): MVP for the release test will have orchestrator enabled Signed-off-by: skestwal --- ci-scripts/release-tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci-scripts/release-tests.sh b/ci-scripts/release-tests.sh index 30c643d..0aba150 100755 --- a/ci-scripts/release-tests.sh +++ b/ci-scripts/release-tests.sh @@ -50,6 +50,7 @@ export USE_PR_BRANCH=true export WAIT_FOR_SEARCH_INDEX=false export RHDH_HELM_CHART=redhat-developer-hub export AUTH_PROVIDER=keycloak +export ENABLE_ORCHESTRATOR=true export RHDH_HELM_CHART_VERSION='$RHDH_HELM_CHART_VERSION' " >>test.env