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

Automaticaly retry failed requests on an internal server error for iTunesConnect #8017

Merged
merged 3 commits into from
Jan 26, 2017

Conversation

KrauseFx
Copy link
Member

@@ -676,7 +676,7 @@ def build_trains(app_id, testing_type, tries = 5, platform: nil)
# Build trains fail randomly very often
# we need to catch those errors and retry
# https://github.com/fastlane/fastlane/issues/6419
if ex.to_s.include?("ITC.response.error.OPERATION_FAILED") || ex.to_s.include?("Internal Server Error")
if ex.to_s.include?("ITC.response.error.OPERATION_FAILED") || ex.to_s.include?("Internal Server Error") || ex.to_s.include?("Service Unavailable")
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, this is getting long. Nitpick suggestion:

RETRY_ERROR_MESSAGES = [
  "ITC.response.error.OPERATION_FAILED",
  "Internal Server Error",
  "Service Unavailable"
].freeze

# ...

if RETRY_ERROR_MESSAGES.any? { |msg| ex.to_s.include?(msg) }

@KrauseFx
Copy link
Member Author

@mfurtak agreed, makes sense, updated the PR 👍

@KrauseFx KrauseFx merged commit 2dc93d1 into master Jan 26, 2017
@KrauseFx KrauseFx deleted the KrauseFx-patch-5 branch January 26, 2017 22:34
@KrauseFx KrauseFx mentioned this pull request Jan 26, 2017
@fastlane fastlane locked and limited conversation to collaborators Apr 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants