Repository navigation
docs: add missing options to the Agent Relay configuration reference - #31986
Conversation
24a292a to
648ca10
Compare
BobbyHo
left a comment
There was a problem hiding this comment.
LGTM! just left a minor comment
| Each pool maps to one template. | ||
| Use separate pools when repositories need different templates or credentials. | ||
|
|
||
| To give one repository a template of its own, such as an image that has the repository cloned and its toolchain installed, set [`repo_url`](./configuration.md#cursor-pool-fields) on a pool for that repository. |
There was a problem hiding this comment.
Just wondering, does the worker need to start in the cloned repo? The module doesn't pass --worker-dir, so it defaults to the agent's directory (usually home), which may be outside the repo.
There was a problem hiding this comment.
Yes, good catch. The worker runs sessions in the directory it starts in, and Cursor derives a repo-backed worker's repo label from that directory's Git remote. The module's start.sh.tftpl runs agent worker with no --worker-dir, so without a change the worker would start in the agent's directory.
Fixed in afbafed:
cursor.mdSource control now says to start the worker in the clone for a repo-backed pool, with acoder_agentdirexample. Theexample/templates/cursortemplate in agent-relay v0.16.0 does the same thing. The alternative isadditional_args = ["--worker-dir", "<clone>"], which the module'sadditional_argsvalidation allows.- The
repo_urlrow inconfiguration.mdnow ends with "and start the worker in the clone".
Generated by Coder Agents on behalf of @nickvigilante.
Agent Relay v0.15.0 made the reaper's 15-minute startup window configurable ([agent-relay#152](coder/agent-relay#152)) and added a reap delay ([agent-relay#134](coder/agent-relay#134)). - `configuration.md`: add `--reap-startup-grace` (Helm `reapStartupGrace`) and `--reap-delay`, plus the per-pool `reap_delay` field, under an intro that says how the two options differ. The Cursor `dispatch_deadline: 0` row now points at the startup grace. - `setup.md`: fix the script-ordering note and **Workspace lifecycle**, which hardcoded 15 minutes and said failed builds are deleted "on the next sweep". **Workspace lifecycle** now states the 30-second gap between sweeps, and **Choose cleanup settings** maps each goal to its setting. - `cursor.md`: fix the **Build deadline** bullet and the `pending` lifecycle row. - `troubleshooting.md`: the "session ended but its workspace remains" row mentions the reap delay. - `monitoring/index.md`: add the `delayed` verdict to `agent_relay_reaper_verdicts_total` and define it as a wait before `delete` or `failed`. Verification notes: - The chart has **no `reapDelay` value** at v0.15.0 (only `reapStartupGrace`; checked `values.yaml` and `templates/_helpers.tpl`), so the docs say to set `CODER_AGENT_RELAY_REAP_DELAY` through `extraEnv`. - Pending or starting builds wait `max(grace, dispatch_deadline)`. A finished build whose runner reports `pending` or nothing fails after the grace alone (`workspacereaper/lifecycle.go`). - The reap delay counts from the latest build's `Job.CompletedAt`, not from the worker's exit, so a session that ran longer than the delay gets no extra time (`reapDeadline` in `workspacereaper/reaper.go`). - `delayed` is only a metric label. A sweep records it when the verdict is `delete` or `failed` but the delay hasn't passed. The `Verdict` type has only `keep`, `delete`, `failed`, and `stuck`. - The reaper sleeps 30 seconds after it sweeps every pool, rather than running on a fixed ticker (`sweepLoop` in `servicereaper/reaper.go`). Stack 2/6. Review and merge in order: - #31834 (merged) - #31984 - #31985 - #31986 - #31987 - #32094 Refs DOCS-1171 > Generated by Coder Agents. --------- Co-authored-by: coder[bot] <137810501+coder[bot]@users.noreply.github.com> Co-authored-by: Bobby Ho <bobby@coder.com>
Updates `monitoring/siem.md` to the log messages Agent Relay v0.15.0 writes. | Old `msg` | v0.15.0 `msg` | |---|---| | `workspace ready, runner handoff` | `workspace built, runner handoff` ([agent-relay#154](coder/agent-relay#154)) | | `workspace build passed the session deadline, reporting retryable and deleting` | `workspace build passed the session deadline, reporting failure` (also lists `workspace build succeeded after the session deadline`) | | `workspace build failed, reporting retryable and deleting` | `workspace build failed` | | `delete workspace failed, leaving for reconciliation` | `delete workspace failed, leaving it for the reaper` | The PR also adds the `agent_lifecycle` field, which appears on the handoff record and on reaper records. Verification notes: - Every other quoted `msg` in `siem.md` was checked by grepping `internal/` at `9b96578` and still matches. - `leaving for reconciliation` doesn't exist at v0.15.0. Its replacement comes from `Dispatcher.deleteWorkspace`. Stack 3/6. Review and merge in order: - #31834 (merged) - #31984 - #31985 - #31986 - #31987 - #32094 Refs DOCS-1171 > Generated by Coder Agents. Co-authored-by: coder[bot] <137810501+coder[bot]@users.noreply.github.com>
|
I have read the CLA Document and I hereby sign the CLA 1 out of 2 committers have signed the CLA. |
648ca10 to
b28b954
Compare
Document the status page, TLS, and parameter credential transport options, the Cursor repo_url pool field, and the statusUI and tls Helm values, and update the source note to Agent Relay v0.15.0.
…t Relay config reference Replace the Helm values table with a commented YAML example.
…rom Agent Relay docs Review feedback on #31837 asked how repo-scoped Cursor pools differ from pools without a repository and why someone would set repo_url. Cursor decides that routing, so link Cursor's any-repo pools section instead of restating it, and add a two-pool example to Source control. The repo_url row now says the template clones the repository, matching the module README, rather than requiring it in the image. Remove the HTML comment at the top of the configuration reference. It named a private repository, internal paths, and a Linear issue, none of which belong in published docs. Refs DOCS-1171
afbafed to
6203aee
Compare
Brings
configuration.mdcloser to Agent Relay v0.15.0 and answers review questions about repo-scoped Cursor pools.repo_urlpool field. The row says the template clones the repository before the worker starts, and links to Source control incursor.md.cursor.mdSource control: when to setrepo_url, a two-pool example, and a link to Cursor's any-repo pools docs for routing, which Cursor decides.configuration.md, which named the private repository, internal paths, and a Linear issue.Per review, this PR no longer documents the status page, its TLS options, or
--dangerous-allow-parameter-credential-transport.Verification notes:
repo_url: agent-relayinternal/services/servicecursorworkers/cursorworkers.go(repoOwnerName,RegisterPool) anddispatch.go(buildParameters), plus theagent-relay-cursormodule README, which says the template must cloneagent_relay_cursor_repo_url.helm/coder-agent-relay/values.yaml.reapStartupGraceis covered in 2/5.reapDelayhas no Helm value (see 2/5).Stack 4/6. Review and merge in order:
Refs DOCS-1171