From 1ea57b0a179ea6e6ae0eaf5010917267b1b6d5ce Mon Sep 17 00:00:00 2001 From: Omar Abdelwahab Date: Wed, 12 Nov 2025 15:16:34 -0800 Subject: [PATCH] Fix CI: Clear Python bytecode cache before reinstall The real issue was stale .pyc bytecode files in __pycache__ directories. These cached files contained the old method signatures without the authorization parameter, causing signature mismatch errors even though the source .py files were correct. Now clearing all __pycache__ directories and .pyc files before the force-reinstall to ensure Python loads fresh bytecode from the updated source files. --- .github/actions/setup-runner/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/setup-runner/action.yml b/.github/actions/setup-runner/action.yml index 932320f1c..40cecc588 100644 --- a/.github/actions/setup-runner/action.yml +++ b/.github/actions/setup-runner/action.yml @@ -37,6 +37,10 @@ runs: echo "Exported UV environment variables for current and subsequent steps" fi + echo "Clearing Python bytecode cache to avoid stale .pyc files" + find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true + find . -name "*.pyc" -delete 2>/dev/null || true + echo "Updating project dependencies via uv sync" uv sync --all-groups