Repository navigation
fix(teams): let editions override the per-instance organization limit - #13608
Merged
Merged
Conversation
ChiragAgg5k
force-pushed
the
fix/organization-limit-seam
branch
from
September 10, 2026 12:36
34b34c9 to
3c73c84
Compare
Contributor
|
The console organization limit from #13585 is right for self-hosted but Appwrite Cloud governs organizations through billing plans and runs the same action. The decision now lives in a protected method the cloud subclass overrides, so it cannot be switched off by configuration on a self-hosted instance. The console team fixture creates through the public API first and seeds rows only when the instance refuses, so CE suites also run inside the cloud pod.
ChiragAgg5k
force-pushed
the
fix/organization-limit-seam
branch
from
September 10, 2026 12:46
5c82e8d to
adaecef
Compare
✨ Benchmark resultsComparing
Per-scenario breakdown & investigation detailsMetrics below reflect the current branch (after). Δ P95 compares against the base.
Top API waits (after)
|
ArnabChatterjee20k
approved these changes
Sep 10, 2026
HarshMN2345
approved these changes
Sep 10, 2026
This was referenced Sep 10, 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.
Summary
#13585 made
POST /teamson the console project refuse a second organization per instance. That policy is right for self-hosted, but Appwrite Cloud runs the same action and governs organizations through its billing plans, so every cloud E2E flow that creates a console team started failing with403 organization_creation_prohibited, and CE's own E2E suites crashed inside the cloud pod (appwrite-labs/cloud#5755).isOrganizationLimited(Document $project): boolon the TeamsCreateaction. The limit, its distributed lock and the unauthenticated-user guard all key off that method. Self-hosted behaviour is unchanged and there is no environment switch, so a self-hosted operator cannot turn the limit off; cloud overrides the method in its subclass, the same way it already overrides the membershipDeleteaction.Scope::createTeamFixture()calls the public create API first. A 201 is followed by the same authorizedGET /teams/{id}and returned. Anything else must be403 organization_creation_prohibited, and only then are the rows seeded through the registry. The registry path readspools-cache, which cloud's bootstrap does not define, so it failed withNo adapters providedwhenever CE suites ran in cloud.Coverage
The self-hosted policy is still covered by the fresh-instance run of
TeamsConsoleClientTest::testCreateOrganizationand by the 403 assertions inTeamsBase. The override path cannot be observed from this repository; it is exercised by the cloud E2E matrix (CE suites run inside cloud plusTests\Cloud\E2E\General\UsageTest::testTenantIsolation,ProjectUsageTest,RealtimeOriginTestand others), which fails on1ded023and is run against this branch from appwrite-labs/cloud.Verification
php -lon the changed files,git diff --check.