Skip to content

Commit a1a2d85

Browse files
Merge master into feature/ui-e2e-tests
2 parents 5152203 + 2cc1a26 commit a1a2d85

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

packages/core/src/codewhisperer/region/regionProfileManager.ts

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -287,38 +287,6 @@ export class RegionProfileManager {
287287
}
288288

289289
await this.switchRegionProfile(previousSelected, 'reload')
290-
291-
// cross-validation
292-
// jitter of 0 ~ 5 second
293-
const jitterInSec = Math.floor(Math.random() * 6)
294-
const jitterInMs = jitterInSec * 1000
295-
setTimeout(async () => {
296-
this.getProfiles()
297-
.then(async (profiles) => {
298-
const r = profiles.find((it) => it.arn === previousSelected.arn)
299-
if (!r) {
300-
telemetry.amazonq_profileState.emit({
301-
source: 'reload',
302-
amazonQProfileRegion: 'not-set',
303-
reason: 'profile could not be selected',
304-
result: 'Failed',
305-
})
306-
307-
await this.invalidateProfile(previousSelected.arn)
308-
RegionProfileManager.logger.warn(
309-
`invlaidating ${previousSelected.name} profile, arn=${previousSelected.arn}`
310-
)
311-
}
312-
})
313-
.catch((e) => {
314-
telemetry.amazonq_profileState.emit({
315-
source: 'reload',
316-
amazonQProfileRegion: 'not-set',
317-
reason: (e as Error).message,
318-
result: 'Failed',
319-
})
320-
})
321-
}, jitterInMs)
322290
}
323291

324292
private loadPersistedRegionProfle(): { [label: string]: RegionProfile } {

0 commit comments

Comments
 (0)