mirror of
https://github.com/hashicorp/vault-action.git
synced 2025-11-10 08:36:55 +00:00
Retry on 412 status codes
This commit is contained in:
parent
ad04ab9377
commit
1bcd0991cf
2 changed files with 13 additions and 1 deletions
|
|
@ -1,5 +1,9 @@
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
Bugs:
|
||||||
|
|
||||||
|
* Errors due to replication delay for tokens will now be retried [GH-333](https://github.com/hashicorp/vault-action/pull/333)
|
||||||
|
|
||||||
## 2.4.1 (April 28th, 2022)
|
## 2.4.1 (April 28th, 2022)
|
||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,15 @@ async function exportSecrets() {
|
||||||
const defaultOptions = {
|
const defaultOptions = {
|
||||||
prefixUrl: vaultUrl,
|
prefixUrl: vaultUrl,
|
||||||
headers: {},
|
headers: {},
|
||||||
https: {}
|
https: {},
|
||||||
|
retry: {
|
||||||
|
statusCodes: [
|
||||||
|
...got.defaults.options.retry.statusCodes,
|
||||||
|
// Vault returns 412 when the token in use hasn't yet been replicated
|
||||||
|
// to the performance replica queried. See issue #332.
|
||||||
|
412,
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const tlsSkipVerify = (core.getInput('tlsSkipVerify', { required: false }) || 'false').toLowerCase() != 'false';
|
const tlsSkipVerify = (core.getInput('tlsSkipVerify', { required: false }) || 'false').toLowerCase() != 'false';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue