This is backporting the change from PR #8609 into v0.34 as the CI is broken right now due to an old version of buf.