As it is now, running app-store-connect actions get-latest-testflight-build-number, get-latest-app-store-build-number and get-latest-build-number will fetch a lot of data for pre-release and App Store versions from from App Store Connect (full object representations and all their references to related objects). With more than just handful of App Store / pre-release versions listing API calls can become very slow, and as we're paginating over those resources, the problem only gets worse. In some extreme cases we've seen app-store-connect get-latest-build-number to run for more than 20 minutes, which is far from ideal.
To speed things up, ask only the bare minimum of information from App Store Connect API when paginating over the resources:
just id and version attribute for pre-release versions,
just id and versionString attribute for pre-release versions,
just id and version attribute for build.
By asking only specific attributes, the API does not return any other attributes nor any relationships the object has. By doing so the requests are processed faster and we get the response back with smaller waiting duration. This was achieved by specifying fields[<resourceName>] query parameter for the relevant GET requests.
For that new App Store Connect API Client methods were added:
codemagic.apple.app_store_connect.apps.Apps.list_app_store_versions_data to fetch application's App Store versions as list[dict].
codemagic.apple.app_store_connect.versioning.AppStoreVersions.read_build_data to fetch build of App Store version as plain dict.
codemagic.apple.app_store_connect.versioning.PreReleaseVersions.list_data to fetch pre-release versions as list[dict].
codemagic.apple.app_store_connect.versioning.PreReleaseVersions.list_builds_data to fetch builds of pre-release version as list[dict].
Action definitions, along with helper methods, were moved away from AppStoreConnect tool main class definition and were (re)implemented in dedicated abstract action classes which are plugged-in to main class as mix-ins.
As it is now, running
app-store-connect
actionsget-latest-testflight-build-number
,get-latest-app-store-build-number
andget-latest-build-number
will fetch a lot of data for pre-release and App Store versions from from App Store Connect (full object representations and all their references to related objects). With more than just handful of App Store / pre-release versions listing API calls can become very slow, and as we're paginating over those resources, the problem only gets worse. In some extreme cases we've seenapp-store-connect get-latest-build-number
to run for more than 20 minutes, which is far from ideal.To speed things up, ask only the bare minimum of information from App Store Connect API when paginating over the resources:
id
andversion
attribute for pre-release versions,id
andversionString
attribute for pre-release versions,id
andversion
attribute for build. By asking only specific attributes, the API does not return any other attributes nor any relationships the object has. By doing so the requests are processed faster and we get the response back with smaller waiting duration. This was achieved by specifyingfields[<resourceName>]
query parameter for the relevantGET
requests.For that new App Store Connect API Client methods were added:
codemagic.apple.app_store_connect.apps.Apps.list_app_store_versions_data
to fetch application's App Store versions aslist[dict]
.codemagic.apple.app_store_connect.versioning.AppStoreVersions.read_build_data
to fetch build of App Store version as plaindict
.codemagic.apple.app_store_connect.versioning.PreReleaseVersions.list_data
to fetch pre-release versions aslist[dict]
.codemagic.apple.app_store_connect.versioning.PreReleaseVersions.list_builds_data
to fetch builds of pre-release version aslist[dict]
.Action definitions, along with helper methods, were moved away from
AppStoreConnect
tool main class definition and were (re)implemented in dedicated abstract action classes which are plugged-in to main class as mix-ins.Updated actions:
app-store-connect get-latest-testflight-build-number
app-store-connect get-latest-app-store-build-number
app-store-connect get-latest-build-number