diff --git a/.github/workflows/gatekeeper.yml b/.github/workflows/gatekeeper.yml new file mode 100644 index 000000000..59fe6f913 --- /dev/null +++ b/.github/workflows/gatekeeper.yml @@ -0,0 +1,62 @@ +name: Gatekeeper +on: + pull_request: + types: [opened, synchronize, reopened] + +permissions: + pull-requests: read + checks: read + statuses: read + +concurrency: + group: gatekeeper-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + all-checks-passed: + name: All Checks Passed + runs-on: ubuntu-latest + timeout-minutes: 240 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_NUMBER: ${{ github.event.pull_request.number }} + REPO: ${{ github.repository }} + SELF_NAME: All Checks Passed + steps: + - name: Wait for other checks to complete successfully + run: | + echo "Giving sibling workflows time to register..." + sleep 60 + + while true; do + CHECKS=$(gh pr view "$PR_NUMBER" -R "$REPO" --json statusCheckRollup --jq \ + '[.statusCheckRollup[] | select(.name != env.SELF_NAME and .context != env.SELF_NAME)]') + + PENDING=$(echo "$CHECKS" | jq '[.[] | select( + ((.status // "") | test("QUEUED|IN_PROGRESS|PENDING|WAITING|REQUESTED"; "i")) or + ((.state // "") | test("PENDING|EXPECTED"; "i")) + )] | length') + + if [ "$PENDING" -gt 0 ]; then + echo "$PENDING checks still running. Waiting 60s..." + sleep 60 + continue + fi + + FAILED=$(echo "$CHECKS" | jq '[.[] | select( + ((.conclusion // "") | test("FAILURE|CANCELLED|TIMED_OUT|ACTION_REQUIRED|STARTUP_FAILURE"; "i")) or + ((.state // "") | test("FAILURE|ERROR"; "i")) + )] | length') + + if [ "$FAILED" -gt 0 ]; then + echo "Failed checks:" + echo "$CHECKS" | jq -r '.[] | select( + ((.conclusion // "") | test("FAILURE|CANCELLED|TIMED_OUT|ACTION_REQUIRED|STARTUP_FAILURE"; "i")) or + ((.state // "") | test("FAILURE|ERROR"; "i")) + ) | "\(.name // .context): \(.conclusion // .state)"' + exit 1 + fi + + echo "All triggered checks green (or skipped)." + break + done diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 0d672c848..6007bb5fc 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -15,7 +15,7 @@ jobs: python-version: "3.12" - run: echo "::add-matcher::.github/workflows/matchers/actionlint.json" - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 - - run: pip install ruff + - run: pip install ruff==0.15.19 - run: ruff check src pre-commit-manual: diff --git a/helm/values.schema.json b/helm/values.schema.json index 88e5952e0..fb46d0f3a 100644 --- a/helm/values.schema.json +++ b/helm/values.schema.json @@ -1455,54 +1455,6 @@ "requestMemory": { "description": "Memory request for the head node", "type": "string" - }, - "resources": { - "description": "Raw Kubernetes resources block for the head node container. If specified, takes priority over the simplified request* fields.", - "type": "object" - }, - "initContainer": { - "description": "The configuration for an init container to be run before the Ray head container starts.", - "type": "object", - "properties": { - "args": { - "description": "Additional arguments to pass to the command", - "type": "array", - "items": { - "type": "string" - } - }, - "command": { - "description": "The command to run in the init container", - "type": "array", - "items": { - "type": "string" - } - }, - "env": { - "description": "List of environment variables to set in the container", - "type": "array" - }, - "extraVolumeMounts": { - "description": "Additional volume mounts to add to the init container, in Kubernetes volumeMount format.", - "type": "array" - }, - "image": { - "description": "The Docker image for the init container", - "type": "string" - }, - "mountPvcStorage": { - "description": "Whether to mount the model's PVC storage into the init container", - "type": "boolean" - }, - "name": { - "description": "The name of the init container", - "type": "string" - }, - "resources": { - "description": "The resource requests and limits for the init container", - "type": "object" - } - } } } }