This is an automated email from the ASF dual-hosted git repository.

maciej pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iggy.git


The following commit(s) were added to refs/heads/master by this push:
     new a1045c3a3 fix(ci): prevent flaky keyring tests by keeping daemons 
alive (#2963)
a1045c3a3 is described below

commit a1045c3a3e64f25ca7d5c8dffbbcbf06ec3d38d7
Author: Hubert Gruszecki <[email protected]>
AuthorDate: Tue Mar 17 19:35:42 2026 +0100

    fix(ci): prevent flaky keyring tests by keeping daemons alive (#2963)
    
    D-Bus and gnome-keyring-daemon were initialized in a
    separate CI step from test execution. The daemons could
    die between steps, causing IsLocked errors ~10-20%.
    Move initialization into the test shell itself.
---
 .github/actions/rust/pre-merge/action.yml | 13 +++++++++----
 .github/workflows/post-merge.yml          | 11 +++++++----
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/.github/actions/rust/pre-merge/action.yml 
b/.github/actions/rust/pre-merge/action.yml
index 11c59f6b8..1f544183e 100644
--- a/.github/actions/rust/pre-merge/action.yml
+++ b/.github/actions/rust/pre-merge/action.yml
@@ -96,10 +96,6 @@ runs:
       run: |
         sudo apt-get update --yes && sudo apt-get install --yes musl-tools 
gnome-keyring keyutils dbus-x11 libsecret-tools
         rm -f $HOME/.local/share/keyrings/*
-        eval $(dbus-launch --sh-syntax)
-        echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" >> 
$GITHUB_ENV
-        eval $(echo -n "test" | gnome-keyring-daemon --unlock 
--components=secrets)
-        echo -n "warmup" | secret-tool store --label="ci-warmup" ci-test warmup
       shell: bash
 
     - name: Install cargo-llvm-cov
@@ -111,6 +107,15 @@ runs:
     - name: Build and test with coverage
       if: inputs.task == 'test'
       run: |
+        # Start D-Bus and unlock keyring in the same shell that runs tests,
+        # so daemons are guaranteed alive for the entire test execution.
+        if [[ "$RUNNER_OS" == "Linux" ]]; then
+          eval $(dbus-launch --sh-syntax)
+          export DBUS_SESSION_BUS_ADDRESS
+          eval $(echo -n "test" | gnome-keyring-daemon --unlock 
--components=secrets)
+          echo -n "warmup" | secret-tool store --label="ci-warmup" ci-test 
warmup
+        fi
+
         source <(cargo llvm-cov show-env --export-prefix)
 
         bins_start=$(date +%s)
diff --git a/.github/workflows/post-merge.yml b/.github/workflows/post-merge.yml
index 6574cd06f..12b1074a6 100644
--- a/.github/workflows/post-merge.yml
+++ b/.github/workflows/post-merge.yml
@@ -190,10 +190,6 @@ jobs:
           sudo apt-get update --yes
           sudo apt-get install --yes gnome-keyring keyutils dbus-x11 
libsecret-tools
           rm -f $HOME/.local/share/keyrings/*
-          eval $(dbus-launch --sh-syntax)
-          echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" >> 
$GITHUB_ENV
-          eval $(echo -n "test" | gnome-keyring-daemon --unlock 
--components=secrets)
-          echo -n "warmup" | secret-tool store --label="ci-warmup" ci-test 
warmup
 
       - name: Setup Rust with cache
         uses: ./.github/actions/utils/setup-rust-with-cache
@@ -207,6 +203,13 @@ jobs:
 
       - name: Build and test with coverage
         run: |
+          # Start D-Bus and unlock keyring in the same shell that runs tests,
+          # so daemons are guaranteed alive for the entire test execution.
+          eval $(dbus-launch --sh-syntax)
+          export DBUS_SESSION_BUS_ADDRESS
+          eval $(echo -n "test" | gnome-keyring-daemon --unlock 
--components=secrets)
+          echo -n "warmup" | secret-tool store --label="ci-warmup" ci-test 
warmup
+
           source <(cargo llvm-cov show-env --export-prefix)
           cargo build --locked
           cargo test --locked --no-run

Reply via email to