Skip to content

Fix GCP throughput tier in API examples - #660

Merged
kbatuigas merged 3 commits into
mainfrom
DOC-2379-example-throughput-is-using-an-outdated-tier
Aug 4, 2026
Merged

Fix GCP throughput tier in API examples#660
kbatuigas merged 3 commits into
mainfrom
DOC-2379-example-throughput-is-using-an-outdated-tier

Conversation

@kbatuigas

@kbatuigas kbatuigas commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Description

This pull request updates the example API requests in the controlplane-api.adoc documentation to improve clarity and accuracy. The main changes include updating region and zone examples, making the throughput tier a placeholder, and adding instructions for selecting a valid throughput tier.

Documentation improvements:

  • Updated the example region from us-west1 to us-central1 and the zones accordingly in the dedicated cluster example to better reflect available options.
  • Replaced hardcoded throughput tier values with the <throughput-tier> placeholder in both dedicated and BYOC cluster examples, making it clear that users must supply a valid value. [1] [2]
  • Added explanatory notes after each example, instructing users to replace <throughput-tier> with a valid tier and providing a reference link to the API documentation for the full list of regions, zones, and tiers. [1] [2]

Jira: https://redpandadata.atlassian.net/browse/DOC-2379
Review deadline:

Page previews

Pages that render the updated controlplane-api.adoc partial:

Checks

  • New feature
  • Content gap
  • Support Follow-up
  • Small fix (typos, links, copyedits, etc)

@kbatuigas
kbatuigas requested a review from a team as a code owner August 3, 2026 23:12
@netlify

netlify Bot commented Aug 3, 2026

Copy link
Copy Markdown

Deploy Preview for rp-cloud ready!

Name Link
🔨 Latest commit 6d0389a
🔍 Latest deploy log https://app.netlify.com/projects/rp-cloud/deploys/6a713e54583f8d0008c6c57c
😎 Deploy Preview https://deploy-preview-660--rp-cloud.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@coderabbitai

coderabbitai Bot commented Aug 3, 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

Run ID: fb4eebb9-97f6-4b26-8da4-65ea12620e0b

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

Cluster creation examples now use a <throughput-tier> placeholder instead of a fixed tier. The dedicated example uses us-central1 and matching zones. Both dedicated and BYOC examples explain how to select a tier valid for the region and cluster type.

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

Suggested reviewers: michelerp

🚥 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 main change: correcting the GCP throughput tier in API examples.
Description check ✅ Passed The description explains the changes, links the Jira issue, includes page previews, and marks the relevant check; only the review deadline is blank.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch DOC-2379-example-throughput-is-using-an-outdated-tier

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

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

Actionable comments posted: 1

🤖 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 `@modules/manage/partials/controlplane-api.adoc`:
- Around line 258-264: Update the Dedicated network example near the network
configuration to use us-central1 so its region matches the cluster example’s
region and avoids a network-region mismatch.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a0d20d78-cf70-41bd-b962-6159276fe228

📥 Commits

Reviewing files that changed from the base of the PR and between b5d4c3d and ee4d213.

📒 Files selected for processing (1)
  • modules/manage/partials/controlplane-api.adoc

Comment on lines +258 to +264
"region": "us-central1",
"throughput_tier": "<throughput-tier>",
"type": "TYPE_DEDICATED",
"zones": [
"us-west1-a",
"us-west1-b",
"us-west1-c"
"us-central1-a",
"us-central1-b",
"us-central1-c"

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.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Keep the Dedicated network and cluster regions aligned.

The Dedicated network example at Line 108 still uses us-west1, but this request passes that network ID with region set to us-central1. The Control Plane API documents REASON_CLUSTER_NETWORK_REGION_MISMATCH for this condition. (docs.redpanda.com)

Update the Dedicated network example at Line 108 to us-central1, or keep the cluster example in us-west1.

Proposed fix
-    "region": "us-west1"
+    "region": "us-central1"
🤖 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 `@modules/manage/partials/controlplane-api.adoc` around lines 258 - 264, Update
the Dedicated network example near the network configuration to use us-central1
so its region matches the cluster example’s region and avoids a network-region
mismatch.

kbatuigas and others added 2 commits August 3, 2026 16:20
The Dedicated cluster example uses us-central1, but the preceding
network example still created the network in us-west1. Reusing that
network for the cluster fails with REASON_CLUSTER_NETWORK_REGION_MISMATCH,
so align the network example to us-central1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Define :gcp-region: once per environment (us-central1 for Dedicated,
us-west1 for BYOC) and reference it in the create-network and
create-cluster examples for both the region field and the zones, with
subs="+attributes" on the affected code blocks.

This makes the network and cluster regions structurally impossible to
drift apart (a mismatch is rejected with
REASON_CLUSTER_NETWORK_REGION_MISMATCH), rather than relying on two
literals happening to agree.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kbatuigas
kbatuigas requested a review from wzzzrd86 August 4, 2026 01:28

@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. Both notes below are non-blocking — nothing here needs to change before merge.

What I verified

  • Tier IDs against the live regions and usage tiers reference: tier-1-gcp-v2-x86 is valid for both Dedicated and BYOC, and tier-1-gcp-um4g no longer appears — consistent with the reporter's note on DOC-2379 that it "does not work anymore for new clusters."
  • The rendered output on all three pages that include this partial. Dedicated shows us-central1 in the network region, the cluster region, and all three zones; BYOC shows us-west1 throughout; neither page leaks an unsubstituted {gcp-region}. subs="+attributes" didn't drop any JSON lines (cluster_configuration, custom_properties, resource_group_id all present), and throughput_tier renders the escaped <throughput-tier> correctly.
  • No stale tier IDs left behind: the only two occurrences of um4g anywhere in the repo are the two this PR fixes. The four other GCP examples already use tier-1-gcp-v2-x86, so this brings the last two in line.

Worth calling out that this fixes a second defect the ticket didn't mention: us-west1 isn't a supported GCP region for Dedicated at all — confirmed against both the live API reference and our own Dedicated region table in modules/reference/partials/tiers.adoc, which lists asia-east1 through us-east1 and no us-west1. The old Dedicated example couldn't have worked even with a valid tier. Keeping BYOC on us-west1 is right, and matches the BYOC GCP example in networking/byoc/gcp/nat-free-egress.adoc.

Non-blocking notes

  1. The new sentence mixes both tier terms — "Replace <throughput-tier> with a usage tier that is valid for your region and cluster type." Each choice is defensible on its own: the placeholder mirrors the JSON field, and "usage tier" is the dominant term in this repo (19 occurrences vs 4) and matches the reference page. It's just the pairing in one sentence that could leave a reader wondering whether the two are the same thing. If you want one term: Replace <throughput-tier> with a valid usage tier ID for your region and cluster type. Fine to leave as is.

  2. :gcp-region: is undefined on the Serverless page, which also includes this partial (:env-serverless: true). Harmless today and I confirmed it — every block referencing the attribute is inside a Dedicated or BYOC ifdef, and Serverless has its own POST /v1/serverless/clusters flow with no throughput_tier, so the rendered Serverless page contains zero literal {gcp-region}. Only flagging it because a future serverless example reusing the attribute would silently render the braces; an unconditional default before the two ifdefs would foreclose that.

Also: duplicating the "Replace <throughput-tier>…" sentence inside both ifdef branches looks like it wants deduplicating, but moving it outside the conditionals would wrongly surface it on the Serverless page. Correct as written — exactly one renders per page.

CodeRabbit's region-mismatch comment was a genuine catch, and 6d0389a goes further than the fix it proposed by making the two regions structurally unable to diverge.

@kbatuigas
kbatuigas merged commit a57972c into main Aug 4, 2026
6 checks passed
@kbatuigas
kbatuigas deleted the DOC-2379-example-throughput-is-using-an-outdated-tier branch August 4, 2026 20:44
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.

3 participants