From 63050c51163e96a5d435f3c8b7984a214c9b9169 Mon Sep 17 00:00:00 2001 From: ibre5041 Date: Tue, 12 Apr 2022 11:36:38 +0200 Subject: [PATCH 1/5] Fix http proxy settings --- .../main/java/com/opsgenie/tools/backup/util/BackupUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup-commons/src/main/java/com/opsgenie/tools/backup/util/BackupUtils.java b/backup-commons/src/main/java/com/opsgenie/tools/backup/util/BackupUtils.java index abd26b3..f861536 100644 --- a/backup-commons/src/main/java/com/opsgenie/tools/backup/util/BackupUtils.java +++ b/backup-commons/src/main/java/com/opsgenie/tools/backup/util/BackupUtils.java @@ -49,7 +49,7 @@ public static String readFile(String fileName) throws IOException { public static RateLimitsDto generateRateLimits(String apiKey, String opsGenieHost) throws IOException { try { - HttpClient client = HttpClientBuilder.create().build(); + HttpClient client = HttpClientBuilder.create().useSystemProperties().build(); HttpGet httpGet = new HttpGet(opsGenieHost + "/v2/request-limits/"); httpGet.addHeader(HttpHeaders.AUTHORIZATION, "GenieKey " + apiKey); From cc0e410e7cecc1999ad13f1d3b8efa645b146034 Mon Sep 17 00:00:00 2001 From: ibre5041 Date: Tue, 12 Apr 2022 11:44:39 +0200 Subject: [PATCH 2/5] log4j update to version 2.17.2 --- backup-commons/build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backup-commons/build.gradle b/backup-commons/build.gradle index f30e787..3b7bf6c 100644 --- a/backup-commons/build.gradle +++ b/backup-commons/build.gradle @@ -17,9 +17,9 @@ apply plugin: 'java' apply plugin: 'project-report' dependencies { - compile 'org.apache.logging.log4j:log4j-api:2.16.0' - compile 'org.apache.logging.log4j:log4j-core:2.16.0' - compile "org.apache.logging.log4j:log4j-slf4j-impl:2.16.0" + compile 'org.apache.logging.log4j:log4j-api:2.17.2' + compile 'org.apache.logging.log4j:log4j-core:2.17.2' + compile "org.apache.logging.log4j:log4j-slf4j-impl:2.17.2" compile "com.beust:jcommander:1.48" compile 'org.eclipse.jgit:org.eclipse.jgit:4.5.0.201609210915-r' compile "com.opsgenie.oas:opsgenie-sdk-swagger:1.0.12" From a5b75cf7af335509e40552c462f835ab222927b7 Mon Sep 17 00:00:00 2001 From: ibre5041 Date: Tue, 12 Apr 2022 17:01:41 +0200 Subject: [PATCH 3/5] update library version, JRE1.8, JGIT 5.13 --- backup-commons/build.gradle | 11 ++++++++--- .../java/com/opsgenie/tools/backup/BaseBackup.java | 4 ++++ backup-export/build.gradle | 2 +- backup-import/build.gradle | 2 +- build.gradle | 4 ++-- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/backup-commons/build.gradle b/backup-commons/build.gradle index 3b7bf6c..acb5d83 100644 --- a/backup-commons/build.gradle +++ b/backup-commons/build.gradle @@ -4,8 +4,8 @@ apply plugin: 'maven' group 'com.opsgenie.tools' version '0.23.8' -sourceCompatibility = 1.6 -targetCompatibility = 1.6 +sourceCompatibility = 1.8 +targetCompatibility = 1.8 repositories { mavenLocal() @@ -21,7 +21,12 @@ dependencies { compile 'org.apache.logging.log4j:log4j-core:2.17.2' compile "org.apache.logging.log4j:log4j-slf4j-impl:2.17.2" compile "com.beust:jcommander:1.48" - compile 'org.eclipse.jgit:org.eclipse.jgit:4.5.0.201609210915-r' + compile 'org.apache.httpcomponents:httpclient:4.5.13' + compile 'org.apache.httpcomponents:httpcore:4.4.15' + //compile 'com.jcraft:jsch:0.1.55' + compile 'org.eclipse.jgit:org.eclipse.jgit:5.13.0.202109080827-r' + compile 'org.eclipse.jgit:org.eclipse.jgit.ssh.apache:5.13.0.202109080827-r' + compile 'org.eclipse.jgit:org.eclipse.jgit.ssh.jsch:5.13.0.202109080827-r' compile "com.opsgenie.oas:opsgenie-sdk-swagger:1.0.12" compile ('com.fasterxml.jackson.core:jackson-databind:2.10.4') { force = true diff --git a/backup-commons/src/main/java/com/opsgenie/tools/backup/BaseBackup.java b/backup-commons/src/main/java/com/opsgenie/tools/backup/BaseBackup.java index fdbfa09..51fc24a 100644 --- a/backup-commons/src/main/java/com/opsgenie/tools/backup/BaseBackup.java +++ b/backup-commons/src/main/java/com/opsgenie/tools/backup/BaseBackup.java @@ -17,6 +17,10 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.eclipse.jgit.transport.JschConfigSessionFactory; +import org.eclipse.jgit.transport.OpenSshConfig; +import org.eclipse.jgit.transport.CredentialsProviderUserInfo; + import java.io.File; import java.io.FileNotFoundException; import java.io.UnsupportedEncodingException; diff --git a/backup-export/build.gradle b/backup-export/build.gradle index db71d60..670c678 100644 --- a/backup-export/build.gradle +++ b/backup-export/build.gradle @@ -3,7 +3,7 @@ version '0.23.8' apply plugin: 'java' -sourceCompatibility = 1.6 +sourceCompatibility = 1.8 dependencies { compile project(':backup-commons') diff --git a/backup-import/build.gradle b/backup-import/build.gradle index 2110fc7..1a3281a 100644 --- a/backup-import/build.gradle +++ b/backup-import/build.gradle @@ -3,7 +3,7 @@ version '0.23.8' apply plugin: 'java' -sourceCompatibility = 1.6 +sourceCompatibility = 1.8 dependencies { compile project(':backup-commons') diff --git a/build.gradle b/build.gradle index d7d2212..0d89eba 100755 --- a/build.gradle +++ b/build.gradle @@ -4,8 +4,8 @@ apply plugin: 'maven' group 'com.opsgenie.tools' version '0.23.8' -sourceCompatibility = 1.6 -targetCompatibility = 1.6 +sourceCompatibility = 1.8 +targetCompatibility = 1.8 repositories { mavenLocal() From 630da22127095f2cfc2a966982710c1805daee24 Mon Sep 17 00:00:00 2001 From: ibre5041 Date: Wed, 14 Sep 2022 18:59:56 +0200 Subject: [PATCH 4/5] w/o for RateLimitManager.getApiLimitForDomain() returning threadPoolSize = 0 --- .../java/com/opsgenie/tools/backup/retry/RateLimitManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backup-commons/src/main/java/com/opsgenie/tools/backup/retry/RateLimitManager.java b/backup-commons/src/main/java/com/opsgenie/tools/backup/retry/RateLimitManager.java index 276b6eb..3808ec2 100644 --- a/backup-commons/src/main/java/com/opsgenie/tools/backup/retry/RateLimitManager.java +++ b/backup-commons/src/main/java/com/opsgenie/tools/backup/retry/RateLimitManager.java @@ -26,7 +26,7 @@ private int getApiLimitForDomain(DomainNames domain, int periodInSeconds) { resultLimit = domainLimitDto.getLimit(); } } - return resultLimit; + return Math.max(resultLimit, 1); } public int getRateLimit(DomainNames domain, int period) { From 98dfb4f97f7e371f8f7682bae9353f228eb7b381 Mon Sep 17 00:00:00 2001 From: Jaroslav Masovsky Date: Fri, 9 Dec 2022 11:34:45 +0100 Subject: [PATCH 5/5] Increased gradle version to 4.3 --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f23c24e..038335a 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-bin.zip