docs: migrate routing recipes to service model#12
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 53 minutes and 52 seconds.Comment |
There was a problem hiding this comment.
Pull request overview
Migrates the GraphQL proxy and multi-tenant recipe skills to the service-backed route model (create services with upstreams, then bind routes via paths/service_id), and updates guidance around using raw route payloads for fields not supported by a7 config sync (e.g., vars).
Changes:
- Update both recipes to create services first and bind routes using
paths+service_id(instead of inline route upstreams). - Adjust GraphQL guidance to rely on raw route payloads for
varsand avoid implying unsupported fields are preserved by declarative sync. - Update multi-tenant guidance to create consumers and credentials separately (
a7 credential create) rather than embedding key-auth material in consumer objects.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| skills/a7-recipe-multi-tenant/SKILL.md | Migrates tenant routing examples to service-backed routes and separates consumer vs credential creation. |
| skills/a7-recipe-graphql-proxy/SKILL.md | Migrates GraphQL routing examples to service-backed routes and clarifies raw payload usage for vars/operation matching. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| a7_commands: | ||
| - a7 consumer create | ||
| - a7 gateway-group create | ||
| - a7 consumer-group create | ||
| - a7 consumer create | ||
| - a7 credential create |
There was a problem hiding this comment.
The recipe body references additional a7 commands (e.g., a7 global-rule create, a7 consumer-group list, a7 consumer list, a7 service get) that aren’t represented in metadata.a7_commands, while some listed commands (like a7 config dump) aren’t used below. Please align a7_commands with what this skill actually covers so the metadata stays accurate for filtering/testing.
| ### 1. Create Consumer Groups (scoped to a Gateway Group) | ||
| Create consumer groups in the shared gateway group: | ||
|
|
||
| ```bash |
There was a problem hiding this comment.
This section uses -g platform for consumer groups/consumers/routes, but earlier the recipe only shows creating premium-tier and standard-tier gateway groups. A reader starting from scratch won’t have a platform gateway group and these commands will fail/confuse. Consider creating platform explicitly here, or consistently using one of the gateway groups created above throughout the remaining examples.
| ```bash | |
| ```bash | |
| a7 gateway-group create platform --desc "Shared platform gateway group for tenant consumers and routes" |
| a7_commands: | ||
| - a7 service create | ||
| - a7 service get | ||
| - a7 route create | ||
| - a7 route update |
There was a problem hiding this comment.
a7 config sync is still used later in this recipe (Declarative Management Notes), but it’s no longer included in metadata.a7_commands. Please add it back (and keep this list aligned with commands the skill covers) so the skill metadata stays accurate for filtering/testing.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| a7 gateway-group create premium-tier --desc "High-performance tier for paid customers" | ||
|
|
||
| # Create a Standard Gateway Group | ||
| a7 gateway-group create standard-tier --desc "Standard tier for free/trial users" | ||
| a7 gateway-group create standard-tier --desc "Standard tier for free and trial users" | ||
| a7 gateway-group create platform --desc "Shared platform gateway group for tenant consumers and routes" |
There was a problem hiding this comment.
a7 gateway-group create does not take a positional name argument and does not have a --desc flag. In the CLI, the name must be provided via --name and the description via --description (or provide a full payload via -f). As written, these commands will fail if a reader follows the recipe.
| a7 route update gql-mutations -g prod-group -f - <<'EOF' | ||
| { | ||
| "service_id": "gql-write-service", | ||
| "plugins": { | ||
| "key-auth": {}, |
There was a problem hiding this comment.
a7 route update -f performs a full PUT replacement of the route. This update payload only includes service_id and plugins, so it will drop required matcher fields like paths and the vars condition (and may fail validation or change routing semantics). Update examples should include the full existing route definition (at least name, paths, and vars) along with the modified plugins/service binding.
|
|
||
| ```bash | ||
| a7 route update gql-mutations -g prod-group -f - <<'EOF' | ||
| { |
There was a problem hiding this comment.
Same issue as above: this a7 route update -f example will fully replace the gql-mutations route but the payload omits required routing fields (paths and the vars matcher for mutations). Include the full route definition (including name, paths, and vars) together with the updated consumer-restriction plugin to avoid clobbering the route.
| { | |
| { | |
| "id": "gql-mutations", | |
| "name": "gql-mutations", | |
| "paths": ["/graphql"], | |
| "vars": [ | |
| ["graphql_operation", "==", "mutation"] | |
| ], |
Summary
paths/service_idbindings.varsand avoid implying config sync preserves unsupported route fields.Validation
make validate-skillsmake test-skillsgit diff --check