Skip to content

feat(previews): retry errored previews if feature flag enabled #4498

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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

iainsproat
Copy link
Contributor

@iainsproat iainsproat commented Apr 18, 2025

Description & motivation

For various reasons the preview service can return an error response. It will not be retried.

This provides a simple retry mechanism. Running as a scheduled task ("cronjob"), every 5 minutes it finds the most recent errored preview (one for each connected regional database). It resets the preview request to pending and queues a job to be processed by the preview service.

It maintains a simple in-memory record of the last errored preview it retried for each database, ensuring it progresses to the next most recent on the next scheduled run.

Changes:

  • adds a new feature flag FF_RETRY_ERRORED_PREVIEWS_ENABLED

To-do before merge:

  • test in a testing environment
    • test it works for no previews to retry
    • test it works for some errored previews to retry
  • test in latest

Screenshots:

Validation of changes:

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

References

Copy link

linear bot commented Apr 18, 2025

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.

1 participant