Skip to content

[ENG-9706] support osfmetrics migration#96

Draft
aaxelb wants to merge 21 commits intomainfrom
9706-support-osfmetrics-migration
Draft

[ENG-9706] support osfmetrics migration#96
aaxelb wants to merge 21 commits intomainfrom
9706-support-osfmetrics-migration

Conversation

@aaxelb
Copy link
Copy Markdown
Collaborator

@aaxelb aaxelb commented Apr 14, 2026

  • bump gh action versions
  • remove DJELME_AUTOSETUP setting
  • elasticsearch_metrics.imps.elastic8 updates:
    • add require_been_setup check (cached) on first save for each record type
    • move field/id autofill to .clean() (for use with bulk save)
    • renames:
      • DjelmeRecordtype to BaseDjelmeRecord
      • Meta.timeseries_name_prefix to Meta.index_name_prefix
      • Meta.timedepth to Meta.timeseries_index_timedepth (contrast CyclicRecord's "cycle timedepth")
      • .refresh_timeseries_indexes() to simply .refresh()
      • .get_timeseries_index_prefix() to .get_index_name_prefix()
      • session_id to client_session_id kwarg in CountedUsageRecord.record(...)
    • add SimpleRecord abstract record type that has a single index, for non-timeseries djelme conveniences
  • more consistent error handling in djelme_backend_check command
  • allow giving non-now timestamp to opaque_session_key (for COUNTER session-hour)
  • more thorough tests
  • add elasticsearch_metrics.tests.util
    • djelme_test_backends() context manager, to setup/teardown with random index-name prefixes
    • several unittest.TestCase subclasses to base tests on
  • various code cleanup...

aaxelb added 9 commits April 15, 2026 15:59
and use given timestamp
having learned something about python imports today...

turns out this gives an AttributeError:
```
import unittest
unittest.mock
```
...unless something somewhere (maybe another module) has already done
`from unittest import mock` (or `import unittest.mock`), after which
`unittest`, however and wherever it's imported, does have a `mock` attr

(fair enough within a module, but boo to the inter-module side effect)
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