rerun icon indicating copy to clipboard operation
rerun copied to clipboard

If launching rerun with a blueprint from the command-line there's no way to send data to the app

Open jleibs opened this issue 1 year ago • 1 comments

We don't appear to start the TCPServer if we pass a local file to rerun on start.

Although we've always had this issue when loading .rrd files from the CLI, the fact that Blueprint files and RRD files combine makes this particularly annoying.

Consider the following workflow:

I've saved a blueprint.

Now I want to run:

rerun my_app.rbl

to restore it (related issue: https://github.com/rerun-io/rerun/issues/5694)

However, because there is no TCPServer running, I can't run an app that connects to it.

jleibs avatar Mar 26 '24 18:03 jleibs

On a related note, I've wanted to be able to use the CLI as a data forwarder tool for a long time, e.g.: rerun my_data.rrd --connect (or, in this instance, rerun my_blueprint.rbl --connect):

  • https://github.com/rerun-io/rerun/issues/2044

teh-cmc avatar Mar 27 '24 08:03 teh-cmc

The easy solution is to always spawn a TCP server when we launch the rerun binary (unless --no-server or whatever), but we must handle the case of an existing Rerun already running, hogging that port.

We can either:

  • Fall back to the 0 port (ask the OS to pick a free one)
  • Log failures on debug (don't bother the user too much)
  • Only warn about a occupied TCP port IF there is NO file arguments (i.e. the user intended to use rerun as a server?)

emilk avatar Apr 02 '24 12:04 emilk