at_libraries
at_libraries copied to clipboard
feat: improve onboarding_cli resilience
- What I did
- removed qr_code related components from code
- rename OnboardingUtil -> RegistrarApiUtil and consume this change
- Delete .atKeys file if onboarding process encounters an unrecoverable exception/error
- Retry each of the onboarding steps in case they encounter an exception
- How I did it
- Introduced _deleteAtKeys() which checks if the atsign is already onboarded, if not deletes the atKeys file that has been created
- Introduced OnboardingTask which is an abstract class that contains strucutre to retry a specific task in case it has encountered an Exception/Error or has not fetched necessary data. All the onboarding tasks have been rewritten by extending this class with varying maxRetries count to improve resilience.
- How to verify it
- activate_cli should be working as usual
- In case a certain task (updating pkamPubKey, encPubKey to remote) fails, onboarding_cli should retry those specific tasks. In case maxRetry count is exceeded, the .atKeys file should be deleted.
- Unit tests on the way
- Description for the changelog
- removed qr_code related components from code
- rename OnboardingUtil -> RegistrarApiUtil and consume this change
- Delete .atKeys file if onboarding process encounters an unrecoverable exception/error
- Retry each of the onboarding steps in case they encounter an exception
Unit tests on the way
@srieteja What's the status of this PR?
@gkc this PR is from before at_auth was introduced, so it requires some capacity to bring this PR up to speed. And since its not linked to a ticket anymore, it's low priority for me. Will bring this up to speed and get it closed as soon as I find some time.
@gkc this PR is from before at_auth was introduced, so it requires some capacity to bring this PR up to speed. And since its not linked to a ticket anymore, it's low priority for me. Will bring this up to speed and get it closed as soon as I find some time.
Makes sense, thanks @srieteja