AcademySoftwareFoundation / OpenCue

A render management system you can deploy for visual effects and animation productions.
https://www.opencue.io
Apache License 2.0
833 stars 203 forks source link

[rqd] [cuegui] Consolidate log read and write into a single package #1474

Closed lithorus closed 18 hours ago

lithorus commented 3 months ago

Summarize your change. This moves log reading and writing into a single package, to make it easier to support multiple backends in a single place.

LogViewPlugin.LogReader and rqdlogging.RQDLogger have been replaced with cuelogging.CueLogReader and cuelogging.CueLogWriter

rqd.compiled_proto has also been replaced with opencue.compiled_proto in rqd

Have also updated tests and documentation.

lithorus commented 3 months ago

Now that I'm looking at your proposal materialized, I have some concerns about how it will impact the project in the future.

* Up until now, rqd was independent of pycue, which means the only contract they had in common was the protobuf layer (Loose coupling). With this change, they now share modules, which is good for reusability, but increases the coupling. If we had a great portion of code being reused, maybe the tradeoff would be fair, but so far we're only reusing cuelogging on READ mode. Which brings me to my next concern

* On cuelogging we're exposing the WRITE mode to pycue, which doesn't have any use for it. This would be harmless if we didn't have artists that like to program and hack things, I can easily see an user of the API accidentally initializing `CueLogger` in WRITE mode and inadvertently triggering a log rotate (which is part of the `__init__` function).

I'm really sorry I didn't catch this concerns on the design phase, but I do think keeping pycue(opencue) and rqd as separate modules that only communicate via protobuf weights heavier on the tradeoff between reuse and coupling.

No worries. I think I've re-written this a few times already :)

lithorus commented 2 months ago

Had to move the cuelogging outside of the opencue package so the protobuf's doesn't conflict with each other, but have re-added the compiled_proto to rqd

lithorus commented 1 month ago

analize_cuebot

I added the analyze_python (I guess that's the one you meant?) Edit: Looks like it needs a bit of modifiations...