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

feat: republish failed events from csv #390

Merged
merged 7 commits into from
Aug 22, 2023

Conversation

rgraber
Copy link
Contributor

@rgraber rgraber commented Aug 10, 2023

Adds a script to republish failed events given a csv with the relevant data (can be obtained via Splunk export or created manually). Requires faking a django environment using tox because edx-event-bus-kafka expects there to be certain Django settings.

To run, create a private.py file in edx_arch_experiments/settings and add all your Kafka configs. Use tox -e scripts -- python edx_arch_experiments/scripts/republish_failed_events.py --filename /Users/rgraber/oneoffs/failed_events.csv. The easiest way to get a good csv of events is to look for "Error delivering message to Kafka event bus | reverse" in Splunk and export the results. Make sure to include the "| reverse" so the spreadsheet will be in ascending chronological order.

The runbook will be updated when the script is merged.

Merge checklist:
Check off if complete or not applicable:

  • Version bumped
  • Changelog record added
  • Documentation updated (not only docstrings)
  • Fixup commits are squashed away
  • Unit tests added/updated
  • Manual testing instructions provided
  • Noted any: Concerns, dependencies, migration issues, deadlines, tickets

@rgraber rgraber marked this pull request as ready for review August 11, 2023 15:39
@rgraber rgraber force-pushed the rsgraber/20230807-republish-failed-events branch from 5725314 to 590f746 Compare August 11, 2023 15:41
requirements/scripts.in Outdated Show resolved Hide resolved
@rgraber rgraber force-pushed the rsgraber/20230807-republish-failed-events branch from 25275c1 to 4d6d191 Compare August 16, 2023 18:38
@rgraber rgraber requested a review from timmc-edx August 21, 2023 12:17
Co-authored-by: Tim McCormack <[email protected]>
Copy link
Member

@timmc-edx timmc-edx left a comment

Choose a reason for hiding this comment

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

Looking good! I assume you've manually tested this?

@rgraber
Copy link
Contributor Author

rgraber commented Aug 22, 2023

Looking good! I assume you've manually tested this?

Yep. Will update to print out sent events.

@rgraber rgraber merged commit 33f3af6 into main Aug 22, 2023
5 checks passed
@rgraber rgraber deleted the rsgraber/20230807-republish-failed-events branch August 22, 2023 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants