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

[fastlane_core][pilot][deliver] fix when polling for build processing to poll for X.Y and X.Y.0 #18547

Merged

Conversation

joshdholtz
Copy link
Member

@joshdholtz joshdholtz commented Apr 13, 2021

Motivation and Context

Apple sees versions with as X.Y and X.Y.0 as the same. This can lead to issues when waiting for build processing as the queryable version format is the type that was first uploaded.

Example: If first version was X.Y and next uploads were X.Y.0, the API returns nothing when querying for X.Y.0 but will for X.Y

This will lead to an infinite poll as nothing will ever appear for X.Y.0.

Description

A few changes have been made to FastlaneCore::BuildWatcher

  1. If patch version is 0, an extra API call will be made with the major and minor versions
  2. If no patch version, an extra API call will be made with a 0 patch version

If watched app version will be given preference if a build exists in that one. Otherwise the build will be taken from the secondary API request.

New logs have also been added when a build is found in the adjusted version 👇

Sample of new log

[09:10:40]: App version is 0.1 but build was found while querying 0.1.0                                                                                                  
[09:10:40]: This shouldn't be an issue as Apple sees 0.1 and 0.1.0 as equal                                                                                              
[09:10:40]: See docs for more info - https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#/
/apple_ref/doc/uid/20001431-102364   

Full log with addition

[09:08:01]: Waiting for processing on... app_id: 1517717965, app_version: 0.1, build_version: 1618322818, platform: IOS                                                  
[09:08:02]: Read more information on why this build isn't showing up yet - https://github.com/fastlane/fastlane/issues/14997                                             
[09:08:02]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues)                  
[09:08:33]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues)                  
[09:09:04]: Waiting for the build to show up in the build list - this may take a few minutes (check your email for processing issues if this continues)                  
[09:09:37]: Waiting for App Store Connect to finish processing the new build (0.1 - 1618322818) for IOS                                                                  
[09:10:09]: Waiting for App Store Connect to finish processing the new build (0.1 - 1618322818) for IOS                                                                  
[09:10:40]: Successfully finished processing the build 0.1 - 1618322818 for IOS                                                                                          
[09:10:40]: App version is 0.1 but build was found while querying 0.1.0                                                                                                  
[09:10:40]: This shouldn't be an issue as Apple sees 0.1 and 0.1.0 as equal                                                                                              
[09:10:40]: See docs for more info - https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#/
/apple_ref/doc/uid/20001431-102364                                                                                                                                       
[09:10:40]: Using App Store Connect's default for notifying external testers (which is true) - set `notify_external_testers` for full control                            
[09:10:40]: Distributing new build to testers: 0.1 - 1618322818                                                                                                          
[09:10:41]: Export compliance has been set to 'false'. Need to wait for build to finishing processing again...                                                           
[09:10:41]: Set 'ITSAppUsesNonExemptEncryption' in the 'Info.plist' to skip this step and speed up the submission                                                        
[09:10:42]: Successfully distributed build to Internal testers 🚀                 

@google-cla google-cla bot added the cla: yes label Apr 13, 2021
@joshdholtz joshdholtz requested a review from ainame April 13, 2021 21:17
@joshdholtz joshdholtz removed the request for review from ainame April 14, 2021 02:19
@joshdholtz joshdholtz merged commit 8aed3be into master Apr 14, 2021
@joshdholtz joshdholtz deleted the joshdholtz-build-watcher-optional-patch-version-fix branch April 14, 2021 02:20
@fastlane-bot
Copy link

Hey @joshdholtz 👋

Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a week, and your PR will be included in the next one.

Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀

@fastlane-bot
Copy link

Congratulations! 🎉 This was released as part of fastlane 2.181.0 🚀

@DTRobertson9194
Copy link

Hey Josh, I think we are experiencing an issue as a result of this change. We are leveraging the X.Y.Z (ex. 21.4.3 for 2021, April, Release number 3) for release versions and now are caught in the infinite "Waiting for the build to show up in the build list" issue. Does the query still account for those apps that are using 3 digit release versions constantly?
We had an upload that sat for 24 hours in Testflight experience this (21.4.2 released 4/26) while everything else with the metadata worked, then again in our attempt today. The timing for this commit lines up with the start of our issue (21.4.1 went out 4/7/2021 no issues) .

Sorry if this isn't the proper forum, but I was digging in the release notes and noted this tweak to deliver. I can raise a ticket and provide more info wher/if needed.

@fastlane fastlane locked and limited conversation to collaborators Jun 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants