Repository navigation
Retire namespace resource quotas now that the queue owns the limit - #209
Merged
Merged
Conversation
Concurrency used to be a Kubernetes ResourceQuota per scope: an over-capacity launch failed at provisioning with a 403, which is the failure the admission queue replaces with a counted, ordered wait. Production cut over on 2026-09-05. The quotas were converted into per-scope session limits, the 62 quota objects were deleted from the cluster under a reviewed UID allowlist, and the runtime has not written one since. What is left is a table nobody reads and an admin form that still accepts edits to it — a knob that governs nothing is worse than no knob. So the model, its table, the admin form and the conversion tooling go. This could not have shipped with the queue itself, for two reasons that have since been settled: DB Migrate runs before the pod rollout, so dropping the table while old pods still read it is a window of failed launches; and the rows were the input to the conversion, so legacy_plan could not be deleted before it had run. Both are now behind us. session_admission:remove_legacy_quotas stays. Other deployments still carry real ResourceQuota objects that have to be deleted once, and that task never needed the database model. BREAKING CHANGE: namespace_resource_quotas is dropped. Per-scope CPU and memory ceilings are no longer configurable; per-Pod limits and namespace isolation are unchanged, and concurrency is now the session queue's job. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Signed-off-by: Artem Petrov <[email protected]>
2 tasks done
aixle-com Bot
pushed a commit
that referenced
this pull request
Nov 9, 2026
…meral registration's name (task #209, Fix CR round 1) - RegistrationsController#create: a non-string name reaches Registration.register! as nil again, so an ephemeral request answers 422 ephemeral_not_supported, not 500. - Revert item 7 to the documented pattern: TenantScope.owned(Runner) and TenantScope.owns_runner? hold the ownership rule, Runner.visible_for_project is the picker scope; Runner.of_tenant and #of_tenant? are removed. - Docs: drop the Runner exception, reword the no-IO validation bullet. Signed-off-by: Aixle Flow <[email protected]>
2 tasks done
NOX73
added a commit
that referenced
this pull request
Nov 9, 2026
… (task #209) (#670) * refactor(runners): typed long-poll messages, gateway request schemas, config rules in ConfigSchema, action-only runner policies, one tenant rule (task #209) - Runners::Operations: the runner_env_<id> channel carries typed JSON messages (op_enqueued, poll_waiting); the poll: prefix goes. - Gateway request bodies and the long-poll query are checked against JSON Schemas in runner/protocol/schemas/v1/ through Runners::ProtocolSchema. - ManualAdapter's config rules move to Runners::ConfigSchema as pure functions; Runner's validation calls only ConfigSchema, and only when config or runner_type changes. Runners::Save saves with a plain save. - Runner policies authorize the action only; the controllers' lookup decides which runner a request may touch. RunnerManagement goes; Runners::Form holds the shared form pieces. - Runner.of_tenant / Runner#of_tenant? hold the tenant rule; TenantScope, visible_for_project and RunnerReference#owned_runner call them. TenantScope.owns_runner? goes. Signed-off-by: Aixle Flow <[email protected]> * refactor(runners): keep the tenant rule in TenantScope, guard an ephemeral registration's name (task #209, Fix CR round 1) - RegistrationsController#create: a non-string name reaches Registration.register! as nil again, so an ephemeral request answers 422 ephemeral_not_supported, not 500. - Revert item 7 to the documented pattern: TenantScope.owned(Runner) and TenantScope.owns_runner? hold the ownership rule, Runner.visible_for_project is the picker scope; Runner.of_tenant and #of_tenant? are removed. - Docs: drop the Runner exception, reword the no-IO validation bullet. Signed-off-by: Aixle Flow <[email protected]> --------- Signed-off-by: Aixle Flow <[email protected]> Co-authored-by: Aixle Flow <[email protected]>
aixle-com Bot
pushed a commit
that referenced
this pull request
Nov 10, 2026
Conflicts resolved: - Files touched on staging only by the pre-squash branches of task #209 (PR #669) and task #211 (PRs #667/#668) take develop's version, which carries the reviewed, merged form of the same work (#670, #671, #672). - test/integration/web/company/billing_test.rb: keeps the billing redesign's (#646) test body with develop's 14-day trial values (#678). - CHANGELOG.md: develop's 1.11.0 entry for the 14-day trial; the billing redesign entry already present above is kept once. Signed-off-by: Alex <[email protected]>
aixle-com Bot
pushed a commit
that referenced
this pull request
Nov 10, 2026
…ner?) The develop merge into staging (1176114) took develop's runner_test.rb but kept the stale pre-squash #209 versions of tenant_scope.rb, runner_reference.rb and runner.rb, which had no TenantScope.owns_runner?. Restore develop's versions of the three files. Signed-off-by: Alex <[email protected]>
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
Concurrency used to be a Kubernetes
ResourceQuotaper scope: an over-capacity launch failed at provisioning with a 403, which is exactly the failure the admission queue replaces with a counted, ordered wait.Production cut over on 2026-09-05. The quotas were converted into per-scope session limits, the 62 quota objects were deleted from the cluster under a reviewed UID allowlist, and the runtime has not written one since.
What is left is a table nobody reads and an admin form that still accepts edits to it. A knob that governs nothing is worse than no knob, so the model, its table, the admin form and the conversion tooling go.
Why this is a separate change
Neither half could have shipped with the queue itself:
DB Migrateruns before the pod rollout. Dropping the table while old pods still read it on every session launch is a window of failed launches, not a clean swap. Production is now fully on code that never touches it.legacy_plandivided each namespace quota into a session count, which is how production carried its existing limits into the queue — so the tooling could not be deleted before it had run. It has.What stays
session_admission:remove_legacy_quotas. Other deployments still carry realResourceQuotaobjects that have to be deleted once, against a reviewed{namespace, uid}allowlist, and that task never needed the database model.Namespace isolation, NetworkPolicies and per-Pod CPU/memory limits are untouched. The runtime still bootstraps all of them; the assertion that it no longer writes a quota is now pinned by a test.
Type of change
BREAKING CHANGE:
namespace_resource_quotasis dropped. Per-scope CPU and memory ceilings are no longer configurable per project or user. Concurrency is the session queue's job, and per-Pod limits still bound a single session's footprint.How was this tested?
docker compose exec -T web make check_all— green in full.The runtime's namespace-bootstrap test now asserts
create_resource_quotais never called, so a future change that reintroduces quota creation fails rather than silently double-limiting alongside the queue.Checklist
make check_allpasses locally.