Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(client): do not cache credentialFuncs for unconfigured repositories
When we create the http client for a given repository the code checks if it is somehow configured. It caches a function called `credentialFunction`. This function knows how to retrieve the credentials for a given repository. For unconfigured repositories, or repositories that fail to get valid credentials using their `credentialFunction,` we cache an `emptyCredential function`. This causes trouble in case of transient errors causing the client to not recover. This commit avoids caching the `emptyCredential function` in such cases or for unconfigured repositories. Signed-off-by: Aldo Lacuku <[email protected]>
- Loading branch information