Skip to content

Commit f188bf3

Browse files
authored
Merge pull request #116 from vililahtevanoja/master
feat: Add configurable update rate
2 parents a695f21 + 160321e commit f188bf3

File tree

6 files changed

+199660
-122299
lines changed

6 files changed

+199660
-122299
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,31 @@ The only required input is `project-name`.
4646
the one defined here replaces the one in the CodeBuild project.
4747
For a list of CodeBuild environment variables, see
4848

49+
1. **update-interval** (optional) :
50+
Update interval as seconds for how often the API is called to check on the status.
51+
52+
A higher value mitigates the chance of hitting API rate-limiting especially when
53+
running many instances of this action in parallel, but also introduces a larger
54+
potential time overhead (ranging from 0 to update interval) for the action to
55+
fetch the build result and finish.
56+
57+
Lower value limits the potential time overhead worst case but it may hit the API
58+
rate-limit more often, depending on the use-case.
59+
60+
The default value is 30.
61+
62+
1. **update-back-off** (optional) :
63+
Base back-off time in seconds for the update interval.
64+
65+
When API rate-limiting is hit the back-off time, augmented with jitter, will be
66+
added to the next update interval.
67+
E.g. with update interval of 30 and back-off time of 15, upon hitting the rate-limit
68+
the next interval for the update call will be 30 + random_between(0, 15 _ 2 \*\* 0))
69+
seconds and if the rate-limit is hit again the next interval will be
70+
30 + random_between(0, 15 _ 2 \*\* 1) and so on.
71+
72+
The default value is 15.
73+
4974
### Outputs
5075

5176
1. **aws-build-id** : The CodeBuild build ID of the build that the action ran.

action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ inputs:
2222
env-vars-for-codebuild:
2323
description: 'Comma separated list of environment variables to send to CodeBuild'
2424
required: false
25+
update-interval:
26+
description: 'How often the action calls the API for updates'
27+
required: false
28+
update-back-off:
29+
description: 'Base back-off time for the update calls for API if rate-limiting is encountered'
30+
required: false
31+
2532
outputs:
2633
aws-build-id:
2734
description: 'The AWS CodeBuild Build ID for this build.'

0 commit comments

Comments
 (0)