Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Migration] Retry if refresh errored #550

Merged
merged 1 commit into from Apr 20, 2020
Merged

[Migration] Retry if refresh errored #550

merged 1 commit into from Apr 20, 2020

Conversation

johnsudaar
Copy link
Member

@johnsudaar johnsudaar commented Apr 20, 2020

Fix #546

@johnsudaar johnsudaar requested a review from Soulou Apr 20, 2020
@johnsudaar
Copy link
Member Author

@johnsudaar johnsudaar commented Apr 20, 2020

If it fails during the load.
2020-04-20_17-04

Then it works
2020-04-20_17-05

Then it re-fail
2020-04-20_17-06

errCount := 0

var migration *scalingo.RegionMigration

for {
Copy link
Member

@Soulou Soulou Apr 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use go-utils/retry ?

Copy link
Member Author

@johnsudaar johnsudaar Apr 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it and it wont be easy here. There's no mechanisme to know where we are in the retry. And the code still need to run. This will need a major redesign of this part and to add very different functionnalities to this package. Not sure this is worth the time.

Copy link
Member

@Soulou Soulou Apr 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be at least interesting to list missing features in the package.

Like a callback with the iteration number and some other information or something like that, don't you think?

Copy link
Member

@Soulou Soulou Apr 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I'd be glad to have a quite polyvalent retry package)

Copy link
Member Author

@johnsudaar johnsudaar Apr 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok i'll see

@johnsudaar johnsudaar requested a review from Soulou Apr 20, 2020
Soulou
Soulou approved these changes Apr 20, 2020
@Soulou Soulou merged commit 77845b5 into master Apr 20, 2020
1 check passed
@Soulou Soulou deleted the fix/546/retry_errors branch Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants