Skip to content

Fix flaky "tests-apple" CI job in modeladmin test suite - #11717

Merged
mudler merged 2 commits into
masterfrom
copilot/fix-tests-apple-job-failure
Aug 26, 2026
Merged

Fix flaky "tests-apple" CI job in modeladmin test suite#11717
mudler merged 2 commits into
masterfrom
copilot/fix-tests-apple-job-failure

Conversation

Copilot AI commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

The tests-apple (1.26.x) job was failing on the ConfigService PatchConfig spec "serializes lifecycle publication across local service instances" with Timed out after 1.005s.

Root cause

  • The spec spawns a goroutine and waits with Eventually(lifecycle.entered).Should(Receive()) for it to reach a blocking lifecycle call, relying on Gomega's default 1s Eventually timeout.
  • On slower/loaded macOS CI runners, goroutine scheduling can exceed 1s, causing a spurious timeout unrelated to actual test logic.
  • Several other specs in this suite coordinate goroutines the same way via the blockingRevisionLifecycle test helper, so they're all susceptible to the same flake.

Fix

  • Raise the suite-wide default Gomega Eventually timeout to 5s in core/services/modeladmin/modeladmin_suite_test.go, giving goroutine-coordination specs enough headroom on slower runners without altering test semantics or production code.
func TestModelAdmin(t *testing.T) {
	RegisterFailHandler(Fail)
	SetDefaultEventuallyTimeout(5 * time.Second)
	RunSpecs(t, "modeladmin test suite")
}

…laky macOS CI

Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix the failing GitHub Actions job tests-apple (1.26.x) Fix flaky "tests-apple" CI job in modeladmin test suite Aug 25, 2026
Copilot AI requested a review from mudler August 25, 2026 11:01
@localai-org-maint-bot

Copy link
Copy Markdown
Collaborator

@mudler, this looks good to merge once the draft is ready. The 5s suite default directly covers the repeated goroutine-coordination waits without changing production behavior; go test ./core/services/modeladmin and git diff --check pass locally.

@mudler
mudler marked this pull request as ready for review August 26, 2026 06:58
@mudler
mudler merged commit e7b83ef into master Aug 26, 2026
70 checks passed
@mudler
mudler deleted the copilot/fix-tests-apple-job-failure branch August 26, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants