Skip to content

docs: detailed step-by-step release branch setup guide#139

Draft
Lifto wants to merge 7 commits intomainfrom
docs/update-release-branch-guide
Draft

docs: detailed step-by-step release branch setup guide#139
Lifto wants to merge 7 commits intomainfrom
docs/update-release-branch-guide

Conversation

@Lifto
Copy link
Copy Markdown
Collaborator

@Lifto Lifto commented Apr 1, 2026

Summary

  • Expanded docs/RELEASE_BRANCHES.md with full step-by-step instructions based on our actual setup experience
  • Covers: GitHub branch protection, GitLab mirror regex config, Konflux component creation, build verification, app-interface deployment
  • Documents gotchas: immutable Konflux components, GitLab vs GitHub URLs, quay repo differences, mirror regex syntax

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

Walkthrough

Switches release workflow from per-release Konflux components to a perpetual release-branch staging model, documents step-by-step branch setup, GitLab mirror regex, Konflux/Tekton build behavior for release/*, updates deployment flow to pin saas.yml refs to SHAs, and adds a “Gotchas” section detailing validation and mirror constraints.

Changes

Cohort / File(s) Summary
Release Branch Workflow Doc
docs/RELEASE_BRANCHES.md
Rewrote release branch process: use a persistent release/* staging branch; detailed setup steps (create branch, confirm GitHub rulesets, GitLab mirror regex (main|release\/.*)); reuse existing okp-mcp Konflux component with .tekton/push.yaml CEL matching release/; instruct pinning saas.yml ref to commit SHAs and adjust IMAGE_TAG handling; updated deployment flow diagram and added “Gotchas” for ref schema, IMAGE_TAG vs SHA, mirror regex, and a flaky sast-coverity-check case.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant GH as GitHub
    participant GL as GitLab (mirror)
    participant KF as Konflux
    participant TK as Tekton
    participant QR as qontract-reconcile
    participant CL as Cluster (deploy)

    GH->>GL: Push to `release/*` (mirror sync)
    GL->>KF: Mirror push triggers Konflux build
    KF->>TK: Start Tekton pipeline (CEL matches `release/`)
    TK-->>KF: Build image / produce artifact
    KF->>QR: Create/merge MR with pinned `saas.yml` ref (SHA)
    QR->>CL: Reconcile and deploy staged release
    Note over QR,CL: Auto-merge `/lgtm` and SHA-based deploy flow
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The PR description accurately reflects the changeset, detailing the expansion of release branch documentation with step-by-step instructions covering GitHub, GitLab, Konflux, and deployment configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/update-release-branch-guide

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.

@Lifto Lifto marked this pull request as draft April 1, 2026 22:40
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (4)
docs/RELEASE_BRANCHES.md (4)

119-126: Minor: specify language for the fenced code block.

The linter suggests specifying a language for the code block. Since this is a flow diagram rather than actual code, you could use ```text to satisfy the linter while keeping the formatting intent clear.

📝 Proposed fix
-```
+```text
 release branch commit (GitHub)
   → GitLab mirror syncs (regex: main|release\/.*)
   → Konflux (okp-mcp-rel component) builds image
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/RELEASE_BRANCHES.md` around lines 119 - 126, The fenced block used for
the flow diagram should declare a language to satisfy the linter; update the
opening fence from ``` to ```text (and leave the closing fence as ```), i.e.,
edit the fenced code block in the RELEASE_BRANCHES.md content (the block
starting with the three backticks that contains "release branch commit (GitHub)"
and the arrow lines) so it becomes ```text to indicate plain text formatting.

98-99: Step 6 could use a bit more flesh on the bones.

While the other steps give detailed UI walkthroughs, this one just waves vaguely at "update IMAGE_TAG and IMAGE" without showing the actual format. A brief example snippet would help—especially since you're already documenting the quay repo difference.

Something like:

IMAGE: quay.io/redhat-user-workloads/rhel-lightspeed-tenant/okp-mcp-rel
IMAGE_TAG: <commit-sha-from-step-5>

Entirely optional since presumably everyone doing this already knows the app-interface format, but consistency with the detailed approach elsewhere would be nice.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/RELEASE_BRANCHES.md` around lines 98 - 99, Step 6 lacks a concrete
example of how to set IMAGE and IMAGE_TAG in the app-interface update; update
the docs to show the expected YAML keys and value formats by adding an example
snippet demonstrating the quay repo and tag format (reference the
`data/services/insights/rhel-lightspeed/cicd/saas.yml` variables `IMAGE` and
`IMAGE_TAG`), e.g. illustrate `IMAGE` pointing to the release quay repo and
`IMAGE_TAG` using the commit-sha from Step 5 so readers can copy the exact form
when editing app-interface.

108-108: Consider removing the specific PR number reference.

"These were added to main in PR #136" is helpful context now, but documentation tends to outlive the relevance of specific PR numbers. In six months, nobody will care which PR it was—they'll just want to know the feature exists. Maybe rephrase as "These were added to main and exist on all release branches created after that change."

Not critical—just a general principle that documentation should age gracefully like fine wine, not milk.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/RELEASE_BRANCHES.md` at line 108, Replace the sentence referencing "PR
`#136`" with a more future-proof phrasing: locate the line mentioning
`.tekton/push.yaml` and `.tekton/pull_request.yaml` and change "These were added
to `main` in PR `#136` and exist on all release branches created after that." to
something like "These were added to `main` and exist on all release branches
created after that change." — remove the specific PR number while keeping `main`
and the two .tekton files as the referenced artifacts.

59-59: Minor grammar: compound adjective needs a hyphen.

"First time setup" should be "First-time setup" when it precedes and modifies the noun it describes. English is weird like that—it's not a bug, it's a feature no one asked for.

📝 Proposed fix
-**First time setup (already done):**
+**First-time setup (already done):**
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/RELEASE_BRANCHES.md` at line 59, Replace the phrase "First time setup
(already done):" with the hyphenated compound "First-time setup (already done):"
so the adjective correctly modifies the noun; locate the exact heading line
containing "First time setup (already done):" in docs/RELEASE_BRANCHES.md and
update it to "First-time setup (already done):".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/RELEASE_BRANCHES.md`:
- Around line 119-126: The fenced block used for the flow diagram should declare
a language to satisfy the linter; update the opening fence from ``` to ```text
(and leave the closing fence as ```), i.e., edit the fenced code block in the
RELEASE_BRANCHES.md content (the block starting with the three backticks that
contains "release branch commit (GitHub)" and the arrow lines) so it becomes
```text to indicate plain text formatting.
- Around line 98-99: Step 6 lacks a concrete example of how to set IMAGE and
IMAGE_TAG in the app-interface update; update the docs to show the expected YAML
keys and value formats by adding an example snippet demonstrating the quay repo
and tag format (reference the
`data/services/insights/rhel-lightspeed/cicd/saas.yml` variables `IMAGE` and
`IMAGE_TAG`), e.g. illustrate `IMAGE` pointing to the release quay repo and
`IMAGE_TAG` using the commit-sha from Step 5 so readers can copy the exact form
when editing app-interface.
- Line 108: Replace the sentence referencing "PR `#136`" with a more future-proof
phrasing: locate the line mentioning `.tekton/push.yaml` and
`.tekton/pull_request.yaml` and change "These were added to `main` in PR `#136`
and exist on all release branches created after that." to something like "These
were added to `main` and exist on all release branches created after that
change." — remove the specific PR number while keeping `main` and the two
.tekton files as the referenced artifacts.
- Line 59: Replace the phrase "First time setup (already done):" with the
hyphenated compound "First-time setup (already done):" so the adjective
correctly modifies the noun; locate the exact heading line containing "First
time setup (already done):" in docs/RELEASE_BRANCHES.md and update it to
"First-time setup (already done):".

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 30993638-070b-4a01-8968-51cd95af81a5

📥 Commits

Reviewing files that changed from the base of the PR and between cbbc66c and 85336c3.

📒 Files selected for processing (1)
  • docs/RELEASE_BRANCHES.md

coderabbitai[bot]
coderabbitai bot previously approved these changes Apr 1, 2026
@Lifto Lifto force-pushed the docs/update-release-branch-guide branch from ccaf342 to 8692b99 Compare April 2, 2026 19:22
@Lifto Lifto marked this pull request as ready for review April 2, 2026 19:22
@Lifto Lifto requested a review from a team as a code owner April 2, 2026 19:22
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
docs/RELEASE_BRANCHES.md (2)

66-71: Replace workstation-specific paths with neutral commands/placeholders.

Using ~/Documents/Development/... bakes in one person’s filesystem. Prefer repo-agnostic examples so nobody has to debug your home directory from Line 66 onward.

♻️ Suggested doc tweak
- cd ~/Documents/Development/okp-mcp
+ cd /path/to/okp-mcp

- cd ~/Documents/Development/lscore-deploy
+ cd /path/to/lscore-deploy

Or use environment variables once, then reuse:

OKP_MCP_REPO=/path/to/okp-mcp
LSCORE_DEPLOY_REPO=/path/to/lscore-deploy

Also applies to: 77-80

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/RELEASE_BRANCHES.md` around lines 66 - 71, The doc examples hard-code a
user-specific path (~/Documents/Development/okp-mcp and
~/Documents/Development/lscore-deploy) for running git rev-parse; update the
snippets to use repository-agnostic placeholders or environment variables
instead (e.g., OKP_MCP_REPO and LSCORE_DEPLOY_REPO) and show the commands
referencing those placeholders for both the okp-mcp and lscore-deploy examples
(the lines containing "git rev-parse release/YYYY-MM-DD" and the preceding cd
commands), and apply the same replacement to the later block around lines 77-80
so the docs no longer assume a specific home directory.

28-31: Add a quick verification step for the “already protected” ruleset claim.

Runbooks age like milk when assumptions drift. Add one bullet to verify the release/** ruleset exists before proceeding, so setup doesn’t silently skip protection.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/RELEASE_BRANCHES.md` around lines 28 - 31, Update the "2. GitHub branch
protection" section to add a verification step that confirms the GitHub ruleset
for the branch pattern `release/**` actually exists and matches the protections
applied to `main`; instruct the operator to check via the GitHub repository
settings or the GitHub REST/CLI (e.g., query the repository's rulesets) and to
halt or report if the `release/**` ruleset is missing or differs from `main`.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/RELEASE_BRANCHES.md`:
- Around line 95-106: The fenced code block in RELEASE_BRANCHES.md (the
unlabeled triple-backtick block that starts at the "release branch commit
(GitHub)" line) must include a language identifier to satisfy markdownlint
MD040; update the opening fence from ``` to ```text (or another appropriate
language) so the block becomes a labeled fenced code block and linting passes
while preserving the block contents and indentation.

---

Nitpick comments:
In `@docs/RELEASE_BRANCHES.md`:
- Around line 66-71: The doc examples hard-code a user-specific path
(~/Documents/Development/okp-mcp and ~/Documents/Development/lscore-deploy) for
running git rev-parse; update the snippets to use repository-agnostic
placeholders or environment variables instead (e.g., OKP_MCP_REPO and
LSCORE_DEPLOY_REPO) and show the commands referencing those placeholders for
both the okp-mcp and lscore-deploy examples (the lines containing "git rev-parse
release/YYYY-MM-DD" and the preceding cd commands), and apply the same
replacement to the later block around lines 77-80 so the docs no longer assume a
specific home directory.
- Around line 28-31: Update the "2. GitHub branch protection" section to add a
verification step that confirms the GitHub ruleset for the branch pattern
`release/**` actually exists and matches the protections applied to `main`;
instruct the operator to check via the GitHub repository settings or the GitHub
REST/CLI (e.g., query the repository's rulesets) and to halt or report if the
`release/**` ruleset is missing or differs from `main`.
🪄 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: CHILL

Plan: Pro

Run ID: 1e678036-7b84-40b6-a313-d6b1d37d0633

📥 Commits

Reviewing files that changed from the base of the PR and between 85336c3 and 8692b99.

📒 Files selected for processing (1)
  • docs/RELEASE_BRANCHES.md

Comment on lines 95 to 106
```
release branch commit
→ Konflux (okp-mcp-release component) builds image
→ image tagged with commit SHA in quay.io
→ update app-interface saas.yml IMAGE_TAG with that SHA
release branch commit (GitHub)
→ GitLab mirror syncs (regex: main|release\/.*)
→ Konflux builds image (okp-mcp component, .tekton/push.yaml CEL match)
→ image tagged with commit SHA at quay.io/.../okp-mcp:<sha>
→ update app-interface saas.yml:
- ref: <commit-sha> (for okp-mcp, lightspeed-stack, redhat-okp)
- IMAGE_TAG removed for okp-mcp (auto-derived from ref)
→ /lgtm on the MR → App SRE bot auto-merges
→ qontract-reconcile deploys to staging
→ verify: oc get pods -n rhel-lightspeed-stage
```
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 | 🟡 Minor

Specify a language for the fenced block (markdownlint MD040).

Line 95 uses an unlabeled fence. Give it a language (for example text) to satisfy lint and keep tooling happy.

🧹 Minimal fix
-```
+```text
 release branch commit (GitHub)
   → GitLab mirror syncs (regex: main|release\/.*)
   → Konflux builds image (okp-mcp component, .tekton/push.yaml CEL match)
@@
   → verify: oc get pods -n rhel-lightspeed-stage
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🧰 Tools
🪛 markdownlint-cli2 (0.22.0)

[warning] 95-95: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/RELEASE_BRANCHES.md` around lines 95 - 106, The fenced code block in
RELEASE_BRANCHES.md (the unlabeled triple-backtick block that starts at the
"release branch commit (GitHub)" line) must include a language identifier to
satisfy markdownlint MD040; update the opening fence from ``` to ```text (or
another appropriate language) so the block becomes a labeled fenced code block
and linting passes while preserving the block contents and indentation.

## Branch Protection
1. Set `ref` to the **commit SHA** from each release branch HEAD:
- `okp-mcp-stage`: SHA from okp-mcp `release/YYYY-MM-DD`
- `lightspeed-stack-stage`: SHA from lscore-deploy `release/YYYY-MM-DD`
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.

This part is a little confusing. Are we tying together image tags AND openshift templates together as a single SHA? I think we could leave the refs in app-interface set to main and just adjust image tags. That's what we did in rlsapi.

→ update app-interface saas.yml IMAGE_TAG with that SHA
release branch commit (GitHub)
→ GitLab mirror syncs (regex: main|release\/.*)
→ Konflux builds image (okp-mcp component, .tekton/push.yaml CEL match)
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.

We will need to do the enterprise contract stuff here soon in konflux, so that's something to keep in mind. It just adds another step into the mix.

→ Konflux builds image (okp-mcp component, .tekton/push.yaml CEL match)
→ image tagged with commit SHA at quay.io/.../okp-mcp:<sha>
→ update app-interface saas.yml:
- ref: <commit-sha> (for okp-mcp, lightspeed-stack, redhat-okp)
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.

Again, this is where stuff gets weird if we're doing releases on image tags AND openshift templates.

@Lifto Lifto marked this pull request as draft April 3, 2026 17:39
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