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

[apps] adding backoff to state saving in apps functions config #683

Merged
merged 1 commit into from
Apr 12, 2018

Conversation

ryandeivert
Copy link
Contributor

@ryandeivert ryandeivert commented Apr 12, 2018

to: @chunyong-lin
cc: @airbnb/streamalert-maintainers
size: small
resolves #682

Background

See #682, gist: rapid state saving can cause issues with SSM and will produce a TooManyUpdates error

Changes

  • Adding backoff to the _save_state function that will backoff on ClientError exceptions.
  • The saving will be attempted 5 times and will then raise an exception.
  • Adding backoff to app integration packaging requirements.

Testing

Updating unit tests to patch new MAX_SAVE_TRIES class property, but no other test changes were required for this.

@ryandeivert ryandeivert changed the title adding backoff to state saving in apps functions config [apps] adding backoff to state saving in apps functions config Apr 12, 2018
@ryandeivert ryandeivert added this to the 2.0.0 milestone Apr 12, 2018
@coveralls
Copy link

Coverage Status

Coverage increased (+0.005%) to 95.894% when pulling 3051645 on ryandeivert-backoff-app-ssm into 6931ee1 on master.

Copy link
Contributor

@chunyong-lin chunyong-lin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change!

@ryandeivert ryandeivert merged commit 71801f3 into master Apr 12, 2018
@ryandeivert ryandeivert deleted the ryandeivert-backoff-app-ssm branch April 14, 2018 19:27
@ryandeivert ryandeivert removed the apps label Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: TooManyUpdates error in AppConfig during state saving
3 participants