Skip to content

[Feature][ENG-9691] osfmetrics elastic-6-to-8 migration (part 1)#11700

Merged
aaxelb merged 123 commits into
developfrom
feature/9691-osfmetrics-migration
May 14, 2026
Merged

[Feature][ENG-9691] osfmetrics elastic-6-to-8 migration (part 1)#11700
aaxelb merged 123 commits into
developfrom
feature/9691-osfmetrics-migration

Conversation

@aaxelb
Copy link
Copy Markdown
Collaborator

@aaxelb aaxelb commented Apr 21, 2026

Ticket

  • ENG-9691

Purpose

migrate osf-metrics data from elasticsearch6 to elasticsearch8

Changes

  • upgrade django-elasticsearch-metrics dependency to support elastic8 and multiple backends at once
  • add elasticsearch8 service to local dockec-compose setup
  • add elastic8 indexes to migrate to (osf.metrics.es8_metrics)
  • save new osfmetrics data in both 6 and 8 (usage events and periodic reports)
  • add migrate_osfmetrics_6to8 management command to migrate older data
    • add osf-admin view to run command via web
  • add /_/metrics/raw-<djelme_backend>/ api endpoint (with same constraints as existing /_/metrics/raw/) to allow inspecting both es6 and es8 djelme indexes

Side Effects

QE Notes

should have no user-visible changes -- worth checking osfmetrics-based features for regressions:

  • preprint view/download counts
  • project/registration analytics page
  • osf metrics api /_/metrics/reports…
  • institution dashboard summary and ‘users’ tab

CE Notes

  • no django migrations, but should run sync_databases to set up index templates in es8
  • manage.py migrate_osfmetrics_6to8
    • without args, compares counts in es6 and es8 (makes no changes)
    • run with --start to schedule celery tasks to do the data migration (and record the start time)
    • add --no-counts to skip counting, in case that's slow
    • check the backround_migration rabbit queue for a more direct view on migration progress -- done when empty

Documentation

@aaxelb aaxelb marked this pull request as ready for review April 30, 2026 16:26
@aaxelb aaxelb requested a review from felliott May 14, 2026 15:10
Copy link
Copy Markdown
Member

@felliott felliott left a comment

Choose a reason for hiding this comment

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

what a delightful morsel! i approve.

@aaxelb aaxelb merged commit a565b3a into develop May 14, 2026
16 checks passed
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.

3 participants