fix(agent): apply agent settings as they are when jobs are handed out
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / test (pull_request) Successful in 8m51s
ci / lint (pull_request) Successful in 10m46s
ci / build (pull_request) Successful in 10m26s
ci / image (pull_request) Successful in 5m8s
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / test (pull_request) Successful in 8m51s
ci / lint (pull_request) Successful in 10m46s
ci / build (pull_request) Successful in 10m26s
ci / image (pull_request) Successful in 5m8s
The jobs endpoint read the agent, and with it allow_private, before its long poll of up to 20 seconds, so jobs handed out afterwards could carry a setting changed in the meantime and the change only applied a poll later. It now reads the agent again when the poll returns jobs. TestCheckerNetwork also waits for two runs at most: the next run after a monitor's first one is on its phase now, up to one and a half intervals later. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
9d1d6a2544
commit
4246e37384
2 files changed
+22
-2
No files matched your search
@@ -85,7 +85,9 @@ func TestCheckerNetwork(t *testing.T) {
|
||||
}
|
||||
waitResult := func(id string, ok bool, what string) {
|
||||
t.Helper()
|
||||
waitFor(t, 20*time.Second, what, func() bool {
|
||||
// Two runs at most: the one already handed out, then the next on
|
||||
// the monitor's phase, up to one and a half intervals later.
|
||||
waitFor(t, 30*time.Second, what, func() bool {
|
||||
got, msg, seen := latestOf(owner, id)
|
||||
return seen && got == ok && (ok || strings.Contains(msg, "non-public"))
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user