Repository navigation
fix(cli): drop entitlements lookup at enveloped plan gates - #7395
Draft
pamelachia wants to merge 2 commits into
Draft
pamelachia wants to merge 2 commits into
pamelachia wants to merge 2 commits into
Conversation
… errors The branch create gate returns the entitlement_required envelope, so the upgrade hint and event come from the response body. A 4xx without the envelope no longer triggers the project and entitlements lookups or an upgrade hint.
…te errors The vanity-subdomain activate and check-availability gates return the entitlement_required envelope, so the upgrade hint comes from the response body. A 4xx without the envelope no longer triggers the project and entitlements lookups or an upgrade hint.
Contributor
Author
|
I ran these from source against a Free-plan project (
All three gates return the envelope, which skipped the lookup before this change too, so these runs cover the hint and the JSON field. The integration tests cover the lookup removal itself (a 4xx without the envelope makes one request and prints no hint). |
This branch has not been deployed
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.
branches create,vanity-subdomains activate, andvanity-subdomains check-availabilityran an entitlements lookup (get project, then get organization entitlements) after any 4xx without theentitlement_requiredenvelope. The Management API already returns that envelope on all three gates, so the lookup only ran for errors unrelated to the plan: two extra requests, and on an org without the feature, an upgrade hint and aplan_limitclassification for an unrelated error such as a validation failure.I removed the lookup and its permission declarations at those three commands. The CLI still prints the upgrade hint from the envelope on gated denials and fires
cli_upgrade_suggestedforbranches createandvanity-subdomains activate(check-availabilitystill suppresses the event), unchanged since #7271.Note: I left
branches updateand thessocommands on the lookup for now: the SAML routes return no envelope yet, and I haven't confirmed that the persistent-branch gate onbranches updatereturns one.Linear