aws: s3sink: Add a deprecation warning for retry duration properties

Keeping the upload-part-retry-duration & complete-upload-retry-duration
properties changes the semantics in comparison to their usage in
rusotos3sink. Deprecate these two properties and add a warning while
making them noop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/759>
This commit is contained in:
Sanchayan Maity 2022-06-06 18:57:50 +05:30 committed by Sebastian Dröge
parent 511ee766df
commit 19f69614a2

View file

@ -834,7 +834,7 @@ impl ObjectImpl for S3Sink {
settings.request_timeout =
duration_from_millis(value.get::<i64>().expect("type checked upstream"));
}
"retry-duration" | "upload-part-retry-duration" | "complete-upload-retry-duration" => {
"retry-duration" => {
/*
* To maintain backwards compatibility calculate retry attempts
* by dividing the provided duration from request timeout.
@ -848,6 +848,9 @@ impl ObjectImpl for S3Sink {
};
settings.retry_attempts = retry_attempts as u32;
}
"upload-part-retry-duration" | "complete-upload-retry-duration" => {
gst::warning!(CAT, "Use retry-attempts. retry/upload-part/complete-upload-retry duration are deprecated.");
}
_ => unimplemented!(),
}
}