Skip to content

chore: generalize release-1.* branch patterns for 2.y support - #3189

Merged
openshift-merge-bot[bot] merged 2 commits into
redhat-developer:mainfrom
polasudo:chore/2y-migration-branch-patterns
Jul 22, 2026
Merged

chore: generalize release-1.* branch patterns for 2.y support#3189
openshift-merge-bot[bot] merged 2 commits into
redhat-developer:mainfrom
polasudo:chore/2y-migration-branch-patterns

Conversation

@polasudo

@polasudo polasudo commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

  • Generalizes hardcoded release-1.[0-9]+ / rhdh-1.[0-9]+ / 1.[0-9]+.x branch-filter patterns in GitHub Actions workflows and Renovate config to digit-agnostic equivalents (release-[0-9]+.[0-9]+, etc.), so CI/Renovate continue to trigger correctly once release branches move to release-2.0 and beyond.
  • No behavior change for existing 1.y branches — verified via regex simulation that the new patterns match both current release-1.10-style branches and future release-2.0/release-10.3-style branches, while still rejecting unrelated branches.

Files changed

  • .github/workflows/pr.yaml
  • .github/workflows/pr-dockerbuild-validation.yaml
  • .github/workflows/pr-bundle-diff-checks.yaml
  • .github/workflows/update-rpm-lockfile.yaml
  • .github/workflows/next-container-build.yaml
  • .github/renovate.json

Context

Part of a broader upstream build-infrastructure audit for 2.y readiness across rhdh-operator, rhdh-chart, rhdh-local, and red-hat-developers-documentation-rhdh. Opened as draft to track review before the 2.0 branch cut.

Not included in this PR (flagged as follow-ups)

  • Migrating this repo off classic per-branch protection onto a wildcard GitHub Ruleset (refs/heads/release-*), mirroring rhdh / rhdh-plugin-export-overlays.
  • Curated per-branch lists (nightly.yaml, nightly-upgrade-test.yaml, sync-lightspeed-configs.yaml) and Renovate matchBaseBranches disable blocks for specific old branches — these are intentionally curated and get a normal manual update at every release cut.

Test plan

  • CI passes on this PR
  • Confirm no regression for existing release-1.y triggers

Assisted-by Cursor

Related

GitHub Actions branch filters and Renovate baseBranchPatterns hardcoded
release-1.[0-9]+ / rhdh-1.[0-9]+ / 1.[0-9]+.x, which would silently stop
matching once release branches move to release-2.0 and beyond. Generalize
these to digit-agnostic patterns (release-[0-9]+.[0-9]+, etc.) so CI keeps
working across the 1.y -> 2.y transition with no further changes needed.

Part of the upstream build-infrastructure audit for 2.y readiness.

Co-authored-by: Cursor <cursoragent@cursor.com>
@polasudo
polasudo marked this pull request as ready for review July 21, 2026 08:22
@polasudo
polasudo requested a review from a team as a code owner July 21, 2026 08:22
@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.25%. Comparing base (3b5e5e5) to head (0330c29).
⚠️ Report is 21 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3189      +/-   ##
==========================================
+ Coverage   62.57%   63.25%   +0.67%     
==========================================
  Files          38       38              
  Lines        2234     2316      +82     
==========================================
+ Hits         1398     1465      +67     
- Misses        695      706      +11     
- Partials      141      145       +4     
Flag Coverage Δ
nightly ?
unittests 63.25% <ø> (+0.67%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rm3l

rm3l commented Jul 21, 2026

Copy link
Copy Markdown
Member

/agentic_review

Comment thread .github/workflows/next-container-build.yaml Outdated
@rhdh-qodo-merge

rhdh-qodo-merge Bot commented Jul 21, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Context used
⚠️ Tickets: not configured — ticket URL found in PR but could not be fetched — check ticket provider credentials
✅ Compliance rules (platform): 18 rules
✅ Cross-repo context
  Not relevant to this PR: redhat-developer/rhdh
  Not relevant to this PR: redhat-developer/rhdh-plugins

Grey Divider


Action required

1. Push triggers branch mismatch 🐞 Bug ☼ Reliability
Description
Multiple GitHub Actions workflows use regex-like branch filters such as release-[0-9]+.[0-9]+ (and
similar) for both push and pull_request triggers, but GitHub Actions branch matching is glob-based
so + is treated literally and these workflows may never run on real release branches like
release-1.10/future release-2.0. This can skip PR validation and break release-branch automation
paths such as container builds and RPM lockfile updates.
Code

.github/workflows/next-container-build.yaml[R8-10]

+      - rhdh-[0-9]+.[0-9]+
+      - "[0-9]+.[0-9]+.x"
+      - release-[0-9]+.[0-9]+
Relevance

⭐⭐⭐ High

Team adjusts workflow triggers for release branches; branch-filter edits accepted before (PR #2293)
and release-branch coverage updates (PR #2856).

PR-#2293
PR-#2856

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The cited workflow configurations include branch filters containing + in on.push.branches and
on.pull_request.branches (e.g., release-[0-9]+.[0-9]+), but GitHub Actions interprets these as
glob patterns where + has no special meaning and must appear literally in the branch name to
match. Repository documentation/configuration references actual release branches like release-1.10
and release-1.7/release-1.8, which contain no +, so the current filters will not match those
branches and the associated push/PR workflows will not trigger as intended.

.github/workflows/next-container-build.yaml[4-11]
.github/workflows/update-rpm-lockfile.yaml[8-13]
docs/lightspeed.md[151-158]
.github/workflows/pr.yaml[3-9]
.github/workflows/pr-dockerbuild-validation.yaml[3-9]
.github/workflows/pr-bundle-diff-checks.yaml[3-9]
.github/renovate.json[26-49]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
GitHub Actions branch filters under `on.push.branches` and `on.pull_request.branches` use glob matching, not regular expressions. Several workflows currently use regex-like patterns with `+` (e.g., `release-[0-9]+.[0-9]+`), but `+` is treated as a literal character in globs, so the workflows will not trigger for standard `release-X.Y` branches (e.g., `release-1.10`), causing missed PR checks and broken release automation (e.g., container builds and RPM lockfile updates).

## Issue Context
The repository references and documents release branches like `release-1.10` (and older ones like `release-1.7`/`release-1.8`) that do not contain `+`. This PR aimed to generalize triggers for 2.y, but the current patterns still won’t match the repo’s documented `release-X.Y` naming, so both push-triggered and PR-triggered workflows can be skipped on release branches.

## Fix Focus Areas
- .github/workflows/next-container-build.yaml[4-11]
- .github/workflows/update-rpm-lockfile.yaml[8-13]
- .github/workflows/pr.yaml[3-9]
- .github/workflows/pr-dockerbuild-validation.yaml[3-9]
- .github/workflows/pr-bundle-diff-checks.yaml[3-9]

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


Grey Divider

Qodo Logo

Keep only main and release-X.Y patterns; rhdh-* and *.x branches are no
longer used.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sonarqubecloud

Copy link
Copy Markdown

@polasudo
polasudo requested a review from rm3l July 22, 2026 13:17
@openshift-ci openshift-ci Bot added the lgtm label Jul 22, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit 8fbee94 into redhat-developer:main Jul 22, 2026
9 checks passed
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