mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
fix(ci): Add final bytecode cache clear after installations
The issue was timing - we were clearing cache before installations, but uv sync/pip install were creating new .pyc files. This commit: 1. Adds PYTHONDONTWRITEBYTECODE=1 to prevent .pyc generation 2. Clears bytecode cache AFTER all installations complete 3. Ensures no stale .pyc files exist before tests run For editable installs (-e .), Python loads from source directory, so clearing cache after installation ensures the resolver sees the latest method signatures with the authorization parameter.
This commit is contained in:
parent
6dc2d92232
commit
0754d59999
1 changed files with 7 additions and 2 deletions
5
.github/actions/setup-runner/action.yml
vendored
5
.github/actions/setup-runner/action.yml
vendored
|
|
@ -28,6 +28,7 @@ runs:
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
UV_EXTRA_INDEX_URL: ${{ steps.client-config.outputs.uv-extra-index-url }}
|
UV_EXTRA_INDEX_URL: ${{ steps.client-config.outputs.uv-extra-index-url }}
|
||||||
|
PYTHONDONTWRITEBYTECODE: 1
|
||||||
run: |
|
run: |
|
||||||
# Export UV env vars for current step and persist to GITHUB_ENV for subsequent steps
|
# Export UV env vars for current step and persist to GITHUB_ENV for subsequent steps
|
||||||
if [ -n "$UV_EXTRA_INDEX_URL" ]; then
|
if [ -n "$UV_EXTRA_INDEX_URL" ]; then
|
||||||
|
|
@ -69,5 +70,9 @@ runs:
|
||||||
uv pip install ${{ steps.client-config.outputs.install-source }}
|
uv pip install ${{ steps.client-config.outputs.install-source }}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Final cleanup: removing all bytecode cache after installations"
|
||||||
|
find . -name "*.pyc" -type f -delete 2>/dev/null || true
|
||||||
|
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
|
||||||
|
|
||||||
echo "Installed llama packages"
|
echo "Installed llama packages"
|
||||||
uv pip list | grep llama
|
uv pip list | grep llama
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue