Repository navigation
ci: Do not run the agentop tui tests on the macOS runner - #2116
Conversation
The macOS job has a 10-minute limit. It now takes 6-8 minutes on main and 9-10 minutes on PRs, so a slow runner cancels it (rossoctl#2061). The cmd/agentop/tui tests took 293 s of that time with -race. The tui package has no macOS-specific code, and the Linux agentop job runs it with -race on every PR. This is the same rule that the job already uses for tlsbridge. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Hai Huang <[email protected]>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
clawgenti
left a comment
There was a problem hiding this comment.
Summary
The change is correct and does what it says. cmd/agentop is its own module (github.com/rossoctl/cortex/cmd/agentop), so the grep -v '/cmd/agentop/tui' filter drops tui, tui/find and tui/table and nothing else. None of the three has a _darwin file, a build tag or a runtime.GOOS check. All the AGENTOP_LAUNCHD_TESTS tests are in the root package, which still runs. The Linux Go CI (authbridge agentop) leg still runs go test -v -race ./... over the whole module, so no coverage is lost.
The saving is real but smaller than the description expects. On this head, Go CI (core peerproc, macOS) passed in 8m29s, and the agentop step took 249 s. On the last successful main runs today, that step took 345-403 s and the job took 586-594 s. That is about 100-150 s saved, not the ~290 s that tui took on its own, and the job is not near the expected ~5 minutes. The likely cause is that go test already ran tui in parallel with the other packages, so removing it only saves the part that was not overlapped. The root package is probably the critical path now. This run's cmd/cortex step was also slow (135 s against 27-54 s on main), so the headroom is real but thin. Details are inline. None of this blocks the PR.
Author: huang195 (MEMBER — maintainer)
Areas reviewed: CI / GitHub Actions
Agent/IDE config (.claude/.vscode): none
Commits: 1 commit, all signed-off: yes
CI status: the one affected job (Go CI (core peerproc, macOS)) passed. Its only annotation is GitHub's macOS queue notice. 33 checks pass. Several unrelated Linux jobs were still queued when I posted.
| # session to load a launch agent into, and GitHub's macOS runners have one: they | ||
| # log the runner user in automatically at boot. | ||
| # Not tui/...: it has no macOS-specific code, the Linux agentop job runs it with | ||
| # -race, and here it took about 5 of this job's 10 minutes. |
There was a problem hiding this comment.
suggestion: "about 5 of this job's 10 minutes" adds up tui's serial test time, but go test runs packages in parallel, so it is not the wall time you get back. On this PR's run the step went from ~350-400 s (recent main) to 249 s, about 2 minutes saved. Consider wording it as the measured saving, or just "it was the slowest package", so nobody later expects this step to drop by 5 minutes. If the job creeps toward 10 minutes again, the root package (launchd tests) is the next thing to look at.
| run: | | ||
| go build ./... | ||
| go test -race ./... | ||
| go test -race $(go list ./... | grep -v '/cmd/agentop/tui') |
There was a problem hiding this comment.
nit: Actions runs this with bash -e and no pipefail, and a failing command substitution does not fail the command around it. So if go list ever errors, this becomes a plain go test -race, which tests only the root package and still goes green. go build ./... on the line above makes that unlikely, but you could make it loud:
pkgs=$(go list ./...)
go test -race $(grep -v '/cmd/agentop/tui' <<<"${pkgs}")This merge adds rossoctl#2116 to the branch. Without it, the macOS CI job runs the cmd/agentop/tui tests and goes past its 10-minute limit. Conflict in core/accounting/ping.go: this branch adds h.observe for the metrics sink, and main adds h.notifyPing for the ping listeners. The merge keeps both calls. They send the ping to different receivers. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Hai Huang <[email protected]>
This merge adds rossoctl#2116 to the branch. Without it, the macOS CI job runs the cmd/agentop/tui tests and goes past its 10-minute limit. Conflict in cmd/cortex/main.go: this branch adds the reqstats recorder, and main adds the ping listener that gives keep-alive spend to the session. The merge keeps both. They are independent. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Hai Huang <[email protected]>
Problem
The
Go CI (core peerproc, macOS)job has a 10-minute limit. It took 3-5 minutes onmainon Nov 10-12. Now it takes 6-8 minutes onmainand 9-10 minutes on PRs. When a runner is slow, GitHub cancels the job. This occurred on #2061: the job stopped at 10 minutes while thecmd/agentop/tuitests were still running.In a passing run, the agentop step took 357 s. Most of that time was
cmd/agentop/tui, which took 293 s with-race.Change
The macOS job does not run
cmd/agentop/tui/...now. It continues to run all the other agentop packages, including the root package with the launchd tests.tuipackage has no macOS-specific code: no_darwin.gofile, noruntime.GOOScheck and no build tag.Go CI (authbridge agentop)runstuiwith-raceon every PR. Thus no test coverage is lost.tlsbridge: it runs only the macOS-specific tests there.On this PR the job took 8.5 minutes, not 10: the agentop step took 249 s, not 357 s. The root
cmd/agentoppackage (182 s) is now the slowest part.Not changed
timeout-minutesstays at 10. A higher limit would only hide the growth.Assisted-By: Claude (Anthropic AI) [email protected]
Summary by CodeRabbit