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

Wait between retries when launching stories tab. #218

Merged
merged 1 commit into from
Mar 25, 2020
Merged

Wait between retries when launching stories tab. #218

merged 1 commit into from
Mar 25, 2020

Conversation

kristof-mattei
Copy link
Contributor

This fixes a common failure when doing loki on CircleCI.

Over 100 runs:

  • 100 times would fail the first time (caught by the withRetries(2)
  • 90 times would work the second time
  • 10 times it would fail the second time

This tries to fix 10% of the cases.

Over the last 2 weeks we have been testing this patch (> 200 builds) and have had ZERO failures!

@kristof-mattei
Copy link
Contributor Author

Any comment on this?

@@ -17,6 +17,7 @@ const {
} = require('@loki/core');
const presets = require('./presets.json');

const RETRY_LOADING_STORIES_TIMEOUT = 10000;
Copy link
Owner

Choose a reason for hiding this comment

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

This value seems a bit high, how did you come up with it?

Copy link
Owner

Choose a reason for hiding this comment

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

I'll merge it as is now and we can follow up with tweaks if needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would’ve taken a lower value, but I would only do that if we did something like an exponential back off, start slow and iterate maybe 10 times, doubling the wait every time.

@oblador oblador merged commit 7128c7b into oblador:master Mar 25, 2020
@oblador
Copy link
Owner

oblador commented Mar 25, 2020

Released in [0.20.2](https://github.com/oblador/loki/releases/tag/v0.20.2].

@kristof-mattei kristof-mattei deleted the wait-a-little-on-docker branch March 26, 2020 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants