Merge pull request #1095 from navi-infra/INFRA-3572
INFRA-3572 | Dhruv | Add logs and move logManifestDifference function post manifest save
This commit is contained in:
@@ -161,7 +161,6 @@ public class ManifestService {
|
||||
|
||||
private void logManifestDifference(Manifest newManifest, Manifest oldManifest) {
|
||||
String username = userService.getCurrentUsername();
|
||||
newManifest = removeAllSecrets(newManifest);
|
||||
Map<String, Object> newManifestMap = newManifest.convertToMap();
|
||||
if (oldManifest == null) {
|
||||
log.info("MANIFEST CREATED by {}, createdManifest = {}", username, newManifestMap);
|
||||
@@ -280,10 +279,10 @@ public class ManifestService {
|
||||
|
||||
final Manifest newManifest;
|
||||
if (hasDifference(difference)) {
|
||||
logManifestDifference(manifest, oldManifest);
|
||||
processLoadBalancers(manifest, oldManifest);
|
||||
newManifest = saveManifestWithoutSecrets(manifest);
|
||||
newManifest.addRedactedValuesToSuperSecrets();
|
||||
logManifestDifference(manifest, oldManifest);
|
||||
} else {
|
||||
newManifest = manifest;
|
||||
}
|
||||
@@ -730,7 +729,7 @@ public class ManifestService {
|
||||
if (!vaultResponse.isOk()) {
|
||||
throw new RuntimeException(
|
||||
format("Unable to fetch secrets from vault path=%s, version=%d, HTTP STATUS: %s",
|
||||
path, version.intValue(), vaultResponse.getHttpStatus()));
|
||||
path, version, vaultResponse.getHttpStatus()));
|
||||
}
|
||||
return vaultResponse.getData();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user