Repository navigation
fix(cli): drop the entitlements lookup from sso commands - #7471
Closed
pamelachia wants to merge 2 commits into
Closed
pamelachia wants to merge 2 commits into
pamelachia wants to merge 2 commits into
Conversation
The admin SSO provider routes are not plan-gated, so a 4xx from them never means the org lacks SAML. The lookup only added two requests and a false upgrade hint on unrelated errors. sso add keeps the envelope-only upgrade suggestion; the SAML-disabled 404 errors are removed.
Only sso add and update passed apiUrl and accessToken, for the fallback lookup. Also updates the sso e2e 404 assertion and the sso SIDE_EFFECTS notes that still described the lookup.
sundeep8967
pushed a commit
to sundeep8967/cli
that referenced
this pull request
Nov 23, 2026
The `sso list`, `add`, `update` and `remove` commands looked up the organization's entitlements after any 4xx to decide whether to print an upgrade hint. The SSO provider routes had no plan gate when that was written, so the lookup added two requests and printed the hint on unrelated failures. The Management API now answers provider create and update with the `entitlement_required` error for organizations without SAML (rolling out), and the shared output and telemetry paths already handle that error, so I deleted the lookup. It was the last one in the CLI. **Changed:** - **No upgrade hint on unrelated SSO errors**: the four commands make no extra requests after a 4xx. The hint, the JSON `error.entitlement` and `cli_upgrade_suggested` come only from a response that carries the `entitlement_required` error, and only such a failure classifies as `plan_limit`. - **404s report the API error**: `sso list` and `sso add` reported every 404 as "SAML 2.0 support is not enabled". A 404 there means the project was not found, so they now surface the API's message and classify the failure as invalid input. I removed the `SsoListSamlDisabledError` and `SsoAddSamlDisabledError` classes, so their tags leave the error-tag snapshot. - **Also removed**: I deleted `suggestUpgrade` and its permission block, the `upgradeSuggested` option of `statusCodeActionability` and the `saml_disabled` fingerprint suffix, which only these commands used. **Note:** this supersedes supabase#7471, which kept the lookup helper for `sso add`. Against an API without the gate, `sso add` for an organization without SAML succeeds and prints no hint, as it does today. ## Linear - fixes GROWTH-1460
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.
The admin SSO provider routes behind the
ssocommands are not plan-gated, so a 4xx from them never means the organization lacks SAML. These commands ran an entitlements lookup on every 4xx. That added two extra requests, and the commands then printed an upgrade hint on unrelated failures (unknown provider ID, permissions, validation) and classified those failures asplan_limit.Changed:
sso list,add,updateandremoveno longer look up the organization's entitlements after a 4xx.sso addstill suggests an upgrade when the response carries theentitlement_requirederror, with no extra requests.branches updatekeeps its lookup.sso listandsso addreported every 404 as "SAML 2.0 support is not enabled". A 404 there means the project or provider was not found, so they now surface the API's message.Note: this overlaps #7441 in
upgrade-suggest.tsanderror-actionability.ts, so whichever merges second needs a rebase.Linear