common-fate / granted

The easiest way to access your cloud.
https://granted.dev
MIT License
1k stars 93 forks source link

implements backoff in sso.go, avoids 429s when too many roles are present #462

Closed c0nfleis closed 12 months ago

c0nfleis commented 1 year ago

What changed?

Implemented backoffs when running listAccountRoles in sso.go

Why?

429's when too many roles are present

How did you test it?

I ran locally using make cli, and tested against real use case that was returning 429 when using main

Potential risks

Possible still not enough attempts, but this number got me through

Is patch release candidate?

No

egibs commented 1 year ago

Addresses: https://github.com/common-fate/granted/issues/458

shwethaumashanker commented 1 year ago

Thank you so much @c0nfleis for implementing the fix! We're really grateful for your work. Just a heads up, we've also just finished implementing a fix that rate limits the AWS SSO API call to AWS's max throttle limit and added a progress bar too #463

chrnorm commented 12 months ago

Closing as we've just merged #463 - we opted for the implementation in that PR because it has a progress bar which should improve UX for large org sizes. This will be included in the next Granted release.

As mentioned though we're hugely grateful for your contribution here @egibs - let us know how the next release works for you and contributions which further improve functionality here are very much welcomed.