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

RABSW-587: Support for retryable errors. Don't hang file share create #54

Merged
merged 3 commits into from
Jan 6, 2023

Conversation

NateThornton
Copy link
Contributor

  • Adds a retryable error type to ec errors
  • Adds retry delay to ec errors
  • Improves error string
  • Use the above when creating a file share instead of indefinitely hanging (RABSW-587)

Signed-off-by: Nate Thornton [email protected]

pkg/ec/error.go Outdated
return e.statusCode != http.StatusTooManyRequests
}

func (e *ControllerError) RetryDelay() int {
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't actually used anywhere, is it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, not yet. But IsRetryable() and RetryDelay() are for nnf-sos to consume

pkg/ec/error.go Outdated
err error
Event interface{}
statusCode int
retryDelayInSeconds int
Copy link
Contributor

Choose a reason for hiding this comment

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

Does a negative value make sense here? Maybe unsigned?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Excellent idea! time.Duration would be best, then I can drop the units too!

@NateThornton NateThornton merged commit efe2b36 into master Jan 6, 2023
@NateThornton NateThornton deleted the feature/retryable-errors branch January 6, 2023 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants