-
Notifications
You must be signed in to change notification settings - Fork 68
(WIP) ci: harden H100 GPU tests on slow runners #687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
40abdad
ci: harden H100 GPU qualification
yuanchen8911 ae0b717
ci: split aicr build artifacts
yuanchen8911 33417c3
ci: harden gpu cluster setup
yuanchen8911 b7ffe6b
ci: tune H100 workflow reliability
yuanchen8911 0834778
ci: address H100 review feedback
yuanchen8911 dfd2685
ci: clarify control-plane recovery handling
yuanchen8911 87d84a0
ci: address remaining review comments
yuanchen8911 d14f9c5
ci: bound H100 retry budgets
yuanchen8911 7a3505c
ci: install ko for Karpenter KWOK
yuanchen8911 c1ccd86
ci: retry KWOK Helm bootstrap
yuanchen8911 34f115e
ci: share control plane stability window
yuanchen8911 73dfd1e
ci: harden H100 runtime diagnostics
yuanchen8911 2887460
ci: harden H100 control plane and Dynamo retries
yuanchen8911 23b3d5f
ci: harden H100 control plane and Dynamo retries
yuanchen8911 0f308d6
Stabilize H100 GPU CI checks
yuanchen8911 22304c9
Address H100 CI review feedback
yuanchen8911 553051c
Avoid pull request events for GPU runners
yuanchen8911 ff99d6a
Address GPU CI review feedback
yuanchen8911 1d55329
ci: address GPU workflow review hardening
yuanchen8911 e1e931a
ci: harden H100 kind runtime workflows
yuanchen8911 727f1b0
ci: address follow-up GPU review feedback
yuanchen8911 4219435
Merge branch 'main' into ci-gpu-kind-fail-fast
mchmarny File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/usr/bin/env bash | ||
| # Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| mkdir -p dist | ||
| CGO_ENABLED=0 go build -trimpath -o dist/aicr ./cmd/aicr |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| #!/usr/bin/env bash | ||
| # Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| # Build snapshot agent image with CUDA base (provides nvidia-smi for GPU detection). | ||
| # Uses cuda:base (~250MB) instead of cuda:runtime (~1.8GB) because only nvidia-smi is needed. | ||
| timeout 900s docker build -t ko.local:smoke-test -f - . <<'DOCKERFILE' | ||
| FROM nvcr.io/nvidia/cuda:13.1.0-base-ubuntu24.04 | ||
| COPY dist/aicr /usr/local/bin/aicr | ||
| ENTRYPOINT ["/usr/local/bin/aicr"] | ||
| DOCKERFILE | ||
|
|
||
| # Load onto all nodes. The snapshot agent requests nvidia.com/gpu but does not | ||
| # set a node selector, so it can land on any GPU-capable node including the | ||
| # control-plane in the L40G smoke test. | ||
| timeout 900 kind load docker-image ko.local:smoke-test --name "${KIND_CLUSTER_NAME}" || { | ||
| echo "::warning::kind load attempt 1 failed for ko.local:smoke-test, retrying..." | ||
| timeout 900 kind load docker-image ko.local:smoke-test --name "${KIND_CLUSTER_NAME}" | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| #!/usr/bin/env bash | ||
| # Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| VALIDATOR_PHASES="${VALIDATOR_PHASES:-}" | ||
| if [[ -n "${VALIDATOR_PHASES}" ]]; then | ||
| if [[ "${VALIDATOR_PHASES}" == "none" ]]; then | ||
| echo "Skipping validator builds (validator_phases=none)" | ||
| exit 0 | ||
| fi | ||
| PHASES="${VALIDATOR_PHASES}" | ||
| else | ||
| # Default: build all phases (backwards compatible). | ||
| PHASES="deployment,performance,conformance" | ||
| fi | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| : "${KIND_CLUSTER_NAME:?KIND_CLUSTER_NAME must be set}" | ||
|
|
||
| mkdir -p dist/validator | ||
| for phase in ${PHASES//,/ }; do | ||
| if ! [[ "${phase}" =~ ^[a-z][a-z0-9_-]*$ ]]; then | ||
| echo "::error::invalid validator phase '${phase}'; expected ^[a-z][a-z0-9_-]*$" | ||
| exit 1 | ||
| fi | ||
| echo "Building validator binary: ${phase}" | ||
| CGO_ENABLED=0 go build -trimpath -o "dist/validator/${phase}" "./validators/${phase}" | ||
| done | ||
|
|
||
| for phase in ${PHASES//,/ }; do | ||
| if [[ ! -d "validators/${phase}/testdata" ]]; then | ||
| echo "::warning::validators/${phase}/testdata is missing; creating empty testdata directory" | ||
| mkdir -p "validators/${phase}/testdata" | ||
| fi | ||
| docker build -t "ko.local/aicr-validators/${phase}:latest" -f - . <<DOCKERFILE | ||
| FROM gcr.io/distroless/static-debian12:nonroot | ||
| COPY dist/validator/${phase} /${phase} | ||
| COPY validators/${phase}/testdata /app/testdata | ||
| WORKDIR /app | ||
| USER nonroot | ||
| ENTRYPOINT ["/${phase}"] | ||
| DOCKERFILE | ||
| timeout 600 kind load docker-image "ko.local/aicr-validators/${phase}:latest" --name "${KIND_CLUSTER_NAME}" || { | ||
| echo "::warning::kind load attempt 1 failed for ko.local/aicr-validators/${phase}:latest, retrying..." | ||
| timeout 600 kind load docker-image "ko.local/aicr-validators/${phase}:latest" --name "${KIND_CLUSTER_NAME}" | ||
| } | ||
| done | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #!/usr/bin/env bash | ||
| # Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| cp dist/aicr ./aicr |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| # Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| name: 'Check Control Plane Health' | ||
| description: 'Fails if Kind control-plane static pods are missing, unready, or unstable.' | ||
|
|
||
| inputs: | ||
| cluster_name: | ||
| description: 'Kind cluster name' | ||
| required: true | ||
| namespace: | ||
| description: 'Namespace that contains the control-plane pods' | ||
| required: false | ||
| default: kube-system | ||
| components: | ||
| description: 'Space-separated component label values to check' | ||
| required: false | ||
| default: kube-apiserver kube-controller-manager kube-scheduler etcd | ||
| wait_timeout: | ||
| description: 'Timeout for each component readiness wait' | ||
| required: false | ||
| default: 60s | ||
| max_restarts: | ||
| description: 'Deprecated compatibility input; historical restart counts are reported but not capped' | ||
| required: false | ||
| default: '1' | ||
| stability_window: | ||
| description: 'Optional duration to watch for new control-plane restarts after pods are Ready' | ||
| required: false | ||
| default: '0s' | ||
| stability_probe_interval: | ||
| description: 'Interval for active API server probes during the stability window' | ||
| required: false | ||
| default: '10s' | ||
| stability_probe_failure_threshold: | ||
| description: 'Consecutive active stability probe failures allowed before failing' | ||
| required: false | ||
| default: '2' | ||
| lease_components: | ||
| description: 'Space-separated leader election lease names to check for freshness' | ||
| required: false | ||
| default: kube-controller-manager kube-scheduler | ||
| lease_stale_timeout: | ||
| description: 'Maximum allowed leader election lease age at the end of a stability window' | ||
| required: false | ||
| default: '120s' | ||
| recover_unhealthy: | ||
| description: 'Restart eligible Kind control-plane static pod containers when they are currently unhealthy' | ||
| required: false | ||
| default: 'false' | ||
| recovery_components: | ||
| description: 'Space-separated component label values eligible for recovery' | ||
| required: false | ||
| default: kube-controller-manager kube-scheduler kube-apiserver | ||
| max_recovery_attempts: | ||
| description: 'Maximum recovery attempts for each eligible component' | ||
| required: false | ||
| default: '1' | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| runs: | ||
| using: 'composite' | ||
| steps: | ||
| - name: Check control-plane pods | ||
| shell: bash | ||
| env: | ||
| KIND_CLUSTER_NAME: ${{ inputs.cluster_name }} | ||
| NAMESPACE: ${{ inputs.namespace }} | ||
| COMPONENTS: ${{ inputs.components }} | ||
| WAIT_TIMEOUT: ${{ inputs.wait_timeout }} | ||
| MAX_RESTARTS: ${{ inputs.max_restarts }} | ||
| STABILITY_WINDOW: ${{ inputs.stability_window }} | ||
| STABILITY_PROBE_INTERVAL: ${{ inputs.stability_probe_interval }} | ||
| STABILITY_PROBE_FAILURE_THRESHOLD: ${{ inputs.stability_probe_failure_threshold }} | ||
| LEASE_COMPONENTS: ${{ inputs.lease_components }} | ||
| LEASE_STALE_TIMEOUT: ${{ inputs.lease_stale_timeout }} | ||
| RECOVER_UNHEALTHY: ${{ inputs.recover_unhealthy }} | ||
| RECOVERY_COMPONENTS: ${{ inputs.recovery_components }} | ||
| MAX_RECOVERY_ATTEMPTS: ${{ inputs.max_recovery_attempts }} | ||
| run: bash "${{ github.action_path }}/check-control-plane-health.sh" | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.