Skip to content

Factor shared index helpers out of indexror and indexrordump - #573

Draft
jrhoads wants to merge 1 commit into
devfrom
quickwin/index-helpers
Draft

jrhoads wants to merge 1 commit into
devfrom
quickwin/index-helpers

Conversation

@jrhoads

@jrhoads jrhoads commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Extract duplicated get_affiliation_match_doc, names/ids builders, and the shared bulk-with-backup loop from indexror / indexrordump into rorapi.common.index_helpers.
  • Keep a single _bulk / injectable bulk= hook so Add retry logic and improve backup and rollback for Elasticsearch indexing #559’s bulk_with_retry can plug in later without inventing a parallel es_bulk.py.
  • Add unit tests for the builders and backup/rollback loop.

Does not overlap the resiliency work in #559 (retry + setup backup); that PR leaves these helpers duplicated.

Test plan

  • CI tests_unit on this PR
  • Local: manage.py test rorapi.tests.tests_unit.tests_index_helpers (7 tests OK)
Open in Web Open in Cursor 

@cursor
cursor Bot force-pushed the quickwin/index-helpers branch from 323cdce to b4fdeac Compare September 25, 2026 14:33
Move affiliation-match / names-ids builders and the bulk-with-backup
loop into rorapi.common.index_helpers so both management commands share
one implementation. Leave a single _bulk hook for composing with the
retry wrapper from reindex-resilience (#559) without duplicating
es_bulk.py.

Co-authored-by: Joseph Rhoads <jrhoads@users.noreply.github.com>
@cursor
cursor Bot force-pushed the quickwin/index-helpers branch from b4fdeac to 33f7601 Compare September 25, 2026 14:39
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.

2 participants