Discovery Client: do not fall back to FQDN as service name #5984
Labels
app
Affects the `app` project
bug
robot-svcs
Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience).
Milestone
overview
An MDNS advertisement from a robot has (among other things) the following properties:
robot-name._http._tcp.local
{ name: 'http', protocol: 'tcp' }
)The discovery client pretty strictly tries to create a regex to strip the trailing service type / domain name information off the FQDN to end up with a shortname in the app. If the short name extraction fails, the Discovery Client will fall back to using the FQDN as the "name" of the service.
This regex is too strict and fails in various edge cases (not all of which are known, due to lack of debugging information in available logs), causing "phantom" duplicate robots to appear in the app with the FQDN of a known robot.
current behavior
Short name extraction from FQDN can fail, causing fallback to FQDN
steps to reproduce
Unknown, but happens often enough to be noticeable by end users
acceptance criteria / implementation details
In fixing this bug, we should have two goals:
_http._tcp
, we can just hardcode that into the extractor because we're only every querying for HTTP servicesThe text was updated successfully, but these errors were encountered: