More secret fixes

This commit is contained in:
crschnick 2024-02-27 06:05:32 +00:00
parent 6e64cdb96e
commit cc2e0a6198

View file

@ -55,8 +55,6 @@ public class SecretQueryProgress {
}
var firstSeenIndex = seenPrompts.indexOf(prompt);
var ref = new SecretReference(storeId, firstSeenIndex);
if (firstSeenIndex >= suppliers.size()) {
countDown.pause();
var r = fallback.query(prompt);
@ -65,12 +63,10 @@ public class SecretQueryProgress {
requestCancelled = true;
return null;
}
if (shouldCache(fallback, prompt)) {
SecretManager.set(ref, r.getSecret());
}
return r.getSecret();
}
var ref = new SecretReference(storeId, firstSeenIndex);
var sup = suppliers.get(firstSeenIndex);
var shouldCache = shouldCache(sup, prompt);
var wasLastPrompt = firstSeenIndex == seenPrompts.size() - 1;