From 31b57cd2af8141741ffe9126a584203ceb83ff57 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Tue, 19 May 2026 21:16:04 -0700 Subject: [PATCH] debug(go-cache): add debug logs and diagnostics --- .gitea/actions/go-cache/action.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitea/actions/go-cache/action.yml b/.gitea/actions/go-cache/action.yml index b4ebfb0..9bf88c3 100644 --- a/.gitea/actions/go-cache/action.yml +++ b/.gitea/actions/go-cache/action.yml @@ -61,8 +61,8 @@ runs: CACHE_DIR=$(eval echo "${{ inputs.cache-dir }}") mkdir -p "$CACHE_DIR" - # Build GOCACHEPROG command - CMD="$HOME/go/bin/go-cache-plugin --cache-dir=$CACHE_DIR --bucket=${{ inputs.s3-bucket }} --region=${{ inputs.s3-region }}" + # Build GOCACHEPROG command with verbose debug logging and metrics + CMD="$HOME/go/bin/go-cache-plugin -v --metrics --debug=1 --cache-dir=$CACHE_DIR --bucket=${{ inputs.s3-bucket }} --region=${{ inputs.s3-region }}" if [ -n "${{ inputs.s3-endpoint }}" ]; then CMD="$CMD --s3-endpoint-url=${{ inputs.s3-endpoint }}" @@ -78,6 +78,11 @@ runs: # Ensure GOEXPERIMENT=cacheprog is enabled for Go 1.21-1.23 compatibility echo "GOEXPERIMENT=cacheprog" >> "$GITHUB_ENV" + # Diagnose secret population + echo "Diagnosing secrets..." + echo "SCCACHE_AWS_ACCESS_KEY_ID length: ${#SCCACHE_AWS_ACCESS_KEY_ID}" + echo "SCCACHE_AWS_SECRET_ACCESS_KEY length: ${#SCCACHE_AWS_SECRET_ACCESS_KEY}" + # Align with actions-rust: map SCCACHE secrets to standard AWS variables if [ -n "$SCCACHE_AWS_ACCESS_KEY_ID" ] && [ -z "${AWS_ACCESS_KEY_ID:-}" ]; then echo "AWS_ACCESS_KEY_ID=$SCCACHE_AWS_ACCESS_KEY_ID" >> "$GITHUB_ENV"