I'm splitting this MR in two: !1858 Only last commit is relevant here until the previous MR is merged
/cc @tomo @xavier_thompson