Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 13, 2025

What this PR does

Automates chart version bumping when Renovatebot updates dependencies. Previously required manual version updates; now patch version increments automatically (4.1.0 → 4.1.1) when dependencies change.

Changes:

  • New script .github/scripts/bump-chart-version.sh: Clean, focused 89-line script supporting patch/minor bumps with --bump-minor and --dry-run flags
  • Updated renovate.json: Added postUpgradeTasks to run bump script after dependency upgrades
  • Refactored update-jaeger-version.sh: Simplified to 5 clear steps - determines if update needed, prints summary, updates appVersion, and calls bump-chart-version.sh
  • Updated workflow: Simplified .github/workflows/update-jaeger-version.yaml to extract version information from Chart.yaml directly instead of relying on script outputs
  • Bumped chart version: Updated from 4.1.0 to 4.1.1 (required for CI)

Version bump strategy:

  • Dependency updates (Renovatebot): patch bump (4.1.0 → 4.1.1)
  • App updates (scheduled workflow): minor bump (4.0.0 → 4.1.0)

Both now use the same script, just different flags.

Simplifications based on review feedback:

  • Removed unnecessary --print-only flag from bump-chart-version.sh
  • Removed all GITHUB_OUTPUT writes from update-jaeger-version.sh (workflow handles signaling via git diff)
  • Removed unnecessary echo statements and redundant checks
  • Removed unused workflow step id
  • Net result: -94 lines of code, improved maintainability

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format,
will close that issue when PR gets merged)

Checklist

  • DCO signed
  • Commits are GPG signed
  • Chart Version bumped
  • Title of the PR starts with chart name ([jaeger] or [jaeger-operator])
  • README.md has been updated to match version/contain new values
Original prompt

I want to add a postUpgradeTasks to the renovatebot config that will ensure the chart patch version is bumped every time renovatebot creates an upgrade PR. There is already a script .github/scripts/update-jaeger-version.sh that has logic for bumping the chart version, but that script combines it with bumping the app version as well, so it needs to be split into .github/scripts/update-jaeger-version.sh + .github/scripts/bump-chart-version.sh and the latter invoked from the postUpgradeTasks


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add postUpgradeTasks to renovatebot config [jaeger] Add postUpgradeTasks to auto-bump chart version on dependency updates Dec 13, 2025
Copilot AI requested a review from yurishkuro December 13, 2025 06:32
@yurishkuro
Copy link
Member

@copilot this is too complex. .github/scripts/update-jaeger-version.sh can be significantly simplified from step 4, just call the new script. There is no need for --print-only logic in the bumping script, we don't need update-jaeger-version to provide a dry-run only summary by itself. It can be structured as this:

  1. determine if update is needed for appVersion
  2. print a summary just about that
  3. if not in dry_run, execute the update
  4. call .github/scripts/bump-chart-version.sh to do its own thing

We should also revisit all the outputs that .github/scripts/update-jaeger-version.sh writes to $GITHUB_OUTPUT - are any of them necessary? The main workflow itself. .github/workflows/update-jaeger-version.yaml, already has a check like this

if git diff --exit-code "$CHART_PATH"; then

and skips commits when no changes, so the script update-jaeger-version.sh should just be making changes to files, not signaling back to the workflow.

Copy link
Contributor Author

Copilot AI commented Dec 13, 2025

@copilot this is too complex. .github/scripts/update-jaeger-version.sh can be significantly simplified from step 4, just call the new script. There is no need for --print-only logic in the bumping scr...

Simplified the scripts as requested in commit 08fc6ff:

  1. Removed --print-only logic from bump-chart-version.sh - unnecessary complexity eliminated
  2. Removed all GITHUB_OUTPUT writes from update-jaeger-version.sh - workflow now handles signaling via git diff check
  3. Restructured update-jaeger-version.sh to 4 clear steps:
    • Steps 1-2: Check Docker Hub and get current versions
    • Step 3: Determine if update needed
    • Step 4: Print summary (exit if dry-run)
    • Step 5: Execute update (appVersion + call bump-chart-version.sh)
  4. Updated workflow to extract version from Chart.yaml directly instead of relying on script outputs

Net result: -81 lines, +24 lines across all files. Much simpler and easier to maintain!

ref: main

- name: 🔍 Check for new Jaeger version
id: check_version
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

Comment on lines 37 to 42
if [[ "$BUMP_TYPE" == "minor" ]]; then
echo "Bumping chart minor version in ${CHART_PATH}..."
else
echo "Bumping chart patch version in ${CHART_PATH}..."
fi

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if [[ "$BUMP_TYPE" == "minor" ]]; then
echo "Bumping chart minor version in ${CHART_PATH}..."
else
echo "Bumping chart patch version in ${CHART_PATH}..."
fi

Comment on lines 43 to 48
# --- 1. Verify Chart.yaml exists ---
if [[ ! -f "$CHART_PATH" ]]; then
echo "Error: Chart file '${CHART_PATH}' not found. Exiting."
exit 1
fi

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# --- 1. Verify Chart.yaml exists ---
if [[ ! -f "$CHART_PATH" ]]; then
echo "Error: Chart file '${CHART_PATH}' not found. Exiting."
exit 1
fi

@yurishkuro yurishkuro marked this pull request as ready for review December 13, 2025 17:11
@yurishkuro
Copy link
Member

@copilot address review comments (remove unnecessary code) and bump the chart patch number to make sure CI passes (bump is required for every change)

Copy link
Contributor Author

Copilot AI commented Dec 13, 2025

@copilot address review comments (remove unnecessary code) and bump the chart patch number to make sure CI passes (bump is required for every change)

Done in commit 270daab:

  • Removed unnecessary echo statements from bump-chart-version.sh
  • Removed redundant file existence check
  • Removed unused id: check_version from workflow
  • Bumped chart version from 4.1.0 to 4.1.1

All tests passing.

@yurishkuro yurishkuro enabled auto-merge December 13, 2025 17:54
@yurishkuro yurishkuro disabled auto-merge December 13, 2025 17:58
@yurishkuro yurishkuro merged commit 50d4b36 into main Dec 13, 2025
7 checks passed
@yurishkuro yurishkuro deleted the copilot/add-postupgrade-tasks-config branch December 13, 2025 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants