Skip to content

NO-JIRA: docs: fill gaps in CONTRIBUTING.md and ARCHITECTURE.md - #302

Open
jparrill wants to merge 1 commit into
openshift:mainfrom
jparrill:ai-contextification
Open

NO-JIRA: docs: fill gaps in CONTRIBUTING.md and ARCHITECTURE.md#302
jparrill wants to merge 1 commit into
openshift:mainfrom
jparrill:ai-contextification

Conversation

@jparrill

@jparrill jparrill commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • CONTRIBUTING.md: add PR Process overview, fix CI Pipeline table to match actual Prow jobs, document CODEOWNERS vs OWNERS, add backporting guide for release branches
  • ARCHITECTURE.md: add Design Overview, Failure Modes with recovery guidance, mermaid sequence diagrams for backup/restore flows, Tradeoffs and Decisions table, ConfigMap discovery explanation, and pkg/version to components

Test plan

  • Verify markdown renders correctly on GitHub
  • Verify mermaid diagrams render in PR diff view
  • Cross-check CI job names against actual Prow config

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Expanded architecture documentation with backup and restore workflows, configuration behavior, failure handling, and design decisions.
    • Added visual backup and restore sequence diagrams.
    • Updated contributor guidance for pull requests, reviews, CI checks, and backporting changes to release branches.

CONTRIBUTING.md:
- Add PR Process section with full lifecycle overview
- Fix CI Pipeline table to match actual Prow jobs (build, unit,
  verify, security, images)
- Document CODEOWNERS vs OWNERS relationship in Review Process
- Add Backporting section for release branch cherry-picks

ARCHITECTURE.md:
- Add Design Overview section explaining kind-based dispatch model
- Add pkg/version to Core Components table
- Explain ConfigMap discovery via pod SA namespace mount
- Add Failure Modes section with recovery guidance
- Add mermaid sequence diagrams for backup and restore flows
- Add Tradeoffs and Decisions section covering 6 key design choices

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Juan Manuel Parrilla Madrid <jparrill@redhat.com>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 28, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@jparrill: This pull request explicitly references no jira issue.

Details

In response to this:

Summary

  • CONTRIBUTING.md: add PR Process overview, fix CI Pipeline table to match actual Prow jobs, document CODEOWNERS vs OWNERS, add backporting guide for release branches
  • ARCHITECTURE.md: add Design Overview, Failure Modes with recovery guidance, mermaid sequence diagrams for backup/restore flows, Tradeoffs and Decisions table, ConfigMap discovery explanation, and pkg/version to components

Test plan

  • Verify markdown renders correctly on GitHub
  • Verify mermaid diagrams render in PR diff view
  • Cross-check CI job names against actual Prow config

🤖 Generated with Claude Code

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 openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Walkthrough

Documentation updates expand the plugin architecture reference and contributor guidance, covering backup/restore flows, configuration, failure modes, design decisions, pull request procedures, CI checks, review ownership, and release-branch backporting.

Changes

Architecture documentation

Layer / File(s) Summary
Plugin architecture and operational flow
ARCHITECTURE.md
Documents kind-based dispatch, configuration resolution, failure propagation, and backup and restore sequences.
Architecture references and decisions
ARCHITECTURE.md
Adds the version component and documents design tradeoffs around annotations, signed URLs, dispatch, vendoring, deployment, and etcd backup methods.

Contributor documentation

Layer / File(s) Summary
Pull request lifecycle and validation
CONTRIBUTING.md
Defines pull request preparation, submission, review, approval, merge requirements, CI checks, and review ownership.
Release-branch backporting
CONTRIBUTING.md
Adds instructions for cherry-picking merged changes into release branches and satisfying Jira validation.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: enxebre, sjenning

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the documentation updates to CONTRIBUTING.md and ARCHITECTURE.md.
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.
Stable And Deterministic Test Names ✅ Passed Only ARCHITECTURE.md and CONTRIBUTING.md changed; no test files or Ginkgo titles were added or modified.
Test Structure And Quality ✅ Passed Only ARCHITECTURE.md and CONTRIBUTING.md changed; no Ginkgo test code was added or modified, so the test-quality check is not applicable.
Microshift Test Compatibility ✅ Passed Only docs changed (ARCHITECTURE.md, CONTRIBUTING.md); no Ginkgo e2e tests or OpenShift API usage were added, so this check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only docs changed; no Ginkgo/e2e test files or test code were added, so the SNO compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed Only ARCHITECTURE.md and CONTRIBUTING.md changed; no manifests, operators, or controllers were modified, so no scheduling constraints were introduced.
Ote Binary Stdout Contract ✅ Passed Only ARCHITECTURE.md and CONTRIBUTING.md changed; no process-level code or stdout-writing paths were modified, so the OTE stdout contract is unaffected.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed Docs-only PR: HEAD touches ARCHITECTURE.md and CONTRIBUTING.md only, with no Ginkgo/e2e test code or networking-sensitive changes.
No-Weak-Crypto ✅ Passed Only ARCHITECTURE.md and CONTRIBUTING.md changed; no code paths, crypto implementations, or weak algorithms/comparisons were added.
Container-Privileges ✅ Passed Only ARCHITECTURE.md and CONTRIBUTING.md changed; no K8s/container privilege settings were introduced.
No-Sensitive-Data-In-Logs ✅ Passed PR only changes markdown docs; no code logging was added or modified, and no sensitive-data log patterns appear in the touched files.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci
openshift-ci Bot requested review from Joeavaikath and bryan-cox July 28, 2026 15:55
@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jparrill

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:

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 28, 2026

@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: 4

🤖 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 `@ARCHITECTURE.md`:
- Line 11: Update the architecture statement describing plugin statelessness to
remove the claim that statelessness alone makes retries safe. State that retry
safety comes from explicit idempotency and resource-creation guards, while
preserving the documented in-memory result-caching behavior referenced
elsewhere.
- Line 120: Update the ShouldEndPluginExecution documentation row to distinguish
the true, nil non-HCP backup path from the true, error path caused by empty
IncludedNamespaces; limit the “returns the item unmodified” and “No action
needed” statements to true, nil, and document the error outcome separately.
- Around line 140-141: Update the architecture diagrams around the
NewBackupPlugin and NewRestorePlugin flows to show ConfigMap loading during
plugin initialization, before the first Execute/item-processing step. Move the
“Get ConfigMap (plugin config)” interaction accordingly or label it explicitly
as initialization, and apply the same correction to both referenced diagram
sections.

In `@CONTRIBUTING.md`:
- Line 93: Update the CONTRIBUTING.md guidance for CODEOWNERS and OWNERS to
state that CODEOWNERS identifies requested owners while GitHub branch-protection
settings enforce required approvals. Reconcile the listed owners by aligning
both files, or explicitly document that differences such as joeavaikath and
devguyio are intentional.
🪄 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: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 17ee2b6e-e989-42ef-8c08-f9b164698164

📥 Commits

Reviewing files that changed from the base of the PR and between fd95e11 and e0565ae.

📒 Files selected for processing (2)
  • ARCHITECTURE.md
  • CONTRIBUTING.md

Comment thread ARCHITECTURE.md

Backup adds metadata (etcd snapshot URLs, restore annotations) and excludes resources that should not be persisted (pods, etcd PVCs when using snapshot method). Restore reads that metadata back, generates time-limited signed URLs for etcd snapshot download, and injects them into the restored resources so HyperShift can bootstrap the control plane from the snapshot.

The plugin is stateless across invocations — all coordination state flows through Kubernetes resources (annotations, CRs) rather than in-memory caches. This makes it safe for Velero to retry or re-invoke the plugin without side effects.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Do not equate statelessness with retry safety.

This overstates the guarantee and conflicts with the documented in-memory result caching in line 44. Clarify that supported retries are safe because of explicit idempotency and creation guards, not merely because the plugin is stateless.

🤖 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 `@ARCHITECTURE.md` at line 11, Update the architecture statement describing
plugin statelessness to remove the claim that statelessness alone makes retries
safe. State that retry safety comes from explicit idempotency and
resource-creation guards, while preserving the documented in-memory
result-caching behavior referenced elsewhere.

Comment thread ARCHITECTURE.md
| Failure | What Happens | Recovery |
|---------|-------------|----------|
| **ConfigMap missing** | Plugin proceeds with defaults (`volumeSnapshot`, `hypershift` namespace). Not an error. | Create the ConfigMap if non-default behavior is needed. |
| **`ShouldEndPluginExecution` returns true** | Plugin returns the item unmodified. This is normal for non-HCP backups — no error is raised. | No action needed. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Distinguish true, nil from true, error.

ShouldEndPluginExecution returns true with an error when IncludedNamespaces is empty. Limit this row’s no-op statement to the non-HCP true, nil path.

🤖 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 `@ARCHITECTURE.md` at line 120, Update the ShouldEndPluginExecution
documentation row to distinguish the true, nil non-HCP backup path from the
true, error path caused by empty IncludedNamespaces; limit the “returns the item
unmodified” and “No action needed” statements to true, nil, and document the
error outcome separately.

Comment thread ARCHITECTURE.md
Comment on lines +140 to +141
BIA->>K8s: Get ConfigMap (plugin config)
BIA->>BIA: Validate platform config

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Show ConfigMap loading during plugin initialization.

NewBackupPlugin and NewRestorePlugin read the ConfigMap before Execute handles items. The diagrams currently imply a Kubernetes read for each item; move this step before the first execution or label it as initialization.

Also applies to: 168-169

🤖 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 `@ARCHITECTURE.md` around lines 140 - 141, Update the architecture diagrams
around the NewBackupPlugin and NewRestorePlugin flows to show ConfigMap loading
during plugin initialization, before the first Execute/item-processing step.
Move the “Get ConfigMap (plugin config)” interaction accordingly or label it
explicitly as initialization, and apply the same correction to both referenced
diagram sections.

Comment thread CONTRIBUTING.md
## Review Process

- Reviewers and approvers are listed in the [OWNERS](./OWNERS) file. Any reviewer can provide feedback; approvers have merge authority.
- [`.github/CODEOWNERS`](.github/CODEOWNERS) gates GitHub's "required reviews" feature — it controls who GitHub notifies and requires approval from. `OWNERS` controls Prow's `/lgtm` and `/approve` commands. Both files should stay in sync.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Clarify CODEOWNERS enforcement and ownership differences.

CODEOWNERS identifies requested owners; GitHub branch-protection settings enforce required approvals. Also, the supplied files are not currently synchronized: OWNERS includes joeavaikath and devguyio, while .github/CODEOWNERS does not. Either align the lists or document that the difference is intentional.

🤖 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 `@CONTRIBUTING.md` at line 93, Update the CONTRIBUTING.md guidance for
CODEOWNERS and OWNERS to state that CODEOWNERS identifies requested owners while
GitHub branch-protection settings enforce required approvals. Reconcile the
listed owners by aligning both files, or explicitly document that differences
such as joeavaikath and devguyio are intentional.

@openshift-ci

openshift-ci Bot commented Jul 28, 2026

Copy link
Copy Markdown

@jparrill: all tests passed!

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@bryan-cox bryan-cox 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.

Four findings from review — one blocking (the images CI row), three suggestions.

Comment thread CONTRIBUTING.md
| `build` | Code compiles successfully |
| `unit` | All unit and integration tests pass |
| `verify` | Combined module verification (`go.mod`/`go.sum` up to date) + tests |
| `security` | Scans for known vulnerabilities in dependencies |

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.

nit: Worth noting that this job has skip_if_only_changed: ^docs/|\.md$|... in the Prow config — it won't run on doc-only PRs. A contributor submitting a markdown-only change won't see this check and might think something is broken.

Comment thread ARCHITECTURE.md

Backup adds metadata (etcd snapshot URLs, restore annotations) and excludes resources that should not be persisted (pods, etcd PVCs when using snapshot method). Restore reads that metadata back, generates time-limited signed URLs for etcd snapshot download, and injects them into the restored resources so HyperShift can bootstrap the control plane from the snapshot.

The plugin is stateless across invocations — all coordination state flows through Kubernetes resources (annotations, CRs) rather than in-memory caches. This makes it safe for Velero to retry or re-invoke the plugin without side effects.

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.

"The plugin is stateless across invocations — all coordination state flows through Kubernetes resources (annotations, CRs) rather than in-memory caches."

This contradicts the Design Invariants section below, which says: "The etcd orchestrator uses IsCreated() guards and caches results to avoid duplicate work." One claims no in-memory caches; the other documents their existence. Reconcile these — either qualify the stateless claim (e.g., "stateless across Velero invocations but may cache within a single backup run") or update the invariants section.

Comment thread CONTRIBUTING.md
## Review Process

- Reviewers and approvers are listed in the [OWNERS](./OWNERS) file. Any reviewer can provide feedback; approvers have merge authority.
- [`.github/CODEOWNERS`](.github/CODEOWNERS) gates GitHub's "required reviews" feature — it controls who GitHub notifies and requires approval from. `OWNERS` controls Prow's `/lgtm` and `/approve` commands. Both files should stay in sync.

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.

"Both files should stay in sync" — but they aren't today. OWNERS includes joeavaikath (approver+reviewer) and devguyio (reviewer), neither of whom appear in CODEOWNERS. Either sync them in this PR or soften the language to acknowledge the drift, e.g., "These files serve different systems (Prow vs GitHub) and should be kept consistent where practical."

@bryan-cox bryan-cox 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.

Correction: my earlier images comment was wrong — ci/prow/images is a real check auto-generated by ci-operator from the images: stanza. I've deleted that comment. The CI table is accurate.

The remaining 3 inline comments (stateless/cache contradiction, CODEOWNERS sync gap, security skip behavior) are suggestions, not blockers. Withdrawing the changes-requested status.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants