File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
jetbrains-gateway/src/software/aws/toolkits/jetbrains/gateway Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -166,13 +166,16 @@ class CawsConnectionProvider : GatewayConnectionProvider {
166
166
167
167
val pluginPath = " $IDE_BACKEND_DIR /plugins/${AwsToolkit .pluginPath().fileName} "
168
168
var retries = 3
169
+ val startTimeToCheckInstallation = System .currentTimeMillis()
170
+
169
171
val toolkitInstallSettings: ToolkitInstallSettings ? = coroutineScope {
170
172
while (retries > 0 ) {
171
173
indicator.checkCanceled()
172
174
val pluginIsInstalled = executor.remoteDirectoryExists(
173
175
pluginPath,
174
176
timeout = Duration .ofSeconds(15 )
175
177
)
178
+
176
179
when (pluginIsInstalled) {
177
180
null -> {
178
181
if (retries == 1 ) {
@@ -188,9 +191,19 @@ class CawsConnectionProvider : GatewayConnectionProvider {
188
191
}
189
192
}
190
193
} as ToolkitInstallSettings ?
194
+
191
195
toolkitInstallSettings ? : let {
192
196
// environment is non-responsive to SSM; restart
193
197
LOG .warn { " Restarting $envId since it appears unresponsive to SSM Run-Command" }
198
+ val timeTakenToCheckInstallation = System .currentTimeMillis() - startTimeToCheckInstallation
199
+ CodecatalystTelemetry .devEnvironmentWorkflowStatistic(
200
+ project = null ,
201
+ userId = userId,
202
+ result = TelemetryResult .Failed ,
203
+ codecatalystDevEnvironmentWorkflowStep = " ToolkitInstallationSSMCheck" ,
204
+ codecatalystDevEnvironmentWorkflowError = " Timeout/Unknown error while connecting to Dev Env via SSM" ,
205
+ duration = timeTakenToCheckInstallation.toDouble()
206
+ )
194
207
coroutineScope {
195
208
launchChildIOBackground {
196
209
environmentActions.stopEnvironment()
You can’t perform that action at this time.
0 commit comments