OpenCue icon indicating copy to clipboard operation
OpenCue copied to clipboard

[cuebot] Automatically replace --log.frame-log-root with the new flag.

Open bcipriano opened this issue 3 years ago • 0 comments

The log.frame-log-root setting has been replaced with OS-specific flags e.g. log.frame-log-root.default_os.

If users don't switch to using the new flag, this can cause an issue:

  • If the new flag isn't provided, it will be set with a default value of /shots.
  • If the old flag is provided, it will be silently ignored. The resulting behavior is that RQD will try to write log files to a subdirectory of /shots. This is unexpected and potentially dangerous as it creates filesystem changes.

It appears we can't support both old and new flags at the same time, likely because the new flags use log.frame-log-root.* as a base.

The solution I've found is contained here. We intercept argv and check it for the removed flag. If it's present, and the new flags are not, we log a warning and swap in the provided value into the closest match, which is log.frame-log-root.default_os.

This logic can be removed in the future once users have been notified and had a chance to switch to the new flags.

bcipriano avatar Sep 19 '22 17:09 bcipriano