Skip to content

chore: automate the release branch End of Life (EOL) - #4044

Merged
rm3l merged 16 commits into
mainfrom
RHIDP-9776-eol-release-bash
Nov 17, 2026
Merged

rm3l merged 16 commits into
mainfrom
RHIDP-9776-eol-release-bash

Conversation

@NiallTwomey2

@NiallTwomey2 NiallTwomey2 commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

RHIDP-9776

Replaces the Go implementation with a single bash script.

On every release tag push (x.y.0) the script eol-release.sh computes the release branch two x.y.0 releases
back and opens a PR that:

  • removes it from the nightly matrix, nightly.yaml
  • removes the matching upgrade paths
  • leaves nightly-postgresql-upgrade-test.yaml untouched
  • appends an enabled: false Renovate packageRules entry (last rule wins)
  • GA terminology replaced with release-tag x.y.0

Replaces #4005.
Verified locally with --tag 2.1.0 (→ release-1.9) and a synthetic2.2.0 (→ release-1.10).

Follow-ups (out of scope)

  • nightly-postgresql-upgrade-test.yaml intentionally verifies the release-1.10 to release-2.1 upgrade path, from #3901. When release-1.10 reaches EOL, remove that workflow manually.
  • sync-lightspeed-configs.yaml still lists release-1.10 by design.

@NiallTwomey2
NiallTwomey2 requested a review from a team as a code owner November 11, 2026 14:25
Comment thread .github/workflows/eol-release.yaml Resolved
Comment thread .github/workflows/eol-release.yaml Resolved
Comment thread .github/workflows/eol-release.yaml Resolved
Comment thread hack/eol-release.sh Resolved
Comment thread hack/eol-release.sh Resolved
Comment thread hack/eol-release.sh Resolved
Comment thread hack/eol-release.sh Resolved
Comment thread hack/eol-release.sh Resolved
Comment thread hack/eol-release.sh Resolved

@NiallTwomey2 NiallTwomey2 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Self-review notes for RHIDP-9776:

  • AC1 — on.push.tags + workflow_dispatch (tag input); tag shape validated in both the workflow and the script.
  • AC2 — edit_nightly_matrix (nightly.yaml) and edit_upgrade_matrix (standard + PostgreSQL upgrade workflows). Pairs are removed when either side matches, so 2.1.0 drops both 1.8→1.9 and 1.9→1.10.
  • AC3 — edit_renovate appends matchBaseBranches: ["release-1.9"], enabled: false last in packageRules, because later Renovate rules win and the existing docker-minor rule is enabled: true with a regex that matches release-1.9.
  • Safety — dry-run by default, temp-file + mv writes, jq -e gate, trap cleanup, no-op on re-run, and refuses to write an empty YAML matrix.
  • Verified — 2.1.0 → release-1.9 diff, synthetic 2.2.0 → release-1.10, second run reports nothing to do.

@rm3l

rm3l commented Nov 12, 2026

Copy link
Copy Markdown
Member

/agentic_review

@rhdh-qodo-merge

rhdh-qodo-merge Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Code Review by Qodo


View medium (3)
Remediation recommended
1. Trap cleanup failure can fail the run 📘 Rule violation
Description
The EXIT trap trap 'rm -rf "${WORK}"' EXIT runs under set -euo pipefail with no || true, `set
+e guard, or explicit error handling, so a failing rm -rf` changes the script's final exit status.
This can turn a successful --write run into a failed workflow step, which then skips the
PR-opening step that depends on steps.eol.outputs; the risk is low because WORK is a directory
this script creates under mktemp -d.
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The EXIT trap in `hack/eol-release.sh` runs `rm -rf "${WORK}"` while `set -e` is in effect. If the removal fails, the failure changes the script's exit status.

## Fix Focus Areas
- hack/eol-release.sh[14-19]

## Recommended Fix
Append `|| true` to the cleanup command in the trap, for example `trap 'rm -rf "${WORK}" || true' EXIT`, so a cleanup failure cannot override the script's real exit code. Keep the quoting of `${WORK}` as is.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗

2. Manual replay can retire a live branch 🐞 Bug
Description
The manual workflow validates only the input tag's format, while eol_branch_for_tag inserts a
missing tag into GA history before selecting an EOL branch. Dispatching a well-formed tag that has
not shipped, such as a future 2.2.0, can therefore open an EOL PR before that release exists.
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Manual replay can calculate EOL from a fabricated GA tag.
## Fix Focus Areas
- hack/eol-release.sh[74-80]
- .github/workflows/eol-release.yaml[37-47]
## Recommended Fix
Require the supplied tag to exist among fetched repository tags before computing or applying EOL edits. Keep synthetic tags confined to an explicit test path rather than the production workflow.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗

3. Bot pull requests wait for CI approval 🐞 Bug
Description
The PR creation step uses secrets.GITHUB_TOKEN as the GitHub CLI credential. GitHub puts
pull-request workflows triggered by PRs created with that token into an approval-required state, so
the repository's PR and Renovate validation checks will not run until a writer approves them.
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
PRs created with the workflow's GITHUB_TOKEN leave pull-request checks awaiting manual approval.
## Fix Focus Areas
- .github/workflows/eol-release.yaml[49-55]
- .github/workflows/eol-release.yaml[84-94]
## Recommended Fix
If generated EOL PRs should receive automatic validation, create them with a suitably scoped GitHub App installation token rather than GITHUB_TOKEN.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


View low (1)
Informational
4. Non-GA tags create failed release runs 🐞 Bug
Description
The push filter uses glob wildcards after the first digit of each version component, rather than
restricting those components to digits. A tag such as 2.1-rc.0 can start this workflow but fails
its later GA-format validation, producing a failed EOL run for a tag the workflow does not handle.
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The tag glob admits non-GA names that the validation step then treats as workflow failures.
## Fix Focus Areas
- .github/workflows/eol-release.yaml[5-7]
- .github/workflows/eol-release.yaml[37-42]
## Recommended Fix
Treat tags admitted by the broad glob but rejected by the strict GA regex as successful no-op runs, or otherwise gate the EOL job so those tags do not produce failures.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


Comment thread hack/eol-release.sh Resolved
Comment thread .github/workflows/eol-release.yaml Resolved
Comment thread .github/workflows/eol-release.yaml Resolved
Comment thread .github/workflows/eol-release.yaml Resolved
@github-actions

Copy link
Copy Markdown
Contributor

✅ PR images built and pushed successfully!

Images are available for testing (expires in 7 days):

Image Full tag PR tag
Operator quay.io/rhdh-community/operator:2.2.0-pr-4044-fb4c658 quay.io/rhdh-community/operator:2.2.0-pr-4044
Bundle quay.io/rhdh-community/operator-bundle:2.2.0-pr-4044-fb4c658 quay.io/rhdh-community/operator-bundle:2.2.0-pr-4044
Catalog quay.io/rhdh-community/operator-catalog:2.2.0-pr-4044-fb4c658 quay.io/rhdh-community/operator-catalog:2.2.0-pr-4044

Comment thread .github/workflows/eol-release.yaml Resolved
Comment thread .github/workflows/eol-release.yaml Resolved
Comment thread .github/workflows/eol-release.yaml Resolved
Comment thread hack/eol-release.sh Resolved

@rm3l rm3l left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also, please rebase your PR branch @NiallTwomey2 .

@github-actions

Copy link
Copy Markdown
Contributor

✅ PR images built and pushed successfully!

Images are available for testing (expires in 7 days):

Image Full tag PR tag
Operator quay.io/rhdh-community/operator:2.2.0-pr-4044-841d95c quay.io/rhdh-community/operator:2.2.0-pr-4044
Bundle quay.io/rhdh-community/operator-bundle:2.2.0-pr-4044-841d95c quay.io/rhdh-community/operator-bundle:2.2.0-pr-4044
Catalog quay.io/rhdh-community/operator-catalog:2.2.0-pr-4044-841d95c quay.io/rhdh-community/operator-catalog:2.2.0-pr-4044

@github-actions

Copy link
Copy Markdown
Contributor

✅ PR images built and pushed successfully!

Images are available for testing (expires in 7 days):

Image Full tag PR tag
Operator quay.io/rhdh-community/operator:2.2.0-pr-4044-04389ba quay.io/rhdh-community/operator:2.2.0-pr-4044
Bundle quay.io/rhdh-community/operator-bundle:2.2.0-pr-4044-04389ba quay.io/rhdh-community/operator-bundle:2.2.0-pr-4044
Catalog quay.io/rhdh-community/operator-catalog:2.2.0-pr-4044-04389ba quay.io/rhdh-community/operator-catalog:2.2.0-pr-4044

@NiallTwomey2
NiallTwomey2 force-pushed the RHIDP-9776-eol-release-bash branch from 04389ba to 81b0558 Compare November 17, 2026 10:27
@rm3l
rm3l self-requested a review November 17, 2026 13:41

@rm3l rm3l left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@NiallTwomey2 Please make sure the review comments shared earlier are addressed.

Comment thread hack/eol-release.sh Resolved
Comment thread .github/workflows/eol-release.yaml Resolved
Comment thread .github/workflows/eol-release.yaml Resolved
Comment thread .github/workflows/eol-release.yaml Resolved
@NiallTwomey2
NiallTwomey2 force-pushed the RHIDP-9776-eol-release-bash branch from ea5a4dc to 7a65a8f Compare November 17, 2026 15:44
Comment thread .github/workflows/eol-release.yaml Resolved
@openshift-ci openshift-ci Bot added the lgtm label Nov 17, 2026
@sonarqubecloud

Copy link
Copy Markdown

@rm3l rm3l changed the title Automate the release branch End of Life (EOL) with a bash script chore: automate the release branch End of Life (EOL) Nov 17, 2026
@rm3l
rm3l merged commit dc785d9 into main Nov 17, 2026
10 checks passed
@rm3l
rm3l deleted the RHIDP-9776-eol-release-bash branch November 17, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants