From 2076f9fac5231f4bf27c1e4947dfc91198686302 Mon Sep 17 00:00:00 2001 From: hill Date: Thu, 24 Sep 2026 09:51:08 +0200 Subject: [PATCH 1/3] ci: retry the flaky screenshot recording Store Baseline failed on ankiquest, merge/upstream-main and share-client-logic, each time on a different test, always because a test JVM could not load librsdroid: its extracted /tmp copy had been deleted by a retiring fork. Retry the step like the warm-up step already is. --- .github/workflows/screenshot_store.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/screenshot_store.yml b/.github/workflows/screenshot_store.yml index 4b1df8549681..a6dd4440809e 100644 --- a/.github/workflows/screenshot_store.yml +++ b/.github/workflows/screenshot_store.yml @@ -82,9 +82,14 @@ jobs: - name: Record screenshots id: record-test - run: | + # Parallel test forks share one extracted librsdroid .so in /tmp; a retiring fork can delete it + # while another loads it. Retry that race; a real failure fails all attempts. + uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0 + with: + timeout_minutes: 25 + max_attempts: 3 # Use --rerun-tasks to disable cache for test task - ./gradlew recordRoborazziPlayDebug -Pscreenshot --stacktrace --rerun-tasks + command: ./gradlew recordRoborazziPlayDebug -Pscreenshot --stacktrace --rerun-tasks - name: Upload screenshot baseline uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 From 81cc3e9ae09d09b47536f3aa78c1a20c5e371e3a Mon Sep 17 00:00:00 2001 From: hill Date: Thu, 24 Sep 2026 09:51:24 +0200 Subject: [PATCH 2/3] ci: keep the retry's reason in the commit, not the workflow --- .github/workflows/screenshot_store.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/screenshot_store.yml b/.github/workflows/screenshot_store.yml index a6dd4440809e..b1f81323887a 100644 --- a/.github/workflows/screenshot_store.yml +++ b/.github/workflows/screenshot_store.yml @@ -82,8 +82,6 @@ jobs: - name: Record screenshots id: record-test - # Parallel test forks share one extracted librsdroid .so in /tmp; a retiring fork can delete it - # while another loads it. Retry that race; a real failure fails all attempts. uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0 with: timeout_minutes: 25 From 1eef184b9dedfd3c7d0bfd04bea3de66da695b71 Mon Sep 17 00:00:00 2001 From: hill Date: Thu, 24 Sep 2026 10:54:07 +0200 Subject: [PATCH 3/3] Run the AnkiQuest home screenshots at the default SDK AnkiquestHomeScreenshotTest pinned sdk 33 while every other screenshot test runs at targetSdk 36, so screenshot JVMs held two Robolectric sandboxes. The Rust backend binds to one classloader per JVM; whichever sandbox loaded it first won, and tests in the other failed with UnsatisfiedLinkError or a deleted /tmp/librsdroid copy. Store Baseline has failed only since this test was added. The retry is reverted: it would hide the cause. --- .github/workflows/screenshot_store.yml | 7 ++----- .../ichi2/anki/ankiquest/AnkiquestHomeScreenshotTest.kt | 2 -- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/screenshot_store.yml b/.github/workflows/screenshot_store.yml index b1f81323887a..4b1df8549681 100644 --- a/.github/workflows/screenshot_store.yml +++ b/.github/workflows/screenshot_store.yml @@ -82,12 +82,9 @@ jobs: - name: Record screenshots id: record-test - uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0 - with: - timeout_minutes: 25 - max_attempts: 3 + run: | # Use --rerun-tasks to disable cache for test task - command: ./gradlew recordRoborazziPlayDebug -Pscreenshot --stacktrace --rerun-tasks + ./gradlew recordRoborazziPlayDebug -Pscreenshot --stacktrace --rerun-tasks - name: Upload screenshot baseline uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 diff --git a/AnkiDroid/src/test/java/com/ichi2/anki/ankiquest/AnkiquestHomeScreenshotTest.kt b/AnkiDroid/src/test/java/com/ichi2/anki/ankiquest/AnkiquestHomeScreenshotTest.kt index 475964ab42fc..7696db459ceb 100644 --- a/AnkiDroid/src/test/java/com/ichi2/anki/ankiquest/AnkiquestHomeScreenshotTest.kt +++ b/AnkiDroid/src/test/java/com/ichi2/anki/ankiquest/AnkiquestHomeScreenshotTest.kt @@ -13,10 +13,8 @@ import org.junit.After import org.junit.Before import org.junit.Test import org.robolectric.RuntimeEnvironment -import org.robolectric.annotation.Config /** Opt-in visual QA; the normal unit-test task excludes ScreenshotTestCategory. */ -@Config(sdk = [33]) class AnkiquestHomeScreenshotTest : ScreenshotTest() { override fun applyDeviceConfig() { super.applyDeviceConfig()