fix(execd): cancel a foreground run when the client disconnects #2615
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sandbox Kubernetes Tests | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| GO_VERSION: '1.25' | |
| jobs: | |
| changes: | |
| uses: ./.github/workflows/detect-changes.yml | |
| with: | |
| area: kubernetes | |
| # PR gate runs only the boundary versions (oldest supported, mid, newest). | |
| # The full Kubernetes version sweep runs nightly via | |
| # kubernetes-nightly-build.yml (controller-e2e-core-matrix job). | |
| controller-e2e-core: | |
| name: Controller E2E Core (Kubernetes v${{ matrix.version }}) | |
| needs: changes | |
| if: needs.changes.outputs.relevant == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: ["1.22.4", "1.28.6", "1.34.2"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Run core e2e tests | |
| working-directory: kubernetes | |
| run: | | |
| make test-e2e-core KIND_K8S_VERSION=v${{ matrix.version }} | |
| controller-e2e-pause-resume: | |
| name: Controller E2E PauseResume (Kubernetes v${{ matrix.version }}) | |
| needs: changes | |
| if: needs.changes.outputs.relevant == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: ["1.22.4", "1.28.6", "1.34.2"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Run pause-resume e2e tests | |
| working-directory: kubernetes | |
| run: | | |
| make test-e2e-pause-resume KIND_K8S_VERSION=v${{ matrix.version }} | |
| test: | |
| needs: changes | |
| if: needs.changes.outputs.relevant == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25.0' | |
| - name: Check gofmt | |
| working-directory: kubernetes | |
| run: | | |
| files="$(gofmt -l .)" | |
| if [ -n "$files" ]; then | |
| echo "$files" | |
| exit 1 | |
| fi | |
| - name: Run golint | |
| working-directory: kubernetes | |
| run: | | |
| make lint | |
| - name: Run tests | |
| # make test runs manifests/generate/fmt/vet and compiles every package | |
| # (including cmd/controller and cmd/task-executor) via `go test ./...`. | |
| working-directory: kubernetes | |
| run: | | |
| make test | |
| required: | |
| name: Kubernetes CI | |
| if: always() | |
| needs: [changes, controller-e2e-core, controller-e2e-pause-resume, test] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Verify required jobs | |
| env: | |
| RELEVANT: ${{ needs.changes.outputs.relevant }} | |
| CHANGES_RESULT: ${{ needs.changes.result }} | |
| CORE_RESULT: ${{ needs.controller-e2e-core.result }} | |
| PAUSE_RESUME_RESULT: ${{ needs.controller-e2e-pause-resume.result }} | |
| TEST_RESULT: ${{ needs.test.result }} | |
| run: | | |
| if [[ "$CHANGES_RESULT" != "success" ]]; then | |
| echo "Change detection failed: $CHANGES_RESULT" | |
| exit 1 | |
| fi | |
| if [[ "$RELEVANT" == "true" ]]; then | |
| [[ "$CORE_RESULT" == "success" && "$PAUSE_RESUME_RESULT" == "success" && "$TEST_RESULT" == "success" ]] | |
| else | |
| [[ "$RELEVANT" == "false" && "$CORE_RESULT" == "skipped" && "$PAUSE_RESUME_RESULT" == "skipped" && "$TEST_RESULT" == "skipped" ]] | |
| fi |