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

Add script for retrying all missed job webhooks #1049

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mvandenburgh
Copy link
Member

@mvandenburgh mvandenburgh commented Jan 30, 2025

This adds a Django management script that

  1. Queries the web_hook_logs table of the GitLab DB for all webhook events in the past n seconds (n is an argument to the script)
  2. Cross checks each of those rows with the Analytics DB, to figure out if any jobs had webhooks fired but do not exist in the analytics DB (i.e. jobs that were "missed" for any reason)
  3. Uses the GitLab API to resend those webhook events.

I've ran variations of this script in the past to retry missed job webhooks after fixing bugs in the webhook handler, downtime of the webhook handler, etc. and it works.

@mvandenburgh mvandenburgh force-pushed the webhook-backfill-script branch 2 times, most recently from 5eee9e9 to d13a646 Compare January 30, 2025 23:58
@mvandenburgh mvandenburgh force-pushed the webhook-backfill-script branch from d13a646 to b234057 Compare February 6, 2025 20:40
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