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

validate the status of app version to be ready_for_review before submitting the app #20515

Merged

Conversation

404pilot
Copy link
Contributor

@404pilot 404pilot commented Jul 28, 2022

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I see several green ci/circleci builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

This PR tries to fix the issue.

When a specific app version is ready to be submitted for review, fastlane executes a series of API requests.

      submission.add_app_store_version_to_review_items(app_store_version_id: version.id)
      submission.submit_for_review # it throws an error

It fails at line because the state of the version is not "READY_FOR_REVIEW". Fastlane sends the API request too fast.

Description

Basically I added a block to wait till its state becomes 'READY_FOR_REVIEW"

Testing Steps

bundle exec fastlane test

@404pilot 404pilot marked this pull request as ready for review July 28, 2022 23:25
@getaaron
Copy link
Collaborator

Thanks so much for the PR! It seems like a nice general approach to this frustrating problem. I think it would be good to make 2 small additions before merging:

  • we should provide a config to opt out (similar to skip_waiting_for_build_processing)
  • we should use BuildWatcher since it has more advanced support for this e.g. timeouts, handling leading zeroes in version numbers, etc.

WDYT?

@404pilot
Copy link
Contributor Author

@getaaron thanks for the comment.

  1. what is the scenario that people want to opt out?
  2. Do you think it is appropriate to create another file VersionWatcher and use skip_waiting_for_version_processing? The build is actually done at this point and it is just that Apple needs to verify the submitted version is good

@thoro23
Copy link

thoro23 commented Nov 10, 2022

Great PR! We just ran into this issue and this PR would have saved us some time and nerves.

@bakatsuyuki
Copy link

When does this PR merge? I'm waiting.

@getaaron
Copy link
Collaborator

getaaron commented Dec 6, 2022

@404pilot actually on thinking about it more I don't think we need to provide an opt out.

@staust
Copy link

staust commented Jan 20, 2023

We are facing the same issue. Would like to see this merged.

@Stepoura
Copy link

Stepoura commented Mar 2, 2023

Any update on this? We would like to see this merged :)

@ilkap07
Copy link

ilkap07 commented Mar 21, 2023

Any updates on this? We're still having the issue. Would be nice to see this merged

@getaaron
Copy link
Collaborator

@404pilot are you able to make the change so it doesn't loop infinitely?

If not, if someone wants to fork this branch and add that in a separate PR I can merge it in.

@404pilot
Copy link
Contributor Author

404pilot commented Mar 21, 2023

@404pilot are you able to make the change so it doesn't loop infinitely?

If not, if someone wants to fork this branch and add that in a separate PR I can merge it in.

I just updated it and added a new test case @getaaron

@hoangcharles0
Copy link

@404pilot Thanks for working on this change! I was wondering when will this PR get merged. I have been experiencing this issue for the past year and this would be great to automate submitting for review

@404pilot 404pilot requested a review from getaaron April 6, 2023 18:12
@404pilot
Copy link
Contributor Author

@404pilot Thanks for working on this change! I was wondering when will this PR get merged. I have been experiencing this issue for the past year and this would be great to automate submitting for review

I am still waiting for someone to review the PR. I would suggest using spaceship or apple connect API to release it after the release step from fastlane fails if you want to automate the workflow now

@ilkap07
Copy link

ilkap07 commented May 15, 2023

Any updates on this PR?

@404pilot
Copy link
Contributor Author

404pilot commented Jun 7, 2023

can one of admins review it please :)

@stonko1994
Copy link

Any updates on this? Still an issue

@getaaron getaaron merged commit 871eb67 into fastlane:master Sep 7, 2023
1 check passed
@getaaron
Copy link
Collaborator

getaaron commented Sep 7, 2023

Thanks very much for the pull request 🥳

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.

None yet