@@ -285,32 +285,33 @@ export class RegionProfileManager {
285285 if ( ! previousSelected ) {
286286 return
287287 }
288+ // Comment these out until we have a better way to deal with throttling issue, currently service can only take 1 tps
288289 // cross-validation
289- this . getProfiles ( )
290- . then ( async ( profiles ) => {
291- const r = profiles . find ( ( it ) => it . arn === previousSelected . arn )
292- if ( ! r ) {
293- telemetry . amazonq_profileState . emit ( {
294- source : 'reload' ,
295- amazonQProfileRegion : 'not-set' ,
296- reason : 'profile could not be selected' ,
297- result : 'Failed' ,
298- } )
299-
300- await this . invalidateProfile ( previousSelected . arn )
301- RegionProfileManager . logger . warn (
302- `invlaidating ${ previousSelected . name } profile, arn=${ previousSelected . arn } `
303- )
304- }
305- } )
306- . catch ( ( e ) => {
307- telemetry . amazonq_profileState . emit ( {
308- source : 'reload' ,
309- amazonQProfileRegion : 'not-set' ,
310- reason : ( e as Error ) . message ,
311- result : 'Failed' ,
312- } )
313- } )
290+ // this.getProfiles()
291+ // .then(async (profiles) => {
292+ // const r = profiles.find((it) => it.arn === previousSelected.arn)
293+ // if (!r) {
294+ // telemetry.amazonq_profileState.emit({
295+ // source: 'reload',
296+ // amazonQProfileRegion: 'not-set',
297+ // reason: 'profile could not be selected',
298+ // result: 'Failed',
299+ // })
300+
301+ // await this.invalidateProfile(previousSelected.arn)
302+ // RegionProfileManager.logger.warn(
303+ // `invlaidating ${previousSelected.name} profile, arn=${previousSelected.arn}`
304+ // )
305+ // }
306+ // })
307+ // .catch((e) => {
308+ // telemetry.amazonq_profileState.emit({
309+ // source: 'reload',
310+ // amazonQProfileRegion: 'not-set',
311+ // reason: (e as Error).message,
312+ // result: 'Failed',
313+ // })
314+ // })
314315
315316 await this . switchRegionProfile ( previousSelected , 'reload' )
316317 }
0 commit comments