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

Make CDN purging more robust #831

Closed
tobias opened this issue Jun 4, 2022 · 2 comments · Fixed by #837
Closed

Make CDN purging more robust #831

tobias opened this issue Jun 4, 2022 · 2 comments · Fixed by #837

Comments

@tobias
Copy link
Member

tobias commented Jun 4, 2022

We purge files from the CDN on deploy to prevent stale maven-metadata.xml files (and their checksum files). But we do this in a future to not delay the deploy, and there is no error handling around that. So if it fails we don't know about it and there is stale data in the cache.

We should:

  • track failures
  • add retry logic
tobias added a commit that referenced this issue Jun 6, 2022
This will at least allow us to see when they happen and address
manually. We'll do later work to add retries if we are seeing failures.

Related to #831.
@zerg000000
Copy link

Any hints on resolving this issue?

Here is a few directions I can think of

  1. submit to in memory job queue, a background thread to purge the files. We can do error handling and retry, we can have more fine-grained control, like de-duplication / rate limit / throttle in this way. would need some refactoring.
  2. add retry logic in the future. Get the job done, but don't have much control.
  3. using resilience4j? less home baked retry logic, but we have one more dependency and at least two more components.

@tobias
Copy link
Member Author

tobias commented Jun 16, 2022

Hi @zerg000000! Thanks for taking a look at this.

I think it would be fine to do a simple retry in the future (option 2). I've seen no Sentry reports of purge failures since adding reporting, so I think failures here are rare.

A simple backoff/retry strategy would work. I think we should still report each failure to sentry even when we retry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants