rock-core / tools-syskit

Rock's model-based component management layer
1 stars 14 forks source link

fix: make sure LogUploadState is defined in Remote::Manager #433

Closed doudou closed 2 months ago

doudou commented 2 months ago

It is sent by the server, and if not defined in the Syskit process, leads to a failure at runtime (type does not exist).

doudou commented 2 months ago

Because of this

            # Defined here to make sure it is actually defined. Otherwise, the log
            # state reporting would fail at runtime, and unit-testing for this is
            # very hard.

The type is defined during tests because the server code is required within the process that runs the syskit test suite (since that process does run the server code).

The only way to ensure the test suite would catch it is to run a syskit instance separately with the log transfer enabled and check for log transfer ... I preferred adding a reference to the type in the Manager class to make sure it does not happen again.

The "real fix" would be to start using a proper RPC implementation instead of this shitty handmade protocol ... but that's for another PR ;-)