Closed digivava closed 2 years ago
Taking over this review while Chris is out! Upon further investigation, we don't have any existing tests for any of the retry logic at all 😬
I think the best path forward would be to set up webmock and use that to mock the failing call and response to Vault, then use the allow_net_connect!
option to allow further Vault requests to succeed normally. However, while setting up that testing would be a valuable maintenance backlog item, I'm pretty comfortable saying that it doesn't need to be a blocker for this PR!
I'm going to go ahead and approve (and then we can figure out why the tests are failing at the vault install step 🤔)
Description
The vault-ruby gem now has the ability to retry on 412 errors (caused by a mismatch between the WAL index on a standby node and the token; see Server-Side Consistent Tokens FAQ).
This PR updates the minimum required version of the vault gem and ensures that the vault-rails gem's version of the
with_retries
method passes the new error type (Vault::MissingRequiredStateError
) as something to automatically retry on.