Skip to content

Commit 920c03f

Browse files
committed
Fix typos
1 parent ff26b42 commit 920c03f

14 files changed

Lines changed: 45 additions & 45 deletions

File tree

common/src/main/kotlin/com/cosmotech/common/metrics/MonitorServiceAspect.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class MonitorServiceAspect(
9191
value = 1.0,
9292
labels = licensingMetricLabels,
9393
qualifier = "call",
94-
type = PersitentMetricType.COUNTER,
94+
type = PersistentMetricType.COUNTER,
9595
downSampling = true,
9696
downSamplingAggregation = DownSamplingAggregationType.MAX,
9797
)

common/src/main/kotlin/com/cosmotech/common/metrics/PersistentMetric.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ data class PersistentMetric(
2626
val downSamplingBucketDuration: Long = 0,
2727
val downSamplingAggregation: DownSamplingAggregationType = DownSamplingAggregationType.AVG,
2828
val downSamplingSuffix: String = DEFAULT_DOWN_SAMPLING_SUFFIX,
29-
val type: PersitentMetricType = PersitentMetricType.COUNTER,
29+
val type: PersistentMetricType = PersistentMetricType.COUNTER,
3030
val scope: String = DEFAULT_SCOPE,
3131
)

common/src/main/kotlin/com/cosmotech/common/metrics/PersitentMetricType.kt renamed to common/src/main/kotlin/com/cosmotech/common/metrics/PersistentMetricType.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the MIT license.
33
package com.cosmotech.common.metrics
44

5-
enum class PersitentMetricType {
5+
enum class PersistentMetricType {
66
COUNTER,
77
GAUGE,
88
}

common/src/main/kotlin/com/cosmotech/common/security/filters/ApiKeyAuthenticationFilter.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ class ApiKeyAuthenticationFilter(val csmPlatformProperties: CsmPlatformPropertie
5555
val isUriMatching =
5656
securedUris
5757
.associateWith { it.split("/.*", ignoreCase = true, limit = 2) }
58-
.filter { (securedUri, securedUriSplitted) ->
59-
filterSecuredUriWithRequestUri(securedUriSplitted, requestUri, securedUri)
58+
.filter { (securedUri, securedUriSplit) ->
59+
filterSecuredUriWithRequestUri(securedUriSplit, requestUri, securedUri)
6060
}
6161
.isNotEmpty()
6262

@@ -87,18 +87,18 @@ class ApiKeyAuthenticationFilter(val csmPlatformProperties: CsmPlatformPropertie
8787
}
8888

8989
private fun filterSecuredUriWithRequestUri(
90-
securedUriSplitted: List<String>,
90+
securedUriSplit: List<String>,
9191
requestUri: String,
9292
securedUri: String,
9393
) =
94-
if (securedUriSplitted.size == 1 && securedUriSplitted[0] == "/") {
94+
if (securedUriSplit.size == 1 && securedUriSplit[0] == "/") {
9595
true
9696
} else {
97-
val requestUriSplitted = requestUri.split(securedUriSplitted[0])
98-
if (requestUriSplitted.size < 2) {
97+
val requestUriSplit = requestUri.split(securedUriSplit[0])
98+
if (requestUriSplit.size < 2) {
9999
false
100100
} else {
101-
val uriSuffix = securedUriSplitted[0] + requestUriSplitted[1]
101+
val uriSuffix = securedUriSplit[0] + requestUriSplit[1]
102102
securedUri.toRegex().matches(uriSuffix)
103103
}
104104
}

common/src/main/kotlin/com/cosmotech/common/utils/AnyExtensions.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fun <T> T.convertToMap(): Map<String, Any> =
4040
*
4141
* @param new the new object against which comparison is performed
4242
* @param mutateIfChanged whether to mutate the current object if for fields that have changed
43-
* @param excludedFields an array of fields to exlude from comparison. Note that fields named 'id´
43+
* @param excludedFields an array of fields to exclude from comparison. Note that fields named 'id´
4444
* are automatically excluded, by convention.
4545
* @throws UnsupportedOperationException if the object being compared are not instances of a data
4646
* class
@@ -80,9 +80,9 @@ inline fun <reified T> T.compareToAndMutateIfNeeded(
8080
membersChanged.add(member.name)
8181
if (mutateIfChanged) {
8282
require(member is KMutableProperty) {
83-
"""Detected change but cannot mutate this object
83+
"""Detected change but cannot mutate this object
8484
because property ${member.name} (on class ${T::class}) is not mutable.
85-
Either exclude this field or call this function with mutateIfChanged=false
85+
Either exclude this field or call this function with mutateIfChanged=false
8686
to view the changes detected"""
8787
}
8888

common/src/test/kotlin/com/cosmotech/common/containerregistry/ContainerRegistryServiceTest.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,18 @@ class ContainerRegistryServiceTest {
106106
val jo = JSONObject()
107107
jo.put("name", "my-repository")
108108
jo.put("tags", ja)
109-
val reponseMockk = mockk<ResponseSpec>()
109+
val responseMockk = mockk<ResponseSpec>()
110110

111111
every {
112112
restClient
113113
.get()
114114
.uri("/v2/my-repository/tags/list")
115115
.header(HttpHeaders.AUTHORIZATION, any())
116116
.retrieve()
117-
} returns reponseMockk
117+
} returns responseMockk
118118

119-
every { reponseMockk.onStatus(any(), any()) } returns reponseMockk
120-
every { reponseMockk.body(String::class.java) } returns jo.toString()
119+
every { responseMockk.onStatus(any(), any()) } returns responseMockk
120+
every { responseMockk.body(String::class.java) } returns jo.toString()
121121

122122
containerRegistryService.checkSolutionImage("my-repository", "latest")
123123
}

openapi/example_files/ADTConnector.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
valueType: string
2323
envVar: AZURE_CLIENT_ID
2424
- id: AZURE_CLIENT_SECRET
25-
label: Azure CLient secret
25+
label: Azure Client secret
2626
valueType: password
2727
envVar: AZURE_CLIENT_SECRET
2828
- id: parameters

organization/src/integrationTest/kotlin/com/cosmotech/organization/service/OrganizationServiceIntegrationTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ class OrganizationServiceIntegrationTest : CsmTestBase() {
783783
val name = "o-connector-test-1"
784784
val organizationRegistered =
785785
organizationApiService.createOrganization(makeSimpleOrganizationCreateRequest(name))
786-
organizationApiService.getOrganizationAccessControl(organizationRegistered.id, "UNKOWN")
786+
organizationApiService.getOrganizationAccessControl(organizationRegistered.id, "UNKNOWN")
787787
}
788788
}
789789

@@ -2000,7 +2000,7 @@ class OrganizationServiceIntegrationTest : CsmTestBase() {
20002000
val name = "o-connector-test-1"
20012001
val organizationRegistered =
20022002
organizationApiService.createOrganization(makeSimpleOrganizationCreateRequest(name))
2003-
organizationApiService.getOrganizationAccessControl(organizationRegistered.id, "UNKOWN")
2003+
organizationApiService.getOrganizationAccessControl(organizationRegistered.id, "UNKNOWN")
20042004
}
20052005
}
20062006

run/src/main/kotlin/com/cosmotech/run/metrics/RunMetrics.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import com.cosmotech.common.events.PersistentMetricEvent
88
import com.cosmotech.common.events.RunStart
99
import com.cosmotech.common.metrics.DownSamplingAggregationType
1010
import com.cosmotech.common.metrics.PersistentMetric
11-
import com.cosmotech.common.metrics.PersitentMetricType
11+
import com.cosmotech.common.metrics.PersistentMetricType
1212
import com.cosmotech.runner.domain.Runner
1313
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
1414
import org.springframework.context.event.EventListener
@@ -73,7 +73,7 @@ internal class RunMetrics(
7373
incrementBy = 1,
7474
qualifier = TOTAL_QUALIFIER,
7575
labels = labels,
76-
type = PersitentMetricType.COUNTER,
76+
type = PersistentMetricType.COUNTER,
7777
downSampling = true,
7878
downSamplingAggregation = DownSamplingAggregationType.MAX,
7979
)

runner/src/integrationTest/kotlin/com/cosmotech/runner/service/RunnerServiceIntegrationTest.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ class RunnerServiceIntegrationTest : CsmTestBase() {
802802
}
803803

804804
@Test
805-
fun `test AccessControls management on Runner as ressource Admin`() {
805+
fun `test AccessControls management on Runner as resource Admin`() {
806806
logger.info("should add an Access Control and assert it has been added")
807807
val runnerAccessControl = RunnerAccessControl(TEST_USER_MAIL, ROLE_VIEWER)
808808
var runnerAccessControlRegistered =
@@ -2295,7 +2295,7 @@ class RunnerServiceIntegrationTest : CsmTestBase() {
22952295
}
22962296

22972297
@Test
2298-
fun `test runner creation based on solution without dataset's type parameters with overrided parameter value on workspace`() {
2298+
fun `test runner creation based on solution without dataset's type parameters with overridden parameter value on workspace`() {
22992299

23002300
// 1 - Create a solution with simple solution parameter
23012301
val simpleParameterId = "my_property_name"
@@ -2336,15 +2336,15 @@ class RunnerServiceIntegrationTest : CsmTestBase() {
23362336
solutionCreateRequestWithDatasetParameters,
23372337
)
23382338

2339-
val simpleParameterOverridedValue = "my_override_value"
2339+
val simpleParameterOverriddenValue = "my_override_value"
23402340
workspace =
23412341
makeWorkspaceCreateRequest(
23422342
name = "Workspace",
23432343
workspaceSolution =
23442344
WorkspaceSolution(
23452345
solutionId = solutionSaved.id,
23462346
defaultParameterValues =
2347-
mutableMapOf(simpleParameterId to simpleParameterOverridedValue),
2347+
mutableMapOf(simpleParameterId to simpleParameterOverriddenValue),
23482348
),
23492349
)
23502350
workspaceSaved = workspaceApiService.createWorkspace(organizationSaved.id, workspace)
@@ -2381,7 +2381,7 @@ class RunnerServiceIntegrationTest : CsmTestBase() {
23812381
assertEquals(1, runnerParametersValues.size)
23822382
val runnerParameterValue = runnerParametersValues[0]
23832383
assertEquals(simpleParameterId, runnerParameterValue.parameterId)
2384-
assertEquals(simpleParameterOverridedValue, runnerParameterValue.value)
2384+
assertEquals(simpleParameterOverriddenValue, runnerParameterValue.value)
23852385
assertEquals(simpleParameterVarType, runnerParameterValue.varType)
23862386
}
23872387

0 commit comments

Comments
 (0)