Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
7a6c6cd
chore: create a release
noahdietz Apr 30, 2026
badbf42
wip
ohmayr May 6, 2026
699fc63
add core-deps-from-source
ohmayr May 6, 2026
4fb760b
update discover
ohmayr May 6, 2026
f2ac24d
update workflow
ohmayr May 6, 2026
87cf0b6
update discover
ohmayr May 6, 2026
b25c456
update workflow
ohmayr May 6, 2026
18ec2de
loop before leap
ohmayr May 6, 2026
8852bed
use pip instead of uv
ohmayr May 6, 2026
bfc156a
make core-deps uv compatible
ohmayr May 6, 2026
4ea79e6
update core-deps workflow to use uv
ohmayr May 6, 2026
8635b36
update workflow
ohmayr May 6, 2026
fff81f0
update workflow
ohmayr May 6, 2026
d85736f
update workflow
ohmayr May 6, 2026
6ebb99b
update workflow
ohmayr May 6, 2026
a95259f
update workflow
ohmayr May 6, 2026
41ae618
update workflow
ohmayr May 6, 2026
50096e7
update workflow
ohmayr May 6, 2026
56b65d3
run tests concurrently
ohmayr May 6, 2026
1fc5edc
update workflow
ohmayr May 7, 2026
4f69499
Merge branch 'main' into test-librarian-with-new-wrkflw
ohmayr May 7, 2026
ed3f47f
rename script
ohmayr May 7, 2026
ce6aae1
update chunk
ohmayr May 7, 2026
15b38f7
update chunk to install pip
ohmayr May 7, 2026
1fb9cd4
use max-vms=6
ohmayr May 11, 2026
4f58b08
increase vms and mammoth overrides
ohmayr May 11, 2026
26772bc
update workflow
ohmayr May 11, 2026
c21d471
update workflow
ohmayr May 11, 2026
fdbdd49
update workflow
ohmayr May 11, 2026
1be510a
update matrix script
ohmayr May 11, 2026
f58dee6
add prerelease and core-deps
ohmayr May 11, 2026
7b91080
add docs and lint workflows
ohmayr May 12, 2026
274f7ac
update prerelease
ohmayr May 12, 2026
2421627
only test core-deps-from-source
ohmayr May 12, 2026
00d7dcd
Merge branch 'main' into test-librarian-with-new-wrkflw
ohmayr May 12, 2026
48bce66
merge main
ohmayr May 12, 2026
3e115cd
rename script
ohmayr May 12, 2026
d1aa621
remove ci-docs and ci-lint
ohmayr May 12, 2026
089d152
update chunk
ohmayr May 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
60 changes: 60 additions & 0 deletions .github/scripts/gha_matrix_balancer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import os
import json
import argparse

VIPS = {
"google-cloud-spanner",
"google-cloud-compute",
"google-cloud-compute-v1beta",
"google-cloud-discoveryengine"
}

def get_valid_packages(directories):
return [p for p in directories if os.path.isfile(os.path.join(p, "noxfile.py"))]

def distribute_packages(packages, max_buckets):
# VIPs jump to the front of the line
packages.sort(key=lambda p: os.path.basename(p) not in VIPS)

buckets = [{"weight": 0, "pkgs": []} for _ in range(min(len(packages), max_buckets))]

for pkg in packages:
# Find the bucket with the lowest weight, add the package, and update its weight
lightest = min(buckets, key=lambda b: b["weight"])
lightest["pkgs"].append(pkg)
lightest["weight"] += 9999 if os.path.basename(pkg) in VIPS else 1

return [b["pkgs"] for b in buckets]

def build_github_actions_jobs(buckets):
jobs = []
for bucket in buckets:
# Create a clean UI label for the GitHub presubmit check
base_name = os.path.basename(bucket[0]).replace("google-cloud-", "")
job_label = f"{base_name} + {len(bucket) - 1}" if len(bucket) > 1 else base_name
jobs.append({"id": job_label, "packages": " ".join(bucket)})
return jobs

def main():
parser = argparse.ArgumentParser()
parser.add_argument("--matrix-multiplier", type=int, required=True)
parser.add_argument("--max-vms", type=int, default=20)
args = parser.parse_args()

packages = get_valid_packages(os.environ.get("CHANGED_DIRS", "").split())
if not packages:
return

max_buckets = min(250 // args.matrix_multiplier, args.max_vms)
buckets = distribute_packages(packages, max_buckets)

jobs_json = json.dumps(build_github_actions_jobs(buckets))

if "GITHUB_OUTPUT" in os.environ:
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
f.write(f"buckets={jobs_json}\n")
else:
print(jobs_json)

if __name__ == "__main__":
main()
81 changes: 81 additions & 0 deletions .github/workflows/experiment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: CI Timeout Stress Test (Core Deps)
on:
pull_request:
branches: [ main, preview ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
# ==========================================
# 1. DISCOVERY & BUCKETING
# ==========================================
discover:
runs-on: ubuntu-latest
outputs:
buckets: ${{ steps.generate-matrix.outputs.buckets }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Detect Changed Packages
id: changes
uses: tj-actions/changed-files@v44
with:
files: packages/**
dir_names: true
dir_names_max_depth: 2
matrix: false

- name: Generate Balanced Buckets
id: generate-matrix
env:
CHANGED_DIRS: ${{ steps.changes.outputs.all_changed_files }}
# We use a multiplier of 1 because we are only running a single Python version
run: python .github/scripts/gha_matrix_balancer.py --matrix-multiplier 1 --max-vms 20

# ==========================================
# 2. CORE DEPS TEST (Py 3.14)
# ==========================================
test-core-deps:
needs: discover
if: ${{ needs.discover.outputs.buckets != '[]' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 60
matrix:
chunk: ${{ fromJSON(needs.discover.outputs.buckets) }}

name: core-deps (${{ matrix.chunk.id }})
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2

- uses: actions/setup-python@v5
with:
python-version: "3.14"

- name: Install standard Nox
run: python -m pip install nox

- name: Execute Chunk
run: |
FAILED=0
SESSION="core_deps_from_source-3.14"

for pkg in ${{ matrix.chunk.packages }}; do
echo "=========================================================="
echo "🚀 TESTING CORE DEPS: $pkg"
echo "=========================================================="
cd "$pkg"

# Run unconditionally. If it doesn't exist, Nox will throw an error.
python -m nox -s "${SESSION}" || FAILED=1

cd "$GITHUB_WORKSPACE"
done
exit $FAILED
Loading
Loading