Fix GCP throughput tier in API examples - #660
Conversation
✅ Deploy Preview for rp-cloud ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughCluster creation examples now use a Estimated code review effort: 1 (Trivial) | ~3 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
modules/manage/partials/controlplane-api.adoc
| "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" |
There was a problem hiding this comment.
🗄️ 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.
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>
micheleRP
left a comment
There was a problem hiding this comment.
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-x86is valid for both Dedicated and BYOC, andtier-1-gcp-um4gno 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-central1in the network region, the cluster region, and all three zones; BYOC showsus-west1throughout; neither page leaks an unsubstituted{gcp-region}.subs="+attributes"didn't drop any JSON lines (cluster_configuration,custom_properties,resource_group_idall present), andthroughput_tierrenders the escaped<throughput-tier>correctly. - No stale tier IDs left behind: the only two occurrences of
um4ganywhere in the repo are the two this PR fixes. The four other GCP examples already usetier-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
-
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. -
: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 BYOCifdef, and Serverless has its ownPOST /v1/serverless/clustersflow with nothroughput_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 twoifdefs 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.
Description
This pull request updates the example API requests in the
controlplane-api.adocdocumentation 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:
us-west1tous-central1and the zones accordingly in the dedicated cluster example to better reflect available options.<throughput-tier>placeholder in both dedicated and BYOC cluster examples, making it clear that users must supply a valid value. [1] [2]<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.adocpartial:Checks