udmi

UDMI / Docs / Tools / Sharding

Sharding Sequencer

It’s possible to run sequencer on an alternate set of project registries, called shards. This is useful for testing things from the same site model in parallel, since currently there can only be one instance of any tool using the reflector running on each registry.

Operation

Basic operation is determined by a specified registry suffix (e.g. _A) that triggers all (ideally) tools to automatically append the suffix to any actual registry operation. Tools should automatically pick this up from the UDMI_REGISTRY_SUFFIX env variable, and if it’s not set then it will default back to normal (no suffix) behavior.

E.g., on tool startup, instead of the normal MQTT client connection message:

[main] INFO com.google.bos.iot.core.proxy.MqttPublisher - ZZ-REDIRECT-NA creating client projects/bos-peringknife-dev/locations/us-central1/registries/UDMI-REFLECT/devices/ZZ-REDIRECT-NA on ssl://mqtt.googleapis.com:8883

a system with a registry suffix setting of _A would show:

[main] INFO com.google.bos.iot.core.proxy.MqttPublisher - ZZ-REDIRECT-NA_A creating client projects/bos-peringknife-dev/locations/us-central1/registries/UDMI-REFLECT/devices/ZZ-REDIRECT-NA_A on ssl://mqtt.googleapis.com:8883

Setup

CI Workflow

If the UDMI_REGISTRY_SUFFIX is defined as a GitHub Actions variable, the workflow will automatically skip bin/test_sequencer in the main flow, and instead run it in a parallel sequencer-only flow. The “skipped” step will still show up but not executed.