Repository navigation
fix: hand flow previews on an agent's tag to a flow worker - #12563
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/review |
|
Claude finished @rubenfiszel's task in 1m 0s —— View job Good to merge
SummaryRemoving the
AGENTS.md compliance
Test coverage
|
Codex ReviewGood to merge No issues found in the queue routing, custom-query callers, or step-tag preservation. No new public surface is introduced. The previous EE revision was unavailable locally, so I could inspect the current agent pull implementation but could not compare the private companion diff. Test coverageThe new SQLx integration test covers preview requeueing, resetting I did not rerun these checks. The reported E2E covers the affected runtime path; no additional manual scenario is needed. |
Pi Reviewcc @rubenfiszel Mergeable, but should ideally address nits: misleading comment in FindingsP2 — // An agent worker cannot drive a flow, so this holds for flow previews on
// the preview tag too: the job keeps its tag in v2_job for its steps.
if job.is_flow() || job.is_dependency() {"Flow previews on the preview tag" doesn't match the case this branch actually rescues. This block only fires when the job is pulled through a caller-supplied query ( Considered and dismissed
Test coverageBackend: the new Manual verification still needed: the agent-side EE companion ( |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying windmill with
|
| Latest commit: |
234a87b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5e70f9aa.windmill.pages.dev |
| Branch Preview URL: | https://fix-agent-flow-preview-reque.windmill.pages.dev |
This commit updates the EE repository reference after PR #1000 was merged in windmill-ee-private. Previous ee-repo-ref: 5b81b24e5fca5933b23a830fef0c5ae6f36de11a New ee-repo-ref: 57c9ae5b1b5c594fcdd9b398052a24006a367117 Automated by sync-ee-ref workflow.
|
🤖 Updated |
Pi ReviewGood to merge The one P2 from my prior pass (the misleading Considered and dismissed
Test coverage
|
Codex ReviewGood to merge No issues found at Test coverageThe SQLx regression test covers preview requeueing, clearing I ran |
Summary
An agent worker cannot drive a flow. When
pullfinds a flow job through a caller's own query (the agent endpoint's), it moves the job onto the genericflowtag, and the job keeps its own tag inv2_jobso its steps still run on the agent. Flow previews were exempt from this when thepreview_tags_overrideinstance setting was on (#8649), so with that setting on, testing a flow on an agent's tag handed the flow preview to the agent, which failed it withCould not handle flow job with agent worker.Regular workers pull with no custom query and never reach this block, so the exemption only ever affected agents (the worker shell pulls on a worker-name tag no preview carries; AI tool claims pull tool jobs, never flow previews).
Changes
pull(windmill-queue/src/jobs.rs): requeue flow previews like any other flow job, override or not.handle_queued_job(windmill-worker/src/worker.rs): the agent-side error, kept as a guard, now says why agents never run flow jobs.fix-agent-flow-preview-requeue): drops the agentpull_jobtodo to requeue flow jobs, whichpullcovers;ee-repo-ref.txtpoints to it.windmill-queue/tests/custom_query_flow_requeue_test.rs: with the override on, a flow preview on an agent tag pulled through a custom query lands onflow, not running, withv2_job.tagkept. Fails without the fix.Test plan
agentx,MODE=agent) on an EE build withagent_worker_server, override on, flow preview taggedagentx:ag-agentgrp-*and failed withCould not handle flow job with agent workerwk-default-*, its step onag-agentgrp-*with tagagentx, both succeededcargo check -p windmill-queue -p windmill-worker(CE) clean; EE build in the dev pane clean🤖 Generated with Claude Code
Summary by cubic
Fixes flow previews failing when tested on an agent's tag: they were handed to the agent worker, which cannot drive flows, and failed with
Could not handle flow job with agent worker.Now flow previews are requeued to the generic
flowtag like any other flow job, so a regular worker picks them up while the preview's steps still run on the agent's tag. The agent-side error message now explains why agents never run flow jobs, and the EE companion drops its now-redundant agentpull_jobrequeue.Written for commit 234a87b. Summary will update on new commits.