Skip to content

chore: use less concurred minute of hour for scheduled jobs #26435

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

Merged
merged 1 commit into from
Apr 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/codegen.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
on:
schedule:
# Runs at 12:30, 1:30 and 2:30.
- cron: '30 0-2 * * *'
# Runs at 12:18, 1:18 and 2:18.
# See https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule
- cron: '18 0-2 * * *'
workflow_dispatch:

name: codegen
Expand All @@ -18,7 +19,7 @@ jobs:
with:
script: |
console.log('checking size of services')
const MAX_SERVICE_SIZE = 300 // 00:30 to 02:30 implies 3 batches of size 100
const MAX_SERVICE_SIZE = 300 // 00:18 to 02:18 implies 3 batches of size 100
const services = ${{ needs.discovery.outputs.services }}
if (services.length > MAX_SERVICE_SIZE) {
throw new Error(`Total services (${services.length}) exceed limit of ${MAX_SERVICE_SIZE}`)
Expand Down