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

Add more retries to more components #423

Merged
merged 4 commits into from
Nov 14, 2018
Merged

Add more retries to more components #423

merged 4 commits into from
Nov 14, 2018

Conversation

skandragon
Copy link
Contributor

While I would like a more general approach, and this is not quite as clean as I'd like, it's a step toward getting things closer to sane.

I don't yet have metrics wired up, but will add this eventually; I may also split out the "call this method until it stops throwing exceptions" type of call now into a more sane context (http, atlas) aware retry system. For now, this will work better than what was there.

@@ -29,7 +29,7 @@
import com.netflix.kayenta.security.AccountCredentialsRepository;
import com.netflix.kayenta.storage.ObjectType;
import com.netflix.kayenta.storage.StorageService;
import com.netflix.spinnaker.kork.core.RetrySupport;
import com.netflix.kayenta.util.Retry;
Copy link
Collaborator

Choose a reason for hiding this comment

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

It occurred to me after I finished reviewing the PR that I had seen this logic before. I search kayenta on github and ended up back at this file. Wouldn't it make more sense to just add the new logic to the existing RetrySupport class in kork?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a temporary step along the path to make things more context aware, so I'd prefer to keep it inside kayenta for now.

@skandragon skandragon merged commit 4375fe7 into spinnaker:master Nov 14, 2018
@skandragon skandragon deleted the retries-take-two branch November 14, 2018 22:11

import java.util.function.Supplier;

public class Retry {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please have a look at spring-retry.
It might be a good solution in case there is a need for more sophisticated retry policies: like configuring which types of exceptions should be retried, adding retry metrics or providing different backoff policies.

ybai2-sc pushed a commit to ybai2-sc/kayenta that referenced this pull request Dec 20, 2018
* feat(retry): add a retry util

* bug(retry): retry Atlas actions

* bug(retry): improve retry in ConfigBin

* bug(retry): retry some s3 calls that seem prone to failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants