Skip to content

Remove the #285 legacy consumer-group migration once broker#1 lands #286

Description

@gregoryfoster

Cleanup left behind by #285. src/workers/fetch_facts.py carries a one-time migration that renames the pre-#285 bare watcher consumer group to watcher.blobs:

  • LEGACY_CONSUMER_GROUP = "watcher"
  • migrate_legacy_group() and its _group_text / _stream_position helpers
  • the call site in run_blobs_consumer, before ensure_group
  • TestLegacyGroupMigration in tests/workers/test_fetch_facts.py

It ran on the live broker on 2026-09-03 and is a permanent no-op since — every boot takes the no_legacy_group path.

Why it is not deletable yet

The broker relocation (#282, CannObserv/broker#1) can stand up a node from an RDB that still carries the old watcher group. If it does, the migration is exactly what keeps that harmless: without it, a Watcher whose constant already says watcher.blobs calls ensure_group(start_id="$"), mints at the tail, and drops every fact published in the gap with no error, no PEL and no lag. That is the failure mode #285 wrote this code to remove, and it is live again for as long as an old-group RDB can reappear.

So: delete after CannObserv/broker#1 completes and the relocated broker is confirmed carrying watcher.blobs only. Not before.

Done when

  • The four bullets above are gone.
  • docs/ARCHITECTURE.mdRedis and the bus loses the migrate_legacy_group paragraph but keeps the derived-group-name rule (group_name, no purpose segment) — that is the standing convention, not migration scaffolding.
  • The #285 comment on CONSUMER_GROUP stays; the one on LEGACY_CONSUMER_GROUP goes with it.
  • tests/test_bus_stream_kinds.py stays untouched. It enforces co-core's stream taxonomy against src/ — reader class vs. stream_kind, group_name derivation, config/state maxlen — and has nothing to do with the migration. Same for the ARCHITECTURE paragraph describing it: the trim removes the migration prose beside it, not this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions