Skip to content

DOC-2407: add selfHostedOnly overrides for cloud-unavailable rpk commands - #1838

Merged
JakeSCahill merged 1 commit into
mainfrom
rpk-cloud-availability-overrides
Aug 3, 2026
Merged

DOC-2407: add selfHostedOnly overrides for cloud-unavailable rpk commands#1838
JakeSCahill merged 1 commit into
mainfrom
rpk-cloud-availability-overrides

Conversation

@JakeSCahill

@JakeSCahill JakeSCahill commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #1837, which fixed 25 broken-xref build errors by hand-editing autogenerated rpk pages. Those edits would be reverted by the next rpk regeneration because the generator had no way to express them.

This PR encodes the intent in rpk-overrides.json so regeneration reproduces the fixes:

  • Adds selfHostedOnly: true to the 22 commands whose reference pages exist only in the self-managed docs (cluster brokers/health/license/loggers/maintenance/partitions/self-test/upgrade, cluster config edit/export/force-reset/import/lint, cluster storage restore, transform pause/resume, topic analyze/describe-storage, shadow config, profile validate, generate license/prometheus-config).
  • Documents the command-level cloudOnly/selfHostedOnly keys in a new "Cloud availability" section of the overrides guide, and fixes a module-prefix lint warning in an existing guide example.

Requires the generator support in redpanda-data/docs-extensions-and-macros PR "feat(rpk-docs): gate subcommand table rows by cloud availability". Verified by running that generator build against rpk-v26.2.1-rc2.json with these overrides: the regenerated pages are byte-identical to the pages fixed in #1837. The overrides are inert until a regeneration runs with the new generator, so merge order does not matter.

Jira

Fixes DOC-2407: the 22 selfHostedOnly entries here match the ticket's 22 broken cloud-docs xref targets exactly (verified 2026-08-02). Once this merges and the rpk pages regenerate, the parent pages' rows for these commands render inside ifndef::env-cloud[] and the cloud-docs builds stop emitting the broken links.

@JakeSCahill
JakeSCahill requested a review from a team as a code owner July 28, 2026 15:50
@netlify

netlify Bot commented Jul 28, 2026

Copy link
Copy Markdown

Deploy Preview for redpanda-docs-preview ready!

Name Link
🔨 Latest commit 5162add
🔍 Latest deploy log https://app.netlify.com/projects/redpanda-docs-preview/deploys/6a703976157b9800086761e9
😎 Deploy Preview https://deploy-preview-1838--redpanda-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 59e736f6-059b-4909-926a-1d7264d77fb1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The override guide now documents selfHostedOnly and cloudOnly behavior for command pages and parent subcommand tables. It also documents exceptions for rpk cloud and rpk security secret. The override metadata marks multiple cluster, topic, generation, transform, shadow, and profile commands as self-hosted-only. A deprecation replacement cross-reference now uses the full reference:rpk path.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: kbatuigas

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly identifies the addition of selfHostedOnly overrides for cloud-unavailable rpk commands.
Description check ✅ Passed The description explains the changes, Jira ticket, generator dependency, verification, and merge-order impact; page previews and checklist selections are missing.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rpk-cloud-availability-overrides

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.

@JakeSCahill
JakeSCahill changed the base branch from beta to main July 28, 2026 16:43
@JakeSCahill
JakeSCahill force-pushed the rpk-cloud-availability-overrides branch from 1131083 to a8cf35b Compare August 2, 2026 06:50

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs-data/RPK_OVERRIDES_GUIDE.adoc (1)

365-365: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use an empty xref label when no alternate text is required.

If the generated page title is the intended label, replace the hard-coded rpk new-command label with empty brackets. This keeps the label synchronized with the target page.

Based on learnings, AsciiDoc links should use empty brackets when no alternate display text is required.

Proposed refactor
-  "replacement": "xref:reference:rpk/rpk-new-command.adoc[rpk new-command]"
+  "replacement": "xref:reference:rpk/rpk-new-command.adoc[]"
🤖 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 `@docs-data/RPK_OVERRIDES_GUIDE.adoc` at line 365, Update the replacement xref
in the relevant RPK override configuration to use an empty label, preserving the
target reference while allowing the generated page title to provide the display
text instead of hard-coded “rpk new-command”.

Source: Learnings

🤖 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.

Nitpick comments:
In `@docs-data/RPK_OVERRIDES_GUIDE.adoc`:
- Line 365: Update the replacement xref in the relevant RPK override
configuration to use an empty label, preserving the target reference while
allowing the generated page title to provide the display text instead of
hard-coded “rpk new-command”.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f0b193be-e57b-4018-b6a5-591c415a18bc

📥 Commits

Reviewing files that changed from the base of the PR and between ad09b9b and a8cf35b.

📒 Files selected for processing (2)
  • docs-data/RPK_OVERRIDES_GUIDE.adoc
  • docs-data/rpk-overrides.json

@JakeSCahill JakeSCahill changed the title Add selfHostedOnly overrides for cloud-unavailable rpk commands DOC-2407: add selfHostedOnly overrides for cloud-unavailable rpk commands Aug 2, 2026

@micheleRP micheleRP left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving. This is the split-down version I asked for on the earlier revision, and the data does what it claims.

Merged onto current main and regenerated with the published 5.3.1: the 22 selfHostedOnly entries produce 69 gated rows across 42 pages, wrapped as ifndef::env-cloud[] with the directives on their own lines. Spot-checked rpk-cluster.adoc, where brokers, health, license, loggers, and maintenance are all correctly gated.

Override validation reports zero errors with this merged in, so none of the 22 entries collide with an existing cloudOnly (the mutual-exclusion check from #239 would have caught that).

Going from +42390/-2486 to +74/-15 makes this genuinely reviewable, which matters for a data change that reshapes 42 published pages.

One coordination note: three other open PRs also edit rpk-overrides.json. I test-merged all four pairwise. This one is clean against #1860 and #1865 in either order; only #1862 conflicts. Details on #1863 where I wrote up the full ordering.

Marks the 22 commands whose pages exist only in the self-managed docs
so the generator (docs-extensions-and-macros feat/rpk-subcommand-env-gating)
reproduces the env-cloud row gating on regeneration instead of reverting
it. Documents the new command-level cloud availability keys in the
overrides guide.
@JakeSCahill
JakeSCahill force-pushed the rpk-cloud-availability-overrides branch from a8cf35b to 5162add Compare August 3, 2026 06:47
@JakeSCahill
JakeSCahill merged commit c4d84b3 into main Aug 3, 2026
5 of 6 checks passed
@JakeSCahill
JakeSCahill deleted the rpk-cloud-availability-overrides branch August 3, 2026 06:47
JakeSCahill added a commit that referenced this pull request Aug 3, 2026
…aves

Resolves the rpk-overrides.json conflict by semantic reconstruction:
main's last valid state plus the #1838 selfHostedOnly gating (22
commands, re-asserted for the two whose entries this PR empties) plus
this PR's 55 content deltas, each set verified programmatically. This
also repairs the invalid JSON that the #1838 squash-merge left on main
(three unresolved conflict hunks), superseding the standalone hotfix
in #1874.
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