Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discovery Client: do not fall back to FQDN as service name #5984

Closed
mcous opened this issue Jun 23, 2020 · 1 comment
Closed

Discovery Client: do not fall back to FQDN as service name #5984

mcous opened this issue Jun 23, 2020 · 1 comment
Labels
app Affects the `app` project bug robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience).
Milestone

Comments

@mcous
Copy link
Contributor

mcous commented Jun 23, 2020

overview

An MDNS advertisement from a robot has (among other things) the following properties:

  • A Fully Qualified Domain Name (e.g. robot-name._http._tcp.local
  • Service types (e.g. { 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:

  • Make shortname extraction more lenient and therefor more reslient to failure
    • For example, rather than relying on the service advertisement to know we need to remove a trailing _http._tcp, we can just hardcode that into the extractor because we're only every querying for HTTP services
  • Increase logging of service advertisements to better diagnose these sorts of issues in the future
@mcous mcous added bug app Affects the `app` project robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience). labels Jun 23, 2020
@mcous mcous added this to the CPX Sprint 12 milestone Jun 23, 2020
@mcous mcous modified the milestones: CPX Sprint 12, CPX Sprint 13 Jul 7, 2020
@mcous
Copy link
Contributor Author

mcous commented Jul 21, 2020

Closed by #6154 , will make it to the app in a future wire-up PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Affects the `app` project bug robot-svcs Falls under the purview of the Robot Services squad (formerly CPX, Core Platform Experience).
Projects
None yet
Development

No branches or pull requests

1 participant