refactor(transcoding): rename EnableTranscodingCancellation to Transcoding.EnableCancellation (#5523)

Move the option into the nested Transcoding config group alongside the
limit knobs it interacts with, so all transcoding-related settings live
together.

The old top-level name is still honored via the existing
mapDeprecatedOption / logDeprecatedOptions plumbing, which forwards the
value to the new key and logs a deprecation warning at startup. The old
struct field is removed (the new field is the single source of truth);
the deprecated default is removed so viper.IsSet correctly distinguishes
"user set the legacy option" from "no one set it."
This commit is contained in:
Deluan Quintão 2026-05-24 00:51:58 -03:00 • committed by GitHub
commit 823d851b75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 5 deletions

View file

@ -248,10 +248,10 @@ func NewTranscodingCache() TranscodingCache {
// the DoS the limiter is meant to prevent.
//
// When the limiter is disabled, preserve the legacy behavior
// governed by EnableTranscodingCancellation so this PR does not
// change observable behavior for operators who have not opted in.
// governed by Transcoding.EnableCancellation so unchanged configs
// keep their previous observable behavior.
var transcodingCtx context.Context
if job.ms.limiter.Enabled() || conf.Server.EnableTranscodingCancellation {
if job.ms.limiter.Enabled() || conf.Server.Transcoding.EnableCancellation {
transcodingCtx = ctx
} else {
transcodingCtx = request.AddValues(context.Background(), ctx)