Skip to content

Commit 9c792d0

Browse files
authored
fix: Update codegen.yaml to generate clients in 2 batches and 200 clients per batch (#17551)
The current codegen.yaml generates clients in 4 batches and 100 clients per batch, which makes the last batch always succeeds due to the number of services is less than 300 at this moment. Changing the batch size to 2 and number of clients per batch to 200 so that the build status is correctly reflected.
1 parent b04daf0 commit 9c792d0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/codegen.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
on:
22
schedule:
3-
# every one hour from 00:30 to 03:30
4-
- cron: '30 0-3 * * *'
3+
# Runs at 00:30 and 02:30.
4+
- cron: '30 0,2 * * *'
55
workflow_dispatch:
66

77
name: codegen
@@ -17,7 +17,7 @@ jobs:
1717
with:
1818
script: |
1919
console.log('checking size of services')
20-
const MAX_SERVICE_SIZE = 400 // 00:30 to 03:30 implies 4 batches of size 100
20+
const MAX_SERVICE_SIZE = 400 // 00:30 and 02:30 implies 2 batches of size 200
2121
const services = ${{ needs.discovery.outputs.services }}
2222
if (services.length > MAX_SERVICE_SIZE) {
2323
throw new Error(`Total services (${services.length}) exceed limit of ${MAX_SERVICE_SIZE}`)
@@ -35,7 +35,7 @@ jobs:
3535
console.log('splitting service names list into batches')
3636
const services = ${{ needs.discovery.outputs.services }}
3737
const hour = new Date().getHours()
38-
const MAX_BATCH_SIZE = 100
38+
const MAX_BATCH_SIZE = 200
3939
const result = {
4040
batches: [],
4141
hour: new Date().getHours(),
@@ -50,4 +50,4 @@ jobs:
5050
secrets: inherit
5151
if: ${{!!fromJson(needs.batch.outputs.services).batches[fromJson(needs.batch.outputs.services).hour]}}
5252
with:
53-
services: ${{toJson(fromJson(needs.batch.outputs.services).batches[fromJson(needs.batch.outputs.services).hour])}}
53+
services: ${{toJson(fromJson(needs.batch.outputs.services).batches[fromJson(needs.batch.outputs.services).hour])}}

0 commit comments

Comments
 (0)