Repository navigation
[ap/0.9.x] Backport #3820: subscription plan and token update options, --admin-server fix - #3850
Merged
Merged
Conversation
…in-server fix Backports the CLI changes from wso2#3820 (cli/ and docs/cli/ only) to ap/0.9.x for the 0.9.2 release: - `ap gateway subscription create` accepts spec.externalRefId, used as the subscription ID. - `ap gateway subscription update` changes the plan (--subscription-plan-id), removes it (--clear-subscription-plan) and rotates the token (--rotate-token or --subscription-token). Only the requested fields are sent, and blank or conflicting options are rejected. - `ap gateway add` saves --admin-server again, so `ap gateway health` works. Also adds the testutil gateway server helper the new unit tests use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thivindu
requested review from
AnuGayan,
Arshardh,
CrowleyRajapakse,
HeshanSudarshana,
HiranyaKavishani,
Induwara04,
Krishanx92,
PasanT9,
Piumal1999,
RakhithaRR,
Tharsanan1,
Thushani-Jayasekera,
ashera96,
chamilaadhi,
dushaniw,
hisanhunais,
lasanthaS,
pubudu538,
renuka-fernando,
senthuran16,
tgtshanika,
tharikaGitHub and
tharindu1st
as code owners
October 20, 2026 17:01
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Krishanx92
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Backports the
apCLI changes from #3820 toap/0.9.xso they can be released as CLI 0.9.2.ap/0.9.xwas created from theap/v0.9.1release tag, so 0.9.2 is 0.9.1 plus these changes only.Changes
ap gateway subscriptioncreate:spec.externalRefIdis used as the subscription ID. A non-string value is rejected before the request is sent.updatechanges only the fields that are passed.--statusis no longer required.--subscription-plan-id: move the subscription to another plan.--clear-subscription-plan: remove its plan.--rotate-token: prompts for the new token with hidden input.--subscription-token: passes the new token on the command line. Not recommended, because it ends up in shell history.Fix:
ap gateway adddropped--admin-serverThe value was accepted but never saved, so
ap gateway healthcalled the management URL and failed with a 404. It is saved again.Other
cli/VERSIONis set to0.9.2-SNAPSHOT. The release workflow releases this version without the-SNAPSHOTsuffix.testutilgateway server helper the new unit tests use. Onmainit arrived with the GraphQL CLI work.docs/cli/gateway/README.md.Only the
cli/anddocs/cli/changes from #3820 are included. The test framework changes from that PR stay onmain.Gateway compatibility
The new subscription options need a gateway with the subscription API updates:
mainafter #3804, or Gateway 1.2.0 with the latest U2 update. Older gateways, including the released 1.2.0:200but ignore them;spec.externalRefIdand generate the subscription ID themselves.update --status,get,list,deleteand the--admin-serverfix work with all gateway versions.