From cc51abd1fa9abae9f0536a544f942e559acb0e33 Mon Sep 17 00:00:00 2001 From: Thomas SharedInbox Date: Fri, 22 May 2026 15:37:12 +0200 Subject: [PATCH] fix: reduce CI noise from apt-get, sdkmanager, stunnel, and Gradle (#140) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add -qq to apt-get update/install in Dagger toolchain to suppress verbose package-list output (hundreds of lines on cold cache) - Wrap sdkmanager in silent-on-success pattern — only shows output on failure, like the build_runner and flutter pub get steps - Set debug = warning in stunnel config to suppress LOG5 (info/notice) startup lines while keeping LOG4 (warning) and above - Add org.gradle.welcome=never to android/gradle.properties to suppress the "Welcome to Gradle N.NN!" banner - Filter SKIPPED Gradle tasks, Gradle Daemon startup messages, and gcloud support-page promo lines in run_firebase_test.sh Errors and warnings are preserved in all cases. Co-Authored-By: Claude Sonnet 4.6 --- android/gradle.properties | 1 + ci/main.go | 8 +++++--- scripts/run_firebase_test.sh | 5 ++++- scripts/setup_dagger_remote.sh | 1 + 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/android/gradle.properties b/android/gradle.properties index fbee1d8..dbd3ffb 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,2 +1,3 @@ org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true +org.gradle.welcome=never diff --git a/ci/main.go b/ci/main.go index e0ec50c..1ca7cd8 100644 --- a/ci/main.go +++ b/ci/main.go @@ -182,8 +182,8 @@ func New( func (m *Ci) toolchain() *dagger.Container { return dag.Container(). From("ghcr.io/cirruslabs/flutter:3.41.6"). - WithExec([]string{"apt-get", "update"}). - WithExec([]string{"apt-get", "install", "-y", "clang", "cmake", "ninja-build", "pkg-config", "libgtk-3-dev", "liblzma-dev", "libsecret-1-dev", "libgcrypt20-dev", "libjsoncpp-dev", "sqlite3", "iproute2", "netcat-openbsd", "xvfb", "libosmesa6", "libegl1", "lld"}). + WithExec([]string{"apt-get", "-qq", "update"}). + WithExec([]string{"apt-get", "install", "-y", "-qq", "clang", "cmake", "ninja-build", "pkg-config", "libgtk-3-dev", "liblzma-dev", "libsecret-1-dev", "libgcrypt20-dev", "libjsoncpp-dev", "sqlite3", "iproute2", "netcat-openbsd", "xvfb", "libosmesa6", "libegl1", "lld"}). WithExec([]string{"useradd", "-m", "-s", "/bin/bash", "ci"}). WithExec([]string{"/bin/sh", "-c", `flutter_dir=$(dirname $(dirname $(which flutter))); ` + @@ -193,7 +193,9 @@ func (m *Ci) toolchain() *dagger.Container { WithEnvVariable("PUB_CACHE", "/home/ci/.pub-cache"). WithEnvVariable("HOME", "/home/ci"). WithUser("ci"). - WithExec([]string{"/bin/sh", "-c", `yes | sdkmanager "ndk;28.2.13676358" "cmake;3.22.1" "build-tools;35.0.0" "platforms;android-34"`}) + WithExec([]string{"/bin/sh", "-c", + `tmp=$(mktemp); trap 'rm -f "$tmp"' EXIT; ` + + `yes | sdkmanager "ndk;28.2.13676358" "cmake;3.22.1" "build-tools;35.0.0" "platforms;android-34" >"$tmp" 2>&1 || { cat "$tmp"; exit 1; }`}) } // Base is the Flutter toolchain container with mutable cache mounts attached. diff --git a/scripts/run_firebase_test.sh b/scripts/run_firebase_test.sh index b25d21b..abf8a71 100755 --- a/scripts/run_firebase_test.sh +++ b/scripts/run_firebase_test.sh @@ -13,7 +13,7 @@ _strip_ansi() { _filter_noise() { grep -vE \ - '> Task :.+(UP-TO-DATE|NO-SOURCE)'\ + '> Task :.+(UP-TO-DATE|NO-SOURCE|SKIPPED)'\ '|[0-9]+ files found for path '\''lib/'\ '|^Inputs:'\ '|^[[:space:]]+-[[:space:]]/'\ @@ -24,6 +24,9 @@ _filter_noise() { '|[0-9]+ actionable tasks'\ '|^warning: \[options\]'\ '|^Note: Some input files'\ +'|Starting a Gradle Daemon'\ +'|Have questions, feedback, or issues'\ +'|https://firebase\.google\.com/support'\ '|^\s*[┆│]\s*$' \ || true } diff --git a/scripts/setup_dagger_remote.sh b/scripts/setup_dagger_remote.sh index c026c9c..86706d4 100755 --- a/scripts/setup_dagger_remote.sh +++ b/scripts/setup_dagger_remote.sh @@ -34,6 +34,7 @@ cat << EOF > "$STUNNEL_CONF" client = yes foreground = yes pid = /tmp/stunnel.pid +debug = warning ; TCP keepalive on the remote side to prevent NAT/firewall from resetting the connection socket = r:SO_KEEPALIVE=1 socket = r:TCP_KEEPIDLE=10