Repository navigation
[INFRA-880] feat(kustomize): add a Pi agent-run worker - #56
Open
Saurabhkmr98 wants to merge 1 commit into
Open
Saurabhkmr98 wants to merge 1 commit into
Saurabhkmr98 wants to merge 1 commit into
Conversation
Pi's native agent runs move to their own Celery queue, `plane_pi_agent_queue`, so an interactive run never waits behind a multi-hour vectorization task on the shared queue. This adds the worker that drains it. The pi-service component gains `agent-worker.yaml` (plane-pi-agent-worker-wl), and worker.yaml is narrowed to plane_pi_queue since the two now run side by side. Also fixes the otel pi-worker patch, which used `add /spec/template/spec/containers/0/env` with a whole array. JSON Patch `add` replaces an existing path, so it would have silently dropped the CELERY_QUEUE this change puts in the base. It now appends via `/env/-`. Ten sibling patches share the shape but have no env in their base, so they are currently harmless and are left alone. Requires makeplane/plane-ee#9440, which adds the queue and routes the task. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
Saurabhkmr98
marked this pull request as ready for review
September 8, 2026 12:08
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.
What
Adds a dedicated Celery worker for Pi's native agent runs to the
pi-servicecomponent, and fixes an otel patch that would have silently broken it.kustomize/components/pi-service/agent-worker.yaml—plane-pi-agent-worker-wl, cloned fromworker.yamlwithCELERY_QUEUE=plane_pi_agent_queue,CELERY_CONCURRENCY=4,CELERY_MAX_TASKS_PER_CHILD=100. Registered in the component'sresources.worker.yamlnarrowed toCELERY_QUEUE=plane_pi_queue, since the two now run side by side.components/otel-observability/patches/append-otel-pi-agent-worker.json, registered against the new deployment.patches/append-otel-pi-worker.jsonused"op": "add", "path": "/spec/template/spec/containers/0/env"with a whole array value. JSON Patchaddreplaces an existing path, so with otel enabled it would have discarded theCELERY_QUEUEthis change puts in the base and sent the general worker back to draining both queues. Now appends a single entry via/env/-:kustomize/README.md: pi-service now lists 4 deployments, plus a queue table.Why
Pi had one queue,
plane_pi_queue, consumed by one worker. Native agent runs shared it withvectorize_workspaceand friends, which run for minutes to hours. With Celery'sworker_prefetch_multiplier=1, two of those occupy the whole worker while an agent run — the interactive path, with a person watching the run's activities appear — waits behind them.makeplane/plane-ee#9440moves agent runs ontoplane_pi_agent_queue. This is the manifest side: the worker that drains it.Scope / behavior
This does change behavior for anyone running the
pi-servicecomponent — unlike the Helm PRs, where the agent worker is behind a flag. Kustomize components have no conditional logic, so enablingpi-servicenow gets you the isolated two-worker topology: one extra Deployment, and the existingplane-pi-worker-wlrestricted toplane_pi_queue. That is the intended end state for a commercial Kubernetes deployment, and it matches what enablingpi_agent_workerdoes in the charts.The agent worker is an addition, never a replacement.
plane-pi-worker-wlstill drainsplane_pi_queue— vector sync, docs sync, plan sync, search indexing, memory.extract_chat_memory, which an agent run dispatches on completion, deliberately stays there so a saturated agent worker cannot also stall memory extraction. RemovingCELERY_QUEUEfrom a worker makes it consume both queues again.Intentionally not affected:
plane-pi-api-wl,plane-pi-beat-wl, the migrator, and every non-Pi component. The ten other otel patches that share the replace-the-array shape are left alone — none of their base deployments defineenv, so they are currently harmless.Testing
Built with
kubectl kustomize(kustomize v5.0.4) againstoverlays/default, withpi-serviceenabled and the requiredPI_*vars supplied.pi-service+otel-observability— the case the patch fix covers:CELERY_QUEUEsurvives andOTEL_SERVICE_NAMEis appended — before the fix, the general worker'sCELERY_QUEUEwould have been gone.pi-serviceonly, otel off:Note: the committed overlays can't be built as-is — they require an operator-supplied
vars.yaml/secrets-vars.yamlthat are gitignored. Testing used a scratch copy seeded from the.examplefiles. This is pre-existing, not a regression.Upgrade notes
Requires an image containing
makeplane/plane-ee#9440. Applying this against an older image would narrowplane-pi-worker-wlto a queue that still carries everything (fine) while the agent worker idles on a queue nothing publishes to — agent runs would stall. Roll the image first, or apply both together.Related
makeplane/plane-ee#9440— adds the queue, the route, and the worker entrypoint defaultmakeplane/helm-charts-private#711—plane-cloudandplane-pichartsmakeplane/helm-charts#313—plane-enterprisechart🤖 Generated with Claude Code