pipeline-aws-plugin
pipeline-aws-plugin copied to clipboard
Make configurable via environment variables socket timeout and retries in SDK client
- Please check if the PR fulfills these requirements
- [x] The commit message describes your change
- [ ] Tests for the changes have been added if possible (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
- [ ] Changes are mentioned in the changelog (for bug fixes / features)
-
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...) In case if
invokeLambda
takes more than the default SDK timeout (50 seconds), the pipeline will make more retries instead of waiting a bit longer. -
What is the current behavior? (You can also link to an open issue here) The changes to fix the issue described in https://github.com/jenkinsci/pipeline-aws-plugin/issues/208
-
What is the new behavior (if this is a feature change)? By doing this change SDK client timeout could be overriden via environment variable
AWS_SDK_SOCKET_TIMEOUT
in case if a target lambda function is supposed to run longer than default 50 seconds. The number of retries could be also configured viaAWS_SDK_RETRIES
environment variable in case if a client does not want to make retries and would prefer to fail pipeline in case of timeout exceeded. -
Does this PR introduce a breaking change? (What changes might users need to make in their setup due to this PR?) No.
-
Other information: Would like to get a confirmation that using
EnvVars
class methods allow to read environment variables provided in a Jenkins pipeline code, to make sure this is not any kind of internal Jenkins environment variables or anything else. Did not find any documentation with supported environment variables, please point me if such documentation exists and needs to be updated.