Secure, Fast, and Extensible Sandbox runtime for AI agents.
ci(fast-sandbox): trigger KVM integration tests from fast-sandbox PRs
高然16cf7dfe5b9b
diff --git a/.github/workflows/fast-sandbox-test.yml b/.github/workflows/fast-sandbox-test.ymlindex ba0c860a1..e13bdaf15 100644--- a/.github/workflows/fast-sandbox-test.yml+++ b/.github/workflows/fast-sandbox-test.yml@@ -2,6 +2,13 @@ name: Fast Sandbox Integration Testson:workflow_dispatch:+ inputs:+ fsb_commit:+ description: Optional fast-sandbox commit SHA to test instead of the pinned commit (full 40-char SHA; a PR head SHA works)+ required: false+ type: string+ repository_dispatch:+ types: [fast-sandbox-pr]pull_request:branches: [ main ]@@ -10,9 +17,11 @@ permissions:pull-requests: readactions: write+# One self-hosted KVM machine serves all runs: queue dispatch-triggered runs+# instead of canceling them; only PR pushes supersede each other.concurrency:group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}- cancel-in-progress: true+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}jobs:changes:@@ -30,6 +39,9 @@ jobs:# Full-stack profile (single round while scenarios stabilize).IDLE_PAUSE: "1"IDLE_PAUSE_ROUNDS: "1"+ # workflow_dispatch input or repository_dispatch client_payload;+ # empty for pull_request events (test the pinned commit).+ FSB_COMMIT_OVERRIDE: ${{ inputs.fsb_commit || github.event.client_payload.fsb_commit }}steps:# actions/checkout always executes as the runner user; the script# steps below run as root and leave root-owned files (venv, pycache)@@ -52,6 +64,21 @@ jobs:# The self-hosted runner's system python3 may still be Python 3.6.run: uv run --no-project --python 3.12 python -m unittest discover -s scripts/tests -p test_fast_sandbox_integration_env.py -v+ # Cross-repo pre-merge trigger (repository_dispatch from fast-sandbox+ # PRs): rewrite the pin in the working tree only — the checkout stays+ # clean — then re-vendor the CRD bundle so the charts install the+ # tested commit's CRDs, not the ones pinned for the old commit.+ - name: Override fast-sandbox pin+ if: env.FSB_COMMIT_OVERRIDE != ''+ run: |+ [[ "$FSB_COMMIT_OVERRIDE" =~ ^[0-9a-f]{40}$ ]] || {+ echo "::error::fsb_commit must be a full 40-character SHA (got: $FSB_COMMIT_OVERRIDE)"+ exit 1+ }+ echo "Testing fast-sandbox @ $FSB_COMMIT_OVERRIDE instead of the pinned commit"+ sed -i "s/^commit:.*/commit: $FSB_COMMIT_OVERRIDE/" manifests/third-party/fast-sandbox.commit+ manifests/release/build-fast-sandbox.sh --no-build --sync-crds+- name: Run integration testsrun: sudo -E env "PATH=$PATH" ./scripts/fast-sandbox-env/integration-env.sh up --auto-clean