Forward port of #41614 to 3.4.x

Comment From: philwebb

We won't do this one as a merge commit since most of the process is automated and it's easier to reapply it.