diff options
author | lukasz-jarocki-sonarsource <lukasz.jarocki@sonarsource.com> | 2024-09-23 16:55:10 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-09-24 20:03:04 +0000 |
commit | 0ad533b8eeb5e7486bcd51f261095214e77e4d86 (patch) | |
tree | d5793151517ef1cb5e23c32c7291846ae301099a /server/sonar-telemetry/src | |
parent | ee155ee592f2b9d36adcc6464229c2bf18918aee (diff) | |
download | sonarqube-0ad533b8eeb5e7486bcd51f261095214e77e4d86.tar.gz sonarqube-0ad533b8eeb5e7486bcd51f261095214e77e4d86.zip |
putting the value of IS_HELM_AUTOSCALING_ENABLED env variable into telemetry and support info file
Diffstat (limited to 'server/sonar-telemetry/src')
4 files changed, 5 insertions, 4 deletions
diff --git a/server/sonar-telemetry/src/it/java/org/sonar/telemetry/legacy/TelemetryDataLoaderImplIT.java b/server/sonar-telemetry/src/it/java/org/sonar/telemetry/legacy/TelemetryDataLoaderImplIT.java index 65f434b29a5..18a19365cf6 100644 --- a/server/sonar-telemetry/src/it/java/org/sonar/telemetry/legacy/TelemetryDataLoaderImplIT.java +++ b/server/sonar-telemetry/src/it/java/org/sonar/telemetry/legacy/TelemetryDataLoaderImplIT.java @@ -691,7 +691,7 @@ public class TelemetryDataLoaderImplIT { @Test public void load_shouldContainCloudUsage() { - CloudUsage cloudUsage = new CloudUsage(true, "1.27", "linux/amd64", "5.4.181-99.354.amzn2.x86_64", "10.1.0", false, "docker", false); + CloudUsage cloudUsage = new CloudUsage(true, "1.27", "linux/amd64", "5.4.181-99.354.amzn2.x86_64", "10.1.0", false, false, "docker", false); when(cloudUsageDataProvider.getCloudUsage()).thenReturn(cloudUsage); TelemetryData data = commercialUnderTest.load(); diff --git a/server/sonar-telemetry/src/main/java/org/sonar/telemetry/legacy/CloudUsageDataProvider.java b/server/sonar-telemetry/src/main/java/org/sonar/telemetry/legacy/CloudUsageDataProvider.java index 28229274208..32d61d6b10b 100644 --- a/server/sonar-telemetry/src/main/java/org/sonar/telemetry/legacy/CloudUsageDataProvider.java +++ b/server/sonar-telemetry/src/main/java/org/sonar/telemetry/legacy/CloudUsageDataProvider.java @@ -116,6 +116,7 @@ public class CloudUsageDataProvider { getKubernetesProvider(), getOfficialHelmChartVersion(), containerSupport.isRunningOnHelmOpenshift(), + containerSupport.isHelmAutoscalingEnabled(), containerSupport.getContainerContext(), isOfficialImageUsed()); diff --git a/server/sonar-telemetry/src/main/java/org/sonar/telemetry/legacy/TelemetryData.java b/server/sonar-telemetry/src/main/java/org/sonar/telemetry/legacy/TelemetryData.java index 59a9c6d95a6..649a34710dc 100644 --- a/server/sonar-telemetry/src/main/java/org/sonar/telemetry/legacy/TelemetryData.java +++ b/server/sonar-telemetry/src/main/java/org/sonar/telemetry/legacy/TelemetryData.java @@ -385,8 +385,8 @@ public class TelemetryData { } record CloudUsage(boolean kubernetes, @Nullable String kubernetesVersion, @Nullable String kubernetesPlatform, - @Nullable String kubernetesProvider, - @Nullable String officialHelmChart, boolean isOnOpenshift, @Nullable String containerRuntime, boolean officialImage) { + @Nullable String kubernetesProvider, @Nullable String officialHelmChart, boolean isOnOpenshift, + boolean isHelmAutoscalingEnabled, @Nullable String containerRuntime, boolean officialImage) { } public static class ProjectStatistics { diff --git a/server/sonar-telemetry/src/test/java/org/sonar/telemetry/legacy/TelemetryDataJsonWriterTest.java b/server/sonar-telemetry/src/test/java/org/sonar/telemetry/legacy/TelemetryDataJsonWriterTest.java index 48ec921ad5a..80f72fd2c2b 100644 --- a/server/sonar-telemetry/src/test/java/org/sonar/telemetry/legacy/TelemetryDataJsonWriterTest.java +++ b/server/sonar-telemetry/src/test/java/org/sonar/telemetry/legacy/TelemetryDataJsonWriterTest.java @@ -696,7 +696,7 @@ class TelemetryDataJsonWriterTest { .setMessageSequenceNumber(1L) .setPlugins(Collections.emptyMap()) .setManagedInstanceInformation(new TelemetryData.ManagedInstanceInformation(false, null)) - .setCloudUsage(new TelemetryData.CloudUsage(true, "1.27", "linux/amd64", "5.4.181-99.354.amzn2.x86_64", "10.1.0", false, "docker", false)) + .setCloudUsage(new TelemetryData.CloudUsage(true, "1.27", "linux/amd64", "5.4.181-99.354.amzn2.x86_64", "10.1.0", false, false, "docker", false)) .setDatabase(new TelemetryData.Database("H2", "11")) .setNcdId(NCD_ID); } |