Retry reactive Vault login after failures#1006
Conversation
Signed-off-by: Goutam Adwant <workwithgoutam@gmail.com>
|
@goutamadwant Just to re-confirm, when the token is refreshed for a failed login, will there be an immediate retry after the token set to empty ? I am asking this as in our case, the scheduler runs a few seconds late , by then the token gets expired and this failure scenario is cached and retried. |
@raghusujju This PR does not start a separate background login immediately after the failed login signal. The failed call still returns the login error. The change is that the cached failed login We have a regression test which covers this with two consecutive token requests: the first login fails, and the second request invokes the token supplier again and succeeds. |
Summary
Issue
Addresses spring-cloud/spring-cloud-vault#940.
Testing
./mvnw -pl spring-vault-core -Dtest=ReactiveLifecycleAwareSessionManagerUnitTests#shouldRetryLoginAfterFailure test./mvnw -pl spring-vault-core -Dtest=ReactiveLifecycleAwareSessionManagerUnitTests testsrc/test/bash/create_certificates.shenv -u SPRING_PROFILES_ACTIVE ./mvnw -pl spring-vault-core test