From 6c445e7db419c8733031b58912306adfce4e6ea0 Mon Sep 17 00:00:00 2001 From: Liangsheng Yin Date: Thu, 20 Nov 2025 16:20:45 +0800 Subject: [PATCH 1/3] unify --- .github/workflows/pr-gate.yml | 14 +++++++------- docs/developer_guide/contribution_guide.md | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pr-gate.yml b/.github/workflows/pr-gate.yml index 715f6950caaf..cffc8f5da3c5 100644 --- a/.github/workflows/pr-gate.yml +++ b/.github/workflows/pr-gate.yml @@ -5,10 +5,10 @@ on: description: "Whether the PR must have the run-ci label" type: boolean default: true - rate-limit-hours: - description: "Rate limit window size in hours; 0 disables rate limiting" + cool-down-minutes: + description: "Cooldown period in minutes for low-permission users; 0 disables rate limiting" type: number - default: 2 + default: 120 jobs: pr-gate: @@ -41,7 +41,7 @@ jobs: echo "PR Draft: ${{ steps.pr.outputs.draft }}" echo "PR User: ${{ steps.pr.outputs.user }}" echo "Require run-ci: ${{ inputs.require-run-ci }}" - echo "Rate limit hours: ${{ inputs.rate-limit-hours }}" + echo "Cool down minutes: ${{ inputs.cool-down-minutes }}" echo "===================" - name: Block draft PR @@ -60,12 +60,12 @@ jobs: fi - name: Enforce rate limit for low-permission actors (optional) - if: github.event_name == 'pull_request' && inputs.rate-limit-hours > 0 + if: github.event_name == 'pull_request' && inputs.cool-down-minutes > 0 uses: actions/github-script@v7 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | - const DEFAULT_HOURS = Number("${{ inputs.rate-limit-hours }}"); + const DEFAULT_MINUTES = Number("${{ inputs.cool-down-minutes }}"); const owner = context.repo.owner; const repo = context.repo.repo; const eventName = context.eventName; @@ -96,7 +96,7 @@ jobs: return; } - let effectiveCooldownMinutes = DEFAULT_HOURS * 60; + let effectiveCooldownMinutes = DEFAULT_MINUTES; let perUserCooldownMinutes = null; try { diff --git a/docs/developer_guide/contribution_guide.md b/docs/developer_guide/contribution_guide.md index eb1f391f76dc..2688a886fbc0 100644 --- a/docs/developer_guide/contribution_guide.md +++ b/docs/developer_guide/contribution_guide.md @@ -89,13 +89,13 @@ If you don’t have permission, please ask maintainers to trigger CI for you. We apply CI rate limits to prevent abuse and ensure fair usage of our CI resources. -Each CI workflow has a default limit defined in its workflow configuration file. For example, in [pr-gate.yml](https://github.com/sgl-project/sglang/blob/main/.github/workflows/pr-gate.yml), the default rate limit window is 2 hours, and each workflow can override it via the `rate-limit-hours` input parameter: +Each CI workflow has a default limit defined in its workflow configuration file. For example, in [pr-gate.yml](https://github.com/sgl-project/sglang/blob/main/.github/workflows/pr-gate.yml), the default rate limit window is 120 minutes, and each workflow can override it via the `cool-down-minutes` input parameter: ```yaml -rate-limit-hours: - description: "Rate limit window size in hours; 0 disables rate limiting" +cool-down-minutes: + description: "Cooldown period in minutes for low-permission users; 0 disables rate limiting" type: number - default: 2 + default: 120 ``` Users listed in [CI_PERMISSIONS.json](https://github.com/sgl-project/sglang/blob/main/.github/CI_PERMISSIONS.json) may have a per-user cooldown interval. In practice, we use the minimum of the workflow’s default window and the user-specific interval. From 6f8688d72ccd3141252385e0dc16ec85f295c154 Mon Sep 17 00:00:00 2001 From: Liangsheng Yin Date: Thu, 20 Nov 2025 16:24:37 +0800 Subject: [PATCH 2/3] Update docs/developer_guide/contribution_guide.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- docs/developer_guide/contribution_guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer_guide/contribution_guide.md b/docs/developer_guide/contribution_guide.md index 2688a886fbc0..27f3552f4943 100644 --- a/docs/developer_guide/contribution_guide.md +++ b/docs/developer_guide/contribution_guide.md @@ -89,7 +89,7 @@ If you don’t have permission, please ask maintainers to trigger CI for you. We apply CI rate limits to prevent abuse and ensure fair usage of our CI resources. -Each CI workflow has a default limit defined in its workflow configuration file. For example, in [pr-gate.yml](https://github.com/sgl-project/sglang/blob/main/.github/workflows/pr-gate.yml), the default rate limit window is 120 minutes, and each workflow can override it via the `cool-down-minutes` input parameter: +Each CI workflow has a default limit defined in its workflow configuration file. For example, in [pr-gate.yml](https://github.com/sgl-project/sglang/blob/main/.github/workflows/pr-gate.yml), the default cooldown period is 120 minutes, and each workflow can override it via the `cool-down-minutes` input parameter: ```yaml cool-down-minutes: From 71a4c6369b89d650048ad3c4b14aef11c2f949cf Mon Sep 17 00:00:00 2001 From: Liangsheng Yin Date: Thu, 20 Nov 2025 16:24:49 +0800 Subject: [PATCH 3/3] Update docs/developer_guide/contribution_guide.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- docs/developer_guide/contribution_guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer_guide/contribution_guide.md b/docs/developer_guide/contribution_guide.md index 27f3552f4943..6abcad5f53da 100644 --- a/docs/developer_guide/contribution_guide.md +++ b/docs/developer_guide/contribution_guide.md @@ -93,7 +93,7 @@ Each CI workflow has a default limit defined in its workflow configuration file. ```yaml cool-down-minutes: - description: "Cooldown period in minutes for low-permission users; 0 disables rate limiting" + description: "Default cooldown period in minutes; 0 disables rate limiting" type: number default: 120 ```