chore(ci): remove unused recordings

Added a script to cleanup recordings. While doing this, moved the CI
matrix generation to a separate script so there is a single source of
truth for the matrix.

Ran the cleanup script as:

```
PYTHONPATH=. python scripts/cleanup_recordings.py
```

We can eventually put this as part of the pre-commit workflow to ensure
that the recordings are always up to date and that no stale recordings
are left in the repo.
This commit is contained in:
Ashwin Bharambe 2025-11-04 16:22:04 -08:00
parent 392e01dc79
commit 2745956bc0
497 changed files with 369 additions and 370287 deletions

59
scripts/generate_ci_matrix.py Executable file
View file

@ -0,0 +1,59 @@
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
"""
Generate CI test matrix from suites.py with schedule/input overrides.
This script is used by .github/workflows/integration-tests.yml to generate
the test matrix dynamically based on the CI_MATRIX definition in suites.py.
"""
import json
import sys
from pathlib import Path
# Add tests/integration to path
sys.path.insert(0, str(Path(__file__).parent.parent / "tests/integration"))
from suites import CI_MATRIX
def generate_matrix(schedule="", test_setup=""):
"""
Generate test matrix based on schedule or manual input.
Args:
schedule: GitHub cron schedule string (e.g., "1 0 * * 0" for weekly)
test_setup: Manual test setup input (e.g., "ollama-vision")
Returns:
Matrix configuration as JSON string
"""
# Weekly vllm test on Sunday
if schedule == "1 0 * * 0":
matrix = [{"suite": "base", "setup": "vllm"}]
# Manual input for specific setup
elif test_setup == "ollama-vision":
matrix = [{"suite": "vision", "setup": "ollama-vision"}]
# Default: use CI_MATRIX from suites.py
else:
matrix = CI_MATRIX
# GitHub Actions expects {"include": [...]} format
return json.dumps({"include": matrix})
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(description="Generate CI test matrix")
parser.add_argument("--schedule", default="", help="GitHub schedule cron string")
parser.add_argument("--test-setup", default="", help="Manual test setup input")
args = parser.parse_args()
print(generate_matrix(args.schedule, args.test_setup))