Skip to content
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

feat: Add configurable update rate #116

Merged
merged 10 commits into from
Jan 30, 2023
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,30 @@ The only required input is `project-name`.
the one defined here replaces the one in the CodeBuild project.
For a list of CodeBuild environment variables, see

1. **update-interval** (optional) :
Update interval as seconds for how often the API is called to check on the status.

A higher value mitigates the chance of hitting API rate-limiting especially when
running many instances of this action in parallel, but also introduces a larger
potential time overhead (ranging from 0 to update interval) for the action to
fetch the build result and finish.

Lower value limits the potential time overhead worst case but it may hit the API
rate-limit more often, depending on the use-case.

The default value is 30.

1. **update-back-off** (optional) :
Back-off time in seconds for the update interval.

When API rate-limiting is hit, the back-off time will be added to the next update
interval.
E.g. with update interval of 30 and back-off time of 15, upon hitting the rate-limit
the next interval for the update call will be 45s and if the rate-limit is hit again
the next interval will be 60s and so on.

The default value is 15.

### Outputs

1. **aws-build-id** : The CodeBuild build ID of the build that the action ran.
Expand Down
7 changes: 7 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ inputs:
env-vars-for-codebuild:
description: 'Comma separated list of environment variables to send to CodeBuild'
required: false
update-interval:
description: 'How often the action calls the API for updates'
required: false
update-back-off:
description: 'Back-off time for the update calls for API if rate-limiting is encountered'
required: false

outputs:
aws-build-id:
description: 'The AWS CodeBuild Build ID for this build.'
Expand Down
Loading