[cuebot] Automatically replace --log.frame-log-root with the new flag. #1203
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
/shots
.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 islog.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.