Skip to content

Add GitHub Actions workflow to fast-forward backplane branches from main - #262

Merged
RadekCap merged 1 commit into
stolostron:mainfrom
marek-veber:ff-sync-5.X
May 7, 2026
Merged

RadekCap merged 1 commit into
stolostron:mainfrom
marek-veber:ff-sync-5.X

Conversation

@marek-veber

@marek-veber marek-veber commented May 7, 2026

Copy link
Copy Markdown
Collaborator

What this PR does

Adds a GitHub Actions workflow (.github/workflows/ffwd-branch.yaml) that automatically fast-forwards backplane-5.0 and backplane-5.1 branches from main on every push to main.

This ensures backplane release branches stay synchronized with the main branch without manual intervention or merge commits.

Checklist

  • this PR contains documentation
  • this PR contains tests
  • this PR contains YAML Samples

Summary by CodeRabbit

  • Chores
    • Implemented automated branch synchronization workflow
    • Enhanced CI/CD validation pipeline with standardized infrastructure and improved monitoring capabilities

@coderabbitai

coderabbitai Bot commented May 7, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@marek-veber has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 39 minutes and 48 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: c17e0674-d466-4b1b-a8ed-514554758bc4

📥 Commits

Reviewing files that changed from the base of the PR and between 0c59b6c and 7900645.

📒 Files selected for processing (2)
  • .github/workflows/ffwd-branch.yaml
  • .github/workflows/pr-validation.yml
📝 Walkthrough

Walkthrough

Adds a branch fast-forward workflow that updates target branches from main on every push, and overhauls the PR validation CI workflow to standardize runners, switch to GHCR-based devcontainer builds/runs, add memory monitoring and expanded test jobs, and pin several actions.

Changes

Branch Fast-Forward Automation

Layer / File(s) Summary
Workflow Definition
.github/workflows/ffwd-branch.yaml
New workflow triggered on pushes to main; checks out full history, fetches all branches, iterates backplane-5.0,backplane-5.1, sets git author, runs git merge --ff-only with github.sha, and pushes updates.

PR Validation CI Overhaul

Layer / File(s) Summary
Runner / Job Baseline
.github/workflows/pr-validation.yml
Switched jobs from self-hosted pools to ubuntu-latest, standardized job permissions, and pinned actions/checkout versions.
Registry / Devcontainer Login
.github/workflows/pr-validation.yml
Replaced docker.pkg.github.com usage with ghcr.io; pinned docker/login-action; GHCR login performed conditionally on detected changes.
Devcontainer Build / Cache
.github/workflows/pr-validation.yml
Devcontainer build/pull updated to use GHCR aso-devcontainer cache/tag; removed prior docker.pkg build/pull flow.
Containerized CI Execution
.github/workflows/pr-validation.yml
Added/updated container run steps for test jobs (generator/controllers/samples/integration) to pull/run GHCR devcontainer and run containerized CI tasks.
Monitoring & Artifacts
.github/workflows/pr-validation.yml
Added background memory monitoring writing reports/memory-monitor.log, aggregation of reports/*.md into step summary, and artifact uploads (memory logs, JSON reports) with pinned actions/upload-artifact.
New Test Jobs
.github/workflows/pr-validation.yml
Introduced test-controllers and test-samples jobs with change detection, GHCR login, devcontainer pull/run, task execution, and artifact upload.
Integration Job Adjustments
.github/workflows/pr-validation.yml
integration-tests moved to ubuntu-latest, updated checkout pinning, and switched to GHCR devcontainer build/login.
Check Run Update Logic
.github/workflows/pr-validation.yml
Narrowed job-ID lookup to match runner and check name; bumped pinned actions/github-script version used to update the integration check run.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub as GitHub (push)
    participant FFWD as Fast-forward workflow
    participant CI as PR validation workflow
    participant Runner as ubuntu-latest
    participant GHCR as ghcr.io
    participant DevCont as Devcontainer (container)
    participant Tests as CI tasks
    participant Artifacts as Artifact storage

    GitHub->>FFWD: push to main triggers ffwd workflow
    FFWD->>Runner: checkout repo, fetch all branches
    FFWD->>Runner: for each target branch: merge --ff-only, push
    GitHub->>CI: push triggers pr-validation
    CI->>Runner: checkout, setup permissions
    Runner->>GHCR: login (docker/login-action)
    Runner->>DevCont: pull/build devcontainer from GHCR
    Runner->>DevCont: run containerized CI tasks
    DevCont->>Tests: execute ci:test-* commands
    Tests->>Artifacts: upload reports, memory logs
    CI->>GitHub: update check run status
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 A rabbit hops through YAML streams,
Pushing branches, stitching dreams.
Containers hum and monitors sing,
GHCR brings a polished spring.
Two workflows dance in gentle sync—
A nimble hop, a tidy link.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: adding a GitHub Actions workflow for fast-forwarding backplane branches from main.
Description check ✅ Passed The description covers the main purpose, explains the benefit, and includes the checklist. However, it is missing the optional 'closes/refs' issue reference and 'Special notes' section, which are not critical.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ffwd-branch.yaml:
- Around line 34-35: Replace the implicit git checkout commands to use explicit
remote-tracking references so the job behaves deterministically: find the
occurrences of git checkout "${TARGET_BRANCH_1}" and git checkout
"${TARGET_BRANCH_2}" and change them to use git checkout -B with the
corresponding origin/<branch> remote-tracking reference (so the checkout resets
or creates the local branch from the remote and fails cleanly if the remote
branch is missing); apply the same change to both places noted in the diff (the
blocks around TARGET_BRANCH_1 and TARGET_BRANCH_2) and keep the existing merge
--ff-only origin/main step as-is.
- Around line 13-19: The fast-forward job can run concurrently and race when
pushing to target branches; add a GitHub Actions concurrency policy under the
fast-forward job (the job named "fast-forward") to serialize runs by grouping on
the workflow+ref (for example use a group derived from github.workflow and
github.ref or github.sha branch ref) and set cancel-in-progress: false so new
runs are queued instead of canceling; add the concurrency block under the
fast-forward job in .github/workflows/ffwd-branch.yaml so TARGET_BRANCH_1 and
TARGET_BRANCH_2 pushes are processed serially.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: cb90d65e-3d73-4354-9143-cc6c224c36f4

📥 Commits

Reviewing files that changed from the base of the PR and between 0f73a07 and 2e2cbd2.

📒 Files selected for processing (1)
  • .github/workflows/ffwd-branch.yaml

Comment thread .github/workflows/ffwd-branch.yaml
Comment thread .github/workflows/ffwd-branch.yaml Outdated

@RadekCap RadekCap left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Self-Review Findings

Claude Code self-review identified 5 improvements for this workflow. Inline suggestions are provided below.

🤖 Generated by /ai-review pipeline

Comment thread .github/workflows/ffwd-branch.yaml Outdated
Comment thread .github/workflows/ffwd-branch.yaml Outdated
Comment thread .github/workflows/ffwd-branch.yaml Outdated
Comment on lines +16 to +44
env:
TARGET_BRANCH_1: backplane-5.0
TARGET_BRANCH_2: backplane-5.1

steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Fetch all branches
run: git fetch --all

- name: Fast-forward main commits into ${{ env.TARGET_BRANCH_1 }}
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git checkout "${TARGET_BRANCH_1}"
git merge --ff-only origin/main
git push origin "${TARGET_BRANCH_1}"

- name: Fast-forward main commits into ${{ env.TARGET_BRANCH_2 }}
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git checkout "${TARGET_BRANCH_2}"
git merge --ff-only origin/main
git push origin "${TARGET_BRANCH_2}"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Self-Review Finding #3: Consolidate duplicated steps (DRY)

The git config, checkout, merge, and push commands are duplicated verbatim across both steps. This should be refactored into a single step with a loop to reduce maintenance burden and prevent accidental divergence when adding more branches.

Also: the step names on lines 30 and 38 have an extra space before the branch variable reference.

Suggested replacement for the entire env + steps section:

    env:
      TARGET_BRANCHES: backplane-5.0 backplane-5.1

    steps:
      - name: Checkout repo
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
        with:
          fetch-depth: 0
          token: ${{ secrets.GITHUB_TOKEN }}

      - name: Fetch all branches
        run: git fetch --all

      - name: Fast-forward main commits into backplane branches
        run: |
          git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
          git config --global user.name "github-actions[bot]"
          for branch in ${TARGET_BRANCHES}; do
            echo "--- Fast-forwarding ${branch} ---"
            git checkout "${branch}"
            git merge --ff-only "${{ github.sha }}"
            git push origin "${branch}"
          done

@RadekCap RadekCap left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Security Review

No additional security vulnerabilities found beyond the self-review findings above. One operational concern:

No failure notification: When --ff-only fails (because someone pushed directly to a backplane branch causing divergence), the workflow fails silently — only a red X in the Actions tab. Consider adding a notification step (if: failure()) to alert the team via Slack or GitHub issue.

🤖 Generated by /ai-review pipeline

@RadekCap RadekCap changed the title ff sync main -> 5.X bracnches Add GitHub Actions workflow to fast-forward backplane branches from main May 7, 2026
@RadekCap

RadekCap commented May 7, 2026

Copy link
Copy Markdown
Collaborator

Pre-merge Checks Fixed:

  1. Title check: Fixed typo ("bracnches" → "branches") and made the title more descriptive: "Add GitHub Actions workflow to fast-forward backplane branches from main"
  2. Description check: Updated PR description to follow the repository's pull request template with proper sections and checklist.

🤖 Generated by /ai-review pipeline

@RadekCap

RadekCap commented May 7, 2026

Copy link
Copy Markdown
Collaborator

AI Review Pipeline Summary

Category Details
Self-Review 5 findings posted as inline suggestions
Security Review 1 additional operational concern (no failure notification)
CodeRabbit 1 round, 2 findings accepted, 0 denied
Pre-merge Checks 2 failures fixed (title typo, description)
Qodo Not present on this repository

Self-Review Findings (posted as inline suggestions)

# Description File Status
1 Pin actions/checkout to SHA for supply-chain security ffwd-branch.yaml:22 Suggestion posted
2 Use github.sha instead of origin/main to avoid race conditions ffwd-branch.yaml:35 Suggestion posted
3 Consolidate duplicated steps into loop (DRY) ffwd-branch.yaml:16-44 Suggestion posted
4 Fix double whitespace in step names ffwd-branch.yaml:30,38 Included in #3
5 Remove extra blank line ffwd-branch.yaml:8 Included in #3

CodeRabbit Findings

# Description File Decision
1 Add concurrency group to prevent push races ffwd-branch.yaml:19 Accepted
2 Use git checkout -B with explicit remote ref ffwd-branch.yaml:35 Accepted

Pre-merge Check Fixes

# Check Action
1 Title check Fixed typo and improved clarity
2 Description check Updated to follow PR template

All CodeRabbit threads resolved: Yes
PR title and description updated: Yes

Note: Self-review and CodeRabbit fixes are posted as suggestions only — the PR author (from a fork) needs to apply them. I could not push directly to the fork branch.

🤖 Generated by /ai-review pipeline

@RadekCap RadekCap left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

/lgtm

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
.github/workflows/ffwd-branch.yaml (2)

13-15: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Accepted concurrency-group fix has not been applied.

Without a concurrency block, rapid successive pushes to main will still trigger parallel fast-forward runs that race on git push to backplane-5.0 / backplane-5.1, causing non-fast-forward failures and silently dropping sync updates.

🔒 Proposed fix
 jobs:
   fast-forward:
+    concurrency:
+      group: ffwd-main-to-backplane
+      cancel-in-progress: false
     runs-on: ubuntu-latest
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ffwd-branch.yaml around lines 13 - 15, The workflow's
fast-forward job ("fast-forward") lacks a concurrency block, allowing
overlapping runs that race when pushing to branches; add a concurrency stanza to
the job using a stable group key (for example derived from github.ref or a
composite of github.repository + github.ref + job name) and set
cancel-in-progress: true so newer runs cancel older ones and prevent parallel
git push races to backplane-5.0/backplane-5.1; update the "fast-forward" job
definition to include this concurrency block.

35-35: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Accepted git checkout -B fix has not been applied.

git checkout "${branch}" will fail on a pristine runner workspace where no local tracking branch exists for the target. The -B form explicitly creates/resets the local branch from the remote ref and fails cleanly if origin/${branch} is absent.

🔧 Proposed fix
-            git checkout "${branch}"
+            git checkout -B "${branch}" "origin/${branch}"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ffwd-branch.yaml at line 35, Replace the fragile git
checkout invocation git checkout "${branch}" with the branch-reset form that
creates or resets the local branch from the remote ref (use the -B form and
ensure it uses origin/${branch} as the start point) so the workflow works on
pristine runners and fails cleanly if origin/${branch} is absent; update the
line containing git checkout "${branch}" accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/pr-validation.yml:
- Around line 142-147: Duplicate artifact name "test-output" in the
upload-artifact step causes failures when multiple jobs fail; update each job's
upload-artifact step (the steps using actions/upload-artifact@... in jobs named
test-generator, test-controllers, and test-samples) to produce a unique artifact
name (for example include the job identifier or run-specific value) such as
using a template like "test-output-${{ github.job }}" or "test-output-${{
github.run_id }}-${{ github.job }}" so each upload-artifact invocation has a
distinct name and will not conflict.

---

Duplicate comments:
In @.github/workflows/ffwd-branch.yaml:
- Around line 13-15: The workflow's fast-forward job ("fast-forward") lacks a
concurrency block, allowing overlapping runs that race when pushing to branches;
add a concurrency stanza to the job using a stable group key (for example
derived from github.ref or a composite of github.repository + github.ref + job
name) and set cancel-in-progress: true so newer runs cancel older ones and
prevent parallel git push races to backplane-5.0/backplane-5.1; update the
"fast-forward" job definition to include this concurrency block.
- Line 35: Replace the fragile git checkout invocation git checkout "${branch}"
with the branch-reset form that creates or resets the local branch from the
remote ref (use the -B form and ensure it uses origin/${branch} as the start
point) so the workflow works on pristine runners and fails cleanly if
origin/${branch} is absent; update the line containing git checkout "${branch}"
accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: ef2163d3-3acc-401a-a3a4-558940fb061a

📥 Commits

Reviewing files that changed from the base of the PR and between 2e2cbd2 and 0c59b6c.

📒 Files selected for processing (2)
  • .github/workflows/ffwd-branch.yaml
  • .github/workflows/pr-validation.yml

Comment on lines 142 to 147
- name: Save JSON logs on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v4.4.3
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # pinned to v7.0.1
with:
name: test-output
path: reports/*.json

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Duplicate artifact name test-output will cause upload failures when multiple jobs fail simultaneously.

All three jobs — test-generator (line 146), test-controllers (line 231), and test-samples (line 289) — upload an artifact named test-output on failure. actions/upload-artifact@v4+ (including v7) errors when a same-named artifact already exists in the workflow run. If two or more of these jobs fail in the same run, the second and third uploads will fail, losing those test reports.

🔧 Proposed fix — use unique artifact names per job

In test-generator (line 146):

-          name: test-output
+          name: test-output-generator

In test-controllers (line 231):

-          name: test-output
+          name: test-output-controllers

In test-samples (line 289):

-          name: test-output
+          name: test-output-samples

Also applies to: 227-232, 285-290

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/pr-validation.yml around lines 142 - 147, Duplicate
artifact name "test-output" in the upload-artifact step causes failures when
multiple jobs fail; update each job's upload-artifact step (the steps using
actions/upload-artifact@... in jobs named test-generator, test-controllers, and
test-samples) to produce a unique artifact name (for example include the job
identifier or run-specific value) such as using a template like "test-output-${{
github.job }}" or "test-output-${{ github.run_id }}-${{ github.job }}" so each
upload-artifact invocation has a distinct name and will not conflict.

@RadekCap RadekCap left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label May 7, 2026
@openshift-ci

openshift-ci Bot commented May 7, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: marek-veber, RadekCap

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [RadekCap,marek-veber]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@RadekCap
RadekCap merged commit 1506513 into stolostron:main May 7, 2026
7 of 8 checks passed
@marek-veber

Copy link
Copy Markdown
Collaborator Author

/cherry-pick backplane-2.11
/cherry-pick backplane-2.17

@openshift-cherrypick-robot

Copy link
Copy Markdown

@marek-veber: new pull request created: #316

Details

In response to this:

/cherry-pick backplane-2.11
/cherry-pick backplane-2.17

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-cherrypick-robot

Copy link
Copy Markdown

@marek-veber: new pull request created: #317

Details

In response to this:

/cherry-pick backplane-2.11
/cherry-pick backplane-2.17

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants