Discover the agent address from BLACKSMITH_AGENT_ADDR - #38
Conversation
c41a53b to
9e66025
Compare
65bb662 to
0810c59
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0810c59. Configure here.
| const GRPC_PORT = process.env.BLACKSMITH_STICKY_DISK_GRPC_PORT || '5557' | ||
| // Without a deadline, a black-holed dial stalls the checkout until the OS | ||
| // gives up on the TCP handshake. | ||
| const AGENT_RPC_TIMEOUT_MS = 45000 |
There was a problem hiding this comment.
this feels excessively large, but useblacksmith/checkout is the legacy approach so not strongly opinionated
There was a problem hiding this comment.
We discussed this and decided to keep 45s. Context: this deadline covers more than the dial; the same AbortController bounds up() plus the getStickyDisk RPC, and agent-side that RPC synchronously does the Ceph expose (bounded at 60s in the agent) and the rbd-nbd map (another 60s), so a legitimately slow mount can run tens of seconds under Ceph load. 45s also matches the long-standing stickyDiskTimeoutMs=45000 in the stickydisk, setup-docker-builder, and setup-bazel actions, so all actions hitting this RPC share one number. Before this PR checkout had no deadline at all here (a wedged agent stalled checkout until the step timeout), so this is a strict improvement either way. On timeout the action falls back to a plain clone, so the worst case is one cache-less checkout.
There was a problem hiding this comment.
This actually matches the timeout for other sticky disk actions - the 45s includes exposing and mounting the sticky disk, not just reachability. I considered splitting this into two deadlines, but I don't expect dialing to be slow.
… to standard checkout when unavailable Co-authored-by: Codesmith Staging <codesmith-bot@users.noreply.github.com>
ab56bde to
cd21553
Compare

Discovers the Blacksmith agent (git-mirror gRPC and internal metrics endpoints) through the
BLACKSMITH_AGENT_ADDRenv var the agent advertises on every platform (FastActions/fa#4816); the action contains no hardcoded agent IPs, and agent problems never fail the job:shouldUseBlacksmithCache()requiresBLACKSMITH_AGENT_ADDRin addition toBLACKSMITH_VM_ID, so runners without agent services use upstream actions/checkout behavior with a single info line and zero agent dials.setupCache()RPCs (up,getStickyDisk) are bounded by a 45sAbortController.Unimplementedon platforms without the service, refused or timed-out dials, anything else) warns and falls back to a standard checkout.Requires the agent change (FastActions/fa#4816) to be rolled out fleet-wide before this is released.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is enabled. (Staging)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.