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

Remove existing builds from review with publish #288

Closed
kevmo314 opened this issue Nov 26, 2022 · 5 comments · Fixed by #289
Closed

Remove existing builds from review with publish #288

kevmo314 opened this issue Nov 26, 2022 · 5 comments · Fixed by #289
Labels
enhancement New feature or request

Comments

@kevmo314
Copy link

Is it possible to remove any pending builds from review with the publish command? We end up having a decent number of builds get rejected because there's already a build pending for review which makes our testflight not match the latest version.

@kevmo314
Copy link
Author

kevmo314 commented Nov 26, 2022

This would be similar to fastlane's reject_if_possible: http://docs.fastlane.tools/actions/upload_to_app_store/#upload_to_app_store

or expire_previous_builds for testflight: https://docs.fastlane.tools/actions/pilot/

@priitlatt priitlatt added the enhancement New feature or request label Nov 28, 2022
@priitlatt
Copy link
Contributor

Hi @kevmo314, thanks for bringing this up. This sure sounds like a useful addition to app-store-connect publish. We'll give it some more thought on how to implement it and let you know. But please note that as of now I'm not yet able to give any ETA for it.

@VeArnold
Copy link
Contributor

@kevmo314

Hi! :)

Good proposal. However, to understand the aims and goals better, based on your description, it seems that the more fitting extension would be equivalent to Fastlane's reject_build_waiting_for_review instead of expire_previous_builds.

Please correct me if I am missing something. Thanks! :)

@kevmo314
Copy link
Author

Yeah that's probably correct. We run publish as our last CI/CD step right now and it fails due to an existing build being in review (both testflight and app store) so the ideal behavior would be to be able to unmark the older builds

@VeArnold
Copy link
Contributor

VeArnold commented Feb 6, 2023

Hi @kevmo314!

This got slightly delayed but has now been merged in #289.

For Codemagic CLI tools users
The following actions:

  • app-store-connect builds submit-to-app-store - docs
  • app-store-connect publish - docs

now accept the flag --cancel-previous-submissions.

The flag acts the same as fastlane's reject_if_possible. Where before submission, there's an attempt to cancel any previous submission for the application that is in any of the following states: WAITING_FOR_REVIEW, IN_REVIEW or UNRESOLVED_ISSUES.

The following actions:

  • app-store-connect builds submit-to-testflight - docs
  • app-store-connect publish - docs

now accept the flag --expire-build-submitted-for-review.

The flag acts similarly to fastlane's reject_build_waiting_for_review; however, a build both in status IN_REVIEW, and WAITING_FOR_REVIEW is expired, as in both cases further submissions are blocked.

Alternatively, these actions (which are used within the flags) can be called directly for a specific application as well, such as:

  • app-store-connect apps expire-build-submitted-for-review <app-id> - docs
  • app-store-connect apps cancel-review-submissions <app-id> - docs

When using the flag, the blocking build or submission will be expired/cancelled if in a state where it is possible. For cancel-review-submissions, within the action itself, it is possible to target more specifically what you wish to cancel, e.g., specify the platform or state to cancel; see docs. Note that an expired build will no longer be available for testers.

For Codemagic CI/CD users
This option was also added for Codemagic CI/CD users using the codemagic.yaml configuration. The relevant examples have been added to the documentation.

For submitting to Testflight, the publishing section has to be updated as follows:

publishing:
  app_store_connect:
    submit_to_testflight: true
    expire_build_submitted_for_review: true

And for App Store, as follows:

publishing:
  app_store_connect:
    submit_to_app_store: true
    cancel_previous_submissions: true

Along with these, some other actions were introduced with the PR, which can be seen in the changelog.
Thanks again for the feedback and request! :) Please try it out, and let us know if you encounter any unexpected behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants