loki icon indicating copy to clipboard operation
loki copied to clipboard

logcli: Added exponential backoff for retries

Open LaserPhaser opened this issue 2 years ago • 10 comments

Added new option for configuring wait time between retries

What this PR does / why we need it: In case of errors on server side we may need for a while to do the retry properly.

Checklist

  • [x] Documentation added
  • [ ] Tests updated
  • [ ] Is this an important fix or new feature? Add an entry in the CHANGELOG.md.
  • [ ] Changes that require user attention or interaction to upgrade are documented in docs/sources/upgrading/_index.md

LaserPhaser avatar Sep 14 '22 09:09 LaserPhaser

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 14 '22 09:09 CLAassistant

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

grafanabot avatar Sep 14 '22 09:09 grafanabot

Hey thanks for your contribution, looks great!

One suggestion: I think this looks more like a cooldown than a timeout. WDYT?

DylanGuedes avatar Sep 14 '22 12:09 DylanGuedes

Hey thanks for your contribution, looks great!

One suggestion: I think this looks more like a cooldown than a timeout. WDYT?

Sure will change it in a hour.

LaserPhaser avatar Sep 14 '22 12:09 LaserPhaser

Hey thanks for your contribution, looks great!

One suggestion: I think this looks more like a cooldown than a timeout. WDYT?

done

LaserPhaser avatar Sep 14 '22 13:09 LaserPhaser

@DylanGuedes could you please help to understand the reason of the fail It's related to the

github.com/grafana/loki/clients/pkg/promtail/targets/gcplog

Which could no be affected by logcli changes afaik.

LaserPhaser avatar Sep 15 '22 07:09 LaserPhaser

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

grafanabot avatar Sep 15 '22 10:09 grafanabot

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0%
+               loki	0%

grafanabot avatar Sep 15 '22 11:09 grafanabot

./tools/diff_coverage.sh ../loki-main/test_results.txt test_results.txt ingester,distributor,querier,querier/queryrange,iter,storage,chunkenc,logql,loki

Change in test coverage per package. Green indicates 0 or positive change, red indicates that test coverage for a package fell.

+           ingester	0%
+        distributor	0%
+            querier	0%
+ querier/queryrange	0%
+               iter	0%
+            storage	0%
+           chunkenc	0%
+              logql	0.4%
+               loki	0%

grafanabot avatar Sep 15 '22 12:09 grafanabot

@jeschkies LGTM?

LaserPhaser avatar Sep 21 '22 15:09 LaserPhaser

Hi! This issue has been automatically marked as stale because it has not had any activity in the past 30 days.

We use a stalebot among other tools to help manage the state of issues in this project. A stalebot can be very useful in closing issues in a number of cases; the most common is closing issues or PRs where the original reporter has not responded.

Stalebots are also emotionless and cruel and can close issues which are still very relevant.

If this issue is important to you, please add a comment to keep it open. More importantly, please add a thumbs-up to the original issue entry.

We regularly sort for closed issues which have a stale label sorted by thumbs up.

We may also:

  • Mark issues as revivable if we think it's a valid issue but isn't something we are likely to prioritize in the future (the issue will still remain closed).
  • Add a keepalive label to silence the stalebot if the issue is very common/popular/important.

We are doing our best to respond, organize, and prioritize all issues but it can be a challenging task, our sincere apologies if you find yourself at the mercy of the stalebot.

stale[bot] avatar Nov 02 '22 07:11 stale[bot]

@LaserPhaser Thanks for your contribution! I botched the merge when updating. You've clearly put a lot of work into this and I don't want you to fix my mistakes so here's PR with the merge fix: https://github.com/grafana/loki/pull/7579

If you want to fix it on this branch, feel free and I'll merge it

MasslessParticle avatar Nov 02 '22 17:11 MasslessParticle

merged! Thanks again!

MasslessParticle avatar Nov 02 '22 17:11 MasslessParticle