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

Promtail: Fix retry/stop when erroring for out of cloudflare retention range (e.g. over 168 hours old) #5698

Merged

Conversation

paullryan
Copy link
Contributor

What this PR does / why we need it:
Fixes the new cloudflare scrape in promtail for when loki tries to pull logs that are older than 168 hours, this is not allowed by the cloudflare api and right now is causing loki to stop reading logs in the future instead of ignoring and moving on.

Which issue(s) this PR fixes:
Fixes #5696

Special notes for your reviewer:

@cyriltovena I'm unsure if I missed a case here, please let me know.

Checklist

  • [N/A] Documentation added
  • Tests updated
  • Add an entry in the CHANGELOG.md about the changes.

@paullryan paullryan requested a review from a team as a code owner March 22, 2022 17:31
@CLAassistant
Copy link

CLAassistant commented Mar 22, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@jeschkies jeschkies 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 fixing it 🙂

clients/pkg/promtail/targets/cloudflare/target.go Outdated Show resolved Hide resolved
clients/pkg/promtail/targets/cloudflare/target.go Outdated Show resolved Hide resolved
@paullryan
Copy link
Contributor Author

@dannykopping or @jeschkies not sure about the recent test failure appears to be a cleanup issue with that one run, any way to restart it without changing something in code?

CHANGELOG.md Outdated Show resolved Hide resolved
clients/pkg/promtail/targets/cloudflare/target.go Outdated Show resolved Hide resolved
@paullryan
Copy link
Contributor Author

@dannykopping, @cstyan or @jeschkies anything else you need me to do to accept this?

Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

LGTM, will merge once CI completes.

Thanks for your patience on this one @paullryan and for the fix!

@dannykopping
Copy link
Contributor

CI has completed, but GH is not acknowledging its completion; merging in spite of this...

@dannykopping dannykopping merged commit 4e3f3b7 into grafana:main Mar 29, 2022
@paullryan
Copy link
Contributor Author

@dannykopping thank you for working with me to complete this will be very helpful in my org.

@paullryan paullryan deleted the fix/5696-cloudflare-168h-error branch March 29, 2022 16:00
@slim-bean slim-bean added the backport release-2.5.x Tag a PR with this label to create a PR which cherry pics it into the release-2.5.x branch label Apr 6, 2022
grafanabot pushed a commit that referenced this pull request Apr 6, 2022
…n range (e.g. over 168 hours old) (#5698)

* fix: 5696 don't retry when out of range for cloudflare

(cherry picked from commit 4e3f3b7)
slim-bean pushed a commit that referenced this pull request Apr 6, 2022
…n range (e.g. over 168 hours old) (#5698) (#5782)

* fix: 5696 don't retry when out of range for cloudflare

(cherry picked from commit 4e3f3b7)

Co-authored-by: Paul Ryan <[email protected]>
splitice pushed a commit to X4BNet/loki that referenced this pull request May 21, 2022
…n range (e.g. over 168 hours old) (grafana#5698) (grafana#5782)

* fix: 5696 don't retry when out of range for cloudflare

(cherry picked from commit 4e3f3b7)

Co-authored-by: Paul Ryan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-2.5.x Tag a PR with this label to create a PR which cherry pics it into the release-2.5.x branch size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cloudflare stops running after 168 hours
6 participants