From 3947da9c41bba79298fee910fa8961f69e34cde5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20C=C3=A1mara?= Date: Mon, 11 May 2026 15:17:29 +0200 Subject: [PATCH 1/2] Improve version bump flexibility allowing bump selected gems to higher version level (minor, major) --- .github/workflows/version_bumps.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/version_bumps.yml b/.github/workflows/version_bumps.yml index 3db7c28985..ada686fd68 100644 --- a/.github/workflows/version_bumps.yml +++ b/.github/workflows/version_bumps.yml @@ -16,6 +16,16 @@ on: - "patch" - "minor" - "major" + extra_gems_minor: + description: 'Additional gems to bump at minor level (space-separated). AWS gems are always included automatically. Only used during patch runs.' + required: false + default: '' + type: string + extra_gems_major: + description: 'Gems to also bump at major level (space-separated). Used during patch or minor runs.' + required: false + default: '' + type: string permissions: pull-requests: write @@ -54,6 +64,24 @@ jobs: - run: git config --global user.name "logstashmachine" - run: ./gradlew clean installDefaultGems - run: ./vendor/jruby/bin/jruby -S bundle update --all --${{ env.INPUTS_BUMP }} --strict + - name: Bump selected deps at minor level + if: ${{ inputs.bump == 'patch' }} + run: | + AWS_GEMS=$(./vendor/jruby/bin/jruby -S bundle list --name-only | grep '^aws-') + EXTRA="${{ inputs.extra_gems_minor }}" + GEMS=$(echo "${AWS_GEMS} ${EXTRA}" | xargs) + if [ -n "$GEMS" ]; then + echo "Bumping at --minor: ${GEMS}" + ./vendor/jruby/bin/jruby -S bundle update $GEMS --minor --strict --conservative + fi + - name: Bump selected deps at major level + if: ${{ inputs.bump != 'major' && inputs.extra_gems_major != '' }} + run: | + GEMS=$(echo "${{ inputs.extra_gems_major }}" | xargs) + if [ -n "$GEMS" ]; then + echo "Bumping at --major: ${GEMS}" + ./vendor/jruby/bin/jruby -S bundle update $GEMS --major --strict --conservative + fi - run: mv Gemfile.lock Gemfile.jruby-*.lock.release - run: echo "T=$(date +%s)" >> $GITHUB_ENV - run: echo "BRANCH=update_lock_${{ env.INPUTS_BRANCH }}_${T}" >> $GITHUB_ENV From 80acc665afbc132e6eedd3fdad242a8bfb250fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20C=C3=A1mara?= Date: Tue, 26 May 2026 10:08:08 +0200 Subject: [PATCH 2/2] Use intermediate env vars while handling input args --- .github/workflows/version_bumps.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/version_bumps.yml b/.github/workflows/version_bumps.yml index ada686fd68..3162870540 100644 --- a/.github/workflows/version_bumps.yml +++ b/.github/workflows/version_bumps.yml @@ -5,7 +5,7 @@ on: branch: description: 'Release Branch' required: true - default: '8.4' + default: '9.4' type: string bump: description: 'Bump type' @@ -38,6 +38,8 @@ jobs: env: INPUTS_BRANCH: "${{ inputs.branch }}" INPUTS_BUMP: "${{ inputs.bump }}" + INPUTS_EXTRA_GEMS_MINOR: "${{ inputs.extra_gems_minor }}" + INPUTS_EXTRA_GEMS_MAJOR: "${{ inputs.extra_gems_major }}" BACKPORT_LABEL: "backport-${{ inputs.branch }}" steps: - name: Set up JDK 21 @@ -68,8 +70,7 @@ jobs: if: ${{ inputs.bump == 'patch' }} run: | AWS_GEMS=$(./vendor/jruby/bin/jruby -S bundle list --name-only | grep '^aws-') - EXTRA="${{ inputs.extra_gems_minor }}" - GEMS=$(echo "${AWS_GEMS} ${EXTRA}" | xargs) + GEMS=$(echo "${AWS_GEMS} ${INPUTS_EXTRA_GEMS_MINOR}" | xargs) if [ -n "$GEMS" ]; then echo "Bumping at --minor: ${GEMS}" ./vendor/jruby/bin/jruby -S bundle update $GEMS --minor --strict --conservative @@ -77,7 +78,7 @@ jobs: - name: Bump selected deps at major level if: ${{ inputs.bump != 'major' && inputs.extra_gems_major != '' }} run: | - GEMS=$(echo "${{ inputs.extra_gems_major }}" | xargs) + GEMS=$(echo "${INPUTS_EXTRA_GEMS_MAJOR}" | xargs) if [ -n "$GEMS" ]; then echo "Bumping at --major: ${GEMS}" ./vendor/jruby/bin/jruby -S bundle update $GEMS --major --strict --conservative