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
[deliver] introduce timeout
for screenshots processing waiting time
#21693
[deliver] introduce timeout
for screenshots processing waiting time
#21693
Conversation
timeout
for screenshots processing waiting time in delivertimeout
for screenshots processing waiting time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @mikhailmaslo 👋
Congrats on your first PR to the fastlane project! 🎉
I left a few comments, mostly light suggestions/questions.
I faced timeout issues myself when uploading screenshots manually (lucky enough to never have faced them when using fastlane), so I think this will be a good improvement! I'm sure many fastlane users agree, given the popularity of the feature request 🙏 thanks for this!
PS: Thank you for the thorough PR description, I really appreciate those!! ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @mikhailmaslo ! 🚀
timeout
for screenshots processing waiting timetimeout
for screenshots processing waiting time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Roger Oba <rogerluan.oba@gmail.com>
Hi, @rogerluan! I've just rebased to the up to date master and all tests have passed Shell we merge this PR?) |
Thanks for this @mikhailmaslo 🤗 it'll be included in the next release! |
Is there an ETA for the next release that will include this change? |
Need a ETA for this release please. I have been wating on this forever now. |
While you are waiting for the release, you could just use the master branch directly:
|
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validci/circleci
builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)Motivation and Context
Resolves #20619
I support two applications with 20+ languages and over 200 screenshots.
It addresses an open issue Deliver action keep in Waiting for all the screenshots to finish being processed forever #20619 which has gained significant community attention
fastlane doesn't have
timeout
on screenshots processing, so if some screenshots get stuck in a processing state, which happens quite often when there are hundreds of screenshots, the process will be endless.Since fastlane doesn't have processing time timeout, a user has several options to handle stuck screenshots:
DELIVER_NUMBER_OF_THREADS
to1
) and hoping that App Store Connect will be able to process themDELIVER_NUMBER_OF_THREADS
equals to10
As a result, neither of the attempted solutions doesn't really work for multi-language applications, so we need to introduce some workaround
Description
The proposed solution is based on existing logic, which removes & re-uploads screenshots that failed to upload.
The
screenshot_processing_timeout
parameter is introduced within thedeliver
action. This parameter allows users to define a timeout period after which screenshots that are still processing are considered stuck (failed) and then existing logic with removing & reuploading comes into play.screenshot_processing_timeout
parameter todeliver
which defines the timeout of waiting before considering currently processing screenshots as failed ones.Chosen constants:
1hr
is default value forscreenshot_processing_timeout
. It is chosen with backward compatibility in mind. I assume for anyone who usesdeliver
,1hr
should be sufficient enough to not break existing logicTesting Steps
To test implementation, you should add hundreds of screenshots to App Store Connect with deliver. In my case, I have about 20 localizations with 10-12 screenshots in each (5.5 and 6.5 screens)
I've tested with 2 minutes for
screenshot_processing_timeout
. In my experience, it's usually enough for spotting stuck screenshots inside the EU. However,screenshot_processing_timeout
may depend on your location, bandwidth, etcIn my experience I've encountered 2-3 per ~200 screenshots, so it's about 1%
To test this branch, modify your Gemfile as:
And run
bundle install
to apply the changes.