Skip to content

smoketest_config.json sets "discovery": null, so the simulator never appears in an mDNS browse #3

Description

@markzporter

What happens

Started from config/smoketest_config.json, the connector's SiLA server comes
up and serves normally — it answers a direct exploration on 127.0.0.1:50051
with all 14 implemented features — but it never registers an mDNS service, so
no SiLA discovery client can find it.

Why

config/smoketest_config.json sets:

"discovery": null

The CDK declares discovery: DiscoveryConfig | None
(unitelabs/cdk/config/connector_base_config.py:221, class at :205), so
null disables the network announcement entirely.

The OT-2 connector's equivalent config
(sila2_ot2/opentrons-ot2/config/ot2_smoketest_config.json) instead sets:

"discovery": { "ip_version": "ipv4", "network_interfaces": [] }

and that simulator is discovered normally. The two configs are otherwise
structurally identical, including hostname on loopback — so this is the one
key that differs, not a version or bind-address effect. For reference, the
versions in each venv are near-identical too: flex unitelabs-cdk 0.9.0 /
unitelabs-sila 0.7.6, ot2 unitelabs-cdk 0.9.0 / unitelabs-sila 0.7.5.

Reproduce

connector start --app unitelabs.opentrons_flex:create_app \
  -cfg config/smoketest_config.json -vvv

Then browse, e.g. with the uoroboros SiLA toolkit:

uoroboros sila discover                 # the Flex is absent
uoroboros sila explore 127.0.0.1:50051  # works: "Opentrons Flex Smoketest", 14 features

dns-sd -B _sila._tcp local shows no announcement from the connector.

Impact

Any discovery-based client sees the lab one instrument short. With the OT-2 and
i2rt YAM simulators running alongside, an mDNS browse returns 2 of 3, and the
Flex can only be reached by typing its host and port. This also affects the
i2rt-yam-style pattern of locating a connector by announced name rather than
a configured address.

Suggested fix

Enable discovery in the smoketest config, matching the OT-2's block:

-  "discovery": null,
+  "discovery": {
+    "ip_version": "ipv4",
+    "network_interfaces": []
+  },

If null is deliberate — to keep a simulator from advertising itself on a lab
network — then it would help to say so in the file, and perhaps ship a second
config (e.g. smoketest_discoverable_config.json) for the discovery case, so
local testing does not need an override.

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