Skip to content

[ENG-9706] support osfmetrics migration#96

Merged
aaxelb merged 22 commits into
mainfrom
9706-support-osfmetrics-migration
May 14, 2026
Merged

[ENG-9706] support osfmetrics migration#96
aaxelb merged 22 commits into
mainfrom
9706-support-osfmetrics-migration

Conversation

@aaxelb

@aaxelb aaxelb commented Apr 14, 2026

Copy link
Copy Markdown
Collaborator
  • 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)
@aaxelb aaxelb marked this pull request as ready for review May 14, 2026 17:32
@aaxelb aaxelb merged commit 709ff1d into main May 14, 2026
32 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.

1 participant