Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package compat.com.jetbrains.gateway.thinClientLink

import com.jetbrains.gateway.thinClientLink.LinkedClientManager
import com.jetbrains.rd.util.lifetime.Lifetime
import java.net.URI

fun startNewClient(lifetime: Lifetime, initialLink: URI, remoteIdentity: String?, onStarted: () -> Unit) =
LinkedClientManager.getInstance().startNewClient(lifetime, initialLink, remoteIdentity, onStarted)
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package compat.com.jetbrains.gateway.thinClientLink

Check notice

Code scanning / QDJVMC

Package name does not match containing directory Note

Package directive does not match the file location

import com.jetbrains.gateway.thinClientLink.LinkedClientManager
import com.jetbrains.rd.util.lifetime.Lifetime
import java.net.URI

fun startNewClient(lifetime: Lifetime, initialLink: URI, remoteIdentity: String?, onStarted: () -> Unit) =
LinkedClientManager.getInstance().startNewClient(lifetime, initialLink, remoteIdentity, null, onStarted)

Check warning

Code scanning / QDJVMC

Unstable API Usage Warning

'com.jetbrains.gateway.thinClientLink.LinkedClientManager.Companion' is declared in unstable 'com.jetbrains.gateway.thinClientLink.LinkedClientManager' marked with @ApiStatus.Experimental

Check warning

Code scanning / QDJVMC

Unstable API Usage Warning

'getInstance()' is declared in unstable 'com.jetbrains.gateway.thinClientLink.LinkedClientManager' marked with @ApiStatus.Experimental

Check warning

Code scanning / QDJVMC

Unstable API Usage Warning

'startNewClient(com.jetbrains.rd.util.lifetime.Lifetime, java.net.URI, java.lang.String, java.lang.String, kotlin.jvm.functions.Function0)' is declared in unstable 'com.jetbrains.gateway.thinClientLink.LinkedClientManager' marked with @ApiStatus.Experimental
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
package software.aws.toolkits.jetbrains.gateway.connection.workflow

import com.jetbrains.gateway.api.GatewayConnectionHandle
import com.jetbrains.gateway.thinClientLink.LinkedClientManager
import com.jetbrains.rd.util.lifetime.LifetimeDefinition
import com.jetbrains.rd.util.lifetime.onTermination
import com.jetbrains.rd.util.reactive.adviseEternal
import compat.com.jetbrains.gateway.thinClientLink.startNewClient
import kotlinx.coroutines.delay
import kotlinx.coroutines.runBlocking
import software.aws.toolkits.core.utils.getLogger
Expand Down Expand Up @@ -50,16 +49,15 @@
val clientHandle = ThinClientTrackerService.getInstance().associate(envId) {
val start = System.currentTimeMillis()
val thinClientHandle = try {
LinkedClientManager.getInstance()
.startNewClient(lifetime, localLink, URLEncoder.encode(message("caws.workspace.backend.title"), Charsets.UTF_8)) {
CodecatalystTelemetry.devEnvironmentWorkflowStatistic(
project = null,
userId = lazilyGetUserId(),
result = TelemetryResult.Succeeded,
duration = System.currentTimeMillis() - start.toDouble(),
codecatalystDevEnvironmentWorkflowStep = "startThinClient",
)
}
startNewClient(lifetime, localLink, URLEncoder.encode(message("caws.workspace.backend.title"), Charsets.UTF_8)) {
CodecatalystTelemetry.devEnvironmentWorkflowStatistic(
project = null,
userId = lazilyGetUserId(),
result = TelemetryResult.Succeeded,
duration = System.currentTimeMillis() - start.toDouble(),
codecatalystDevEnvironmentWorkflowStep = "startThinClient",

Check warning on line 58 in plugins/toolkit/jetbrains-gateway/src/software/aws/toolkits/jetbrains/gateway/connection/workflow/StartBackend.kt

View check run for this annotation

Codecov / codecov/patch

plugins/toolkit/jetbrains-gateway/src/software/aws/toolkits/jetbrains/gateway/connection/workflow/StartBackend.kt#L52-L58

Added lines #L52 - L58 were not covered by tests
)
}

Check warning on line 60 in plugins/toolkit/jetbrains-gateway/src/software/aws/toolkits/jetbrains/gateway/connection/workflow/StartBackend.kt

View check run for this annotation

Codecov / codecov/patch

plugins/toolkit/jetbrains-gateway/src/software/aws/toolkits/jetbrains/gateway/connection/workflow/StartBackend.kt#L60

Added line #L60 was not covered by tests
} catch (e: Throwable) {
CodecatalystTelemetry.devEnvironmentWorkflowStatistic(
project = null,
Expand Down
Loading