From 158df6b3d67388ffcb6be04da6b3aa24a04b42d8 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 26 Sep 2024 20:37:33 +0000 Subject: [PATCH 1/2] chore(dependencies): Autobump korkVersion --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 328dd6931..5cb5268b3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -korkVersion=7.239.0 +korkVersion=7.240.0 clouddriverVersion=5.89.0 fiatVersion=1.50.0 front50Version=2.35.0 From a73f88b8fad341481618d9f6d2918c6baf9aacb9 Mon Sep 17 00:00:00 2001 From: Edgar Garcia Date: Thu, 26 Sep 2024 17:45:45 -0600 Subject: [PATCH 2/2] refactor(dependency): replace JacksonFactory to GsonFactory --- .../spinnaker/halyard/backup/kms/v1/google/GoogleKms.java | 4 ++-- .../spinnaker/halyard/backup/kms/v1/google/GoogleStorage.java | 4 ++-- .../halyard/core/registry/v1/GoogleProfileReaderConfig.java | 4 ++-- .../core/registry/v1/GoogleWriteableProfileRegistry.java | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/halyard-backup/src/main/java/com/netflix/spinnaker/halyard/backup/kms/v1/google/GoogleKms.java b/halyard-backup/src/main/java/com/netflix/spinnaker/halyard/backup/kms/v1/google/GoogleKms.java index 08ac01569..cee5c8e76 100644 --- a/halyard-backup/src/main/java/com/netflix/spinnaker/halyard/backup/kms/v1/google/GoogleKms.java +++ b/halyard-backup/src/main/java/com/netflix/spinnaker/halyard/backup/kms/v1/google/GoogleKms.java @@ -22,7 +22,7 @@ import com.google.api.client.http.HttpTransport; import com.google.api.client.http.javanet.NetHttpTransport; import com.google.api.client.json.JsonFactory; -import com.google.api.client.json.jackson2.JacksonFactory; +import com.google.api.client.json.gson.GsonFactory; import com.google.api.services.cloudkms.v1.CloudKMS; import com.google.api.services.cloudkms.v1.CloudKMSScopes; import com.google.api.services.cloudkms.v1.model.*; @@ -101,7 +101,7 @@ byte[] encryptContents(String plaintext) { private CloudKMS buildCredentials(GoogleSecureStorageProperties properties) { HttpTransport transport = new NetHttpTransport(); - JsonFactory jsonFactory = new JacksonFactory(); + JsonFactory jsonFactory = new GsonFactory(); try { credentials = loadKmsCredential(properties.getJsonPath()); } catch (IOException e) { diff --git a/halyard-backup/src/main/java/com/netflix/spinnaker/halyard/backup/kms/v1/google/GoogleStorage.java b/halyard-backup/src/main/java/com/netflix/spinnaker/halyard/backup/kms/v1/google/GoogleStorage.java index 2ad09bc4d..66d1cc6f4 100644 --- a/halyard-backup/src/main/java/com/netflix/spinnaker/halyard/backup/kms/v1/google/GoogleStorage.java +++ b/halyard-backup/src/main/java/com/netflix/spinnaker/halyard/backup/kms/v1/google/GoogleStorage.java @@ -23,7 +23,7 @@ import com.google.api.client.http.HttpTransport; import com.google.api.client.http.javanet.NetHttpTransport; import com.google.api.client.json.JsonFactory; -import com.google.api.client.json.jackson2.JacksonFactory; +import com.google.api.client.json.gson.GsonFactory; import com.google.api.services.storage.Storage; import com.google.api.services.storage.StorageScopes; import com.google.api.services.storage.model.Bucket; @@ -73,7 +73,7 @@ void writeBytes(String name, byte[] contents) { private Storage buildCredentials(GoogleSecureStorageProperties properties) { HttpTransport transport = new NetHttpTransport(); - JsonFactory jsonFactory = new JacksonFactory(); + JsonFactory jsonFactory = new GsonFactory(); GoogleCredentials credentials; try { credentials = loadStorageCredential(properties.getJsonPath()); diff --git a/halyard-core/src/main/java/com/netflix/spinnaker/halyard/core/registry/v1/GoogleProfileReaderConfig.java b/halyard-core/src/main/java/com/netflix/spinnaker/halyard/core/registry/v1/GoogleProfileReaderConfig.java index 213df2743..04c8376bb 100644 --- a/halyard-core/src/main/java/com/netflix/spinnaker/halyard/core/registry/v1/GoogleProfileReaderConfig.java +++ b/halyard-core/src/main/java/com/netflix/spinnaker/halyard/core/registry/v1/GoogleProfileReaderConfig.java @@ -20,7 +20,7 @@ import com.google.api.client.http.HttpRequestInitializer; import com.google.api.client.json.JsonFactory; -import com.google.api.client.json.jackson2.JacksonFactory; +import com.google.api.client.json.gson.GsonFactory; import com.google.api.services.storage.Storage; import com.google.api.services.storage.StorageScopes; import com.netflix.spinnaker.halyard.core.provider.v1.google.GoogleCredentials; @@ -45,7 +45,7 @@ public Storage unauthenticatedGoogleStorage() { } private Storage createGoogleStorage(boolean useApplicationDefaultCreds) { - JsonFactory jsonFactory = JacksonFactory.getDefaultInstance(); + JsonFactory jsonFactory = GsonFactory.getDefaultInstance(); String applicationName = "Spinnaker/Halyard"; HttpRequestInitializer requestInitializer = null; diff --git a/halyard-core/src/main/java/com/netflix/spinnaker/halyard/core/registry/v1/GoogleWriteableProfileRegistry.java b/halyard-core/src/main/java/com/netflix/spinnaker/halyard/core/registry/v1/GoogleWriteableProfileRegistry.java index c36561b6e..e9cb1366a 100644 --- a/halyard-core/src/main/java/com/netflix/spinnaker/halyard/core/registry/v1/GoogleWriteableProfileRegistry.java +++ b/halyard-core/src/main/java/com/netflix/spinnaker/halyard/core/registry/v1/GoogleWriteableProfileRegistry.java @@ -20,7 +20,7 @@ import com.google.api.client.http.ByteArrayContent; import com.google.api.client.http.HttpTransport; import com.google.api.client.json.JsonFactory; -import com.google.api.client.json.jackson2.JacksonFactory; +import com.google.api.client.json.gson.GsonFactory; import com.google.api.services.storage.Storage; import com.google.api.services.storage.StorageScopes; import com.google.api.services.storage.model.StorageObject; @@ -45,7 +45,7 @@ public class GoogleWriteableProfileRegistry { GoogleWriteableProfileRegistry(WriteableProfileRegistryProperties properties) { HttpTransport httpTransport = GoogleCredentials.buildHttpTransport(); - JsonFactory jsonFactory = JacksonFactory.getDefaultInstance(); + JsonFactory jsonFactory = GsonFactory.getDefaultInstance(); com.google.auth.oauth2.GoogleCredentials credentials; try { credentials = loadCredentials(properties.getJsonPath());