Ruby 2.5 added an Net::HTTP#max_retries= method to disable this. We should do that. See https://bugs.ruby-lang.org/issues/10674
Merged to 6.0.x in https://github.com/puppetlabs/puppet/commit/d942eb18399bc4172981dd26984419dd9967523f
Passed CI in d942eb1.