Concurrently register spawn#4014
Conversation
20ffab7 to
ce2fddb
Compare
|
On it! Follow along with my review here: https://buildkite.com/buildkite/buildsworth-review-pull-request/builds/871 |
There was a problem hiding this comment.
I found a few issues that look load-bearing for making registration concurrent: the per-spawn request data is not preserved, and the shared registration client has mutable state that this path now exercises concurrently.
Want to dig deeper? The full session log is attached to this Buildkite build. Download the session file and open a new pi session with it:
Download the buildsworth logs from build 871, then answer my questions about the findings.
4f2feac to
d45b931
Compare
|
@buildsworth-bk review |
|
On it! Follow along with my review here: https://buildkite.com/buildkite/buildsworth-review-pull-request/builds/874 |
Previous concerns have been addressed.
There was a problem hiding this comment.
The previous blocking concerns look addressed: spawn interpolation is back to the 1-based index, the concurrent callback now uses its per-spawn request, and registration response headers are applied to each per-agent client instead of mutating the shared registration client. I left one non-blocking edge case on the new worker-count option; since this changes registration-path concurrency, I’m leaving this as a comment review rather than an AI-only approval.
Want to dig deeper? The full session log is attached to this Buildkite build. Download the session file and open a new pi session with it:
Download the buildsworth logs from build 874, then answer my questions about the findings.
d45b931 to
0fea6e5
Compare
|
@buildsworth-bk review |
|
On it! Follow along with my review here: https://buildkite.com/buildkite/buildsworth-review-pull-request/builds/879 |
There was a problem hiding this comment.
The worker-count edge case from the previous pass looks addressed. I found one small CLI-input edge case in the registration setup; because this changes the agent registration path, I’m leaving this as a comment review rather than an AI-only approval.
Want to dig deeper? The full session log is attached to this Buildkite build. Download the session file and open a new pi session with it:
Download the buildsworth logs from build 879, then answer my questions about the findings.
0fea6e5 to
0874325
Compare
|
@buildsworth-bk review |
0874325 to
4fc761b
Compare
|
On it! Follow along with my review here: https://buildkite.com/buildkite/buildsworth-review-pull-request/builds/881 |
There was a problem hiding this comment.
The previous non-blocking notes around WithWorkerCount(0) and negative --spawn look addressed in the current diff. I didn't find any new inline findings; because this changes the agent registration path and API-client header transfer behavior, I'm leaving this as a comment review rather than an AI-only approval.
Want to dig deeper? The full session log is attached to this Buildkite build. Download the session file and open a new pi session with it:
Download the buildsworth logs from build 881, then answer my questions about the findings.
| outMu.Lock() | ||
| out[work.idx] = o | ||
| outMu.Unlock() |
There was a problem hiding this comment.
Technically those goroutines aren't overlapping, we might not need outMu
There was a problem hiding this comment.
If the element size is not a multiple of the CPU word size, then there may be a data race, because in order to write an element the goroutine has to write into a neighbouring element at the same time.
4fc761b to
e68b587
Compare
e68b587 to
a59df3f
Compare
Description
The workers are already started concurrently, but they weren't registered concurrently - until now!
Context
It annoyed me.
Changes
concurrentlypackage and a genericMapfunction. I'm sure we can reuse this. I'm also sure there are plenty of packages out there that could do this for us but wanted to write it out myself.concurrently.Mapto perform concurrent register calls.Testing
go test ./...). Buildkite employees may check this if the pipeline has run automatically.go tool gofumpt -extra -w .)Disclosures / Credits
I did not use any AI tools to write this code.