-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[spaceship] Use new app store statuses to filter app versions and app infos #21895
Conversation
] | ||
|
||
resp = client.get_app_infos(app_id: id, includes: includes) | ||
return resp.to_models.select do |model| | ||
states.include?(model.app_store_state) | ||
states.include?(model.state) |
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.
I had expected to see app_version_state
here. Are these 2 fields identical / duplicated in the returned data?
Also appVersionState
doesn't appear in the fixture data. Could we refresh the fixture data as well, to make it more up to date with real life data returned from the API? It would make it easier to review the code. Thanks
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.
I've added appVersionState
values to fixtures in a new commit. A fixture for AppInfo
is not present yet and should be added to code.
And about the state.
Those fields are not identical. app_version_state
is an attribute of AppStoreVersion
.
Filtering of AppInfo
needs to be done based on state
.
In the opan api spec, AppInfo
doesn't have an app version state, but it has state
with less values, e.g. there is no PENDING_APPLE_RELEASE or PENDING_DEVELOPER_RELEASE, but there is simply PENDING_RELEASE
For reference:
https://developer.apple.com/documentation/appstoreconnectapi/list_all_app_store_versions_for_an_app
https://developer.apple.com/documentation/appstoreconnectapi/appstoreversion/attributes
appStoreState
: ACCEPTED, DEVELOPER_REMOVED_FROM_SALE, DEVELOPER_REJECTED, IN_REVIEW, INVALID_BINARY, METADATA_REJECTED, PENDING_APPLE_RELEASE, PENDING_CONTRACT, PENDING_DEVELOPER_RELEASE, PREPARE_FOR_SUBMISSION, PREORDER_READY_FOR_SALE, PROCESSING_FOR_APP_STORE, READY_FOR_REVIEW, READY_FOR_SALE, REJECTED, REMOVED_FROM_SALE, WAITING_FOR_EXPORT_COMPLIANCE, WAITING_FOR_REVIEW, REPLACED_WITH_NEW_VERSION, NOT_APPLICABLE
appVersionState
: ACCEPTED, DEVELOPER_REJECTED, IN_REVIEW, INVALID_BINARY, METADATA_REJECTED, PENDING_APPLE_RELEASE, PENDING_DEVELOPER_RELEASE, PREPARE_FOR_SUBMISSION, PROCESSING_FOR_DISTRIBUTION, READY_FOR_DISTRIBUTION, READY_FOR_REVIEW, REJECTED, REPLACED_WITH_NEW_VERSION, WAITING_FOR_EXPORT_COMPLIANCE, WAITING_FOR_REVIEW
https://developer.apple.com/documentation/appstoreconnectapi/appinfo/attributes
appStoreState
state
: ACCEPTED, DEVELOPER_REJECTED, IN_REVIEW, PENDING_RELEASE, PREPARE_FOR_SUBMISSION, READY_FOR_DISTRIBUTION, READY_FOR_REVIEW, REJECTED, REPLACED_WITH_NEW_INFO, WAITING_FOR_REVIEW
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.
I've added a fixture for AppInfo
.
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
It is a follow up PR changing filters in requests to use new app store statuses introduced in #21890
Description
This PR changes methods used to filter
AppInfo
andAppStoreVersion
by state inApp
model.AppStoreVersion
byappVersionState
attribute (instead ofappStoreState
that is deprecated) usingAppStoreVersion::AppVersionState
values.AppInfo
bystate
attribute (instead ofappStoreState
that is deprecated) usingAppInfo::AppStoreState
values.Searching for
DEVELOPER_REMOVED_FROM_SALE
is removed from fetching liveapp_info
andapp_store_version
.Checking
PROCESSING_FOR_DISTRIBUTION
inget_live_app_store_version
Functionality that should be tested:
deliver
tool, submitting for review, canceling review submission (reject_if_possible), downloading and uploading metadata and screenshots (also withuse_live_version
option), synchronizing screenshots when uploading to appstore connect,Testing Steps
I tested changes during development in
spaceship playground
by running filtering methods and checking values in filters.I checked filters in requests and responses with a proxy (with SPACESHIP_DEBUG=1 enabled, https://github.com/fastlane/fastlane/blob/master/spaceship/docs/Debugging.md) when running downloading metadata and screenshots. I also tested generating html summary.
Help in testing precheck, uploading builds, metadata and screenshots, synchronizing screenshots, submitting apps for review, using actions, downloading dsyms would be appreciated.
Update
Gemfile
and run bundle install:gem "fastlane", :git => "https://github.com/fastlane/fastlane.git", :branch => "lucgrabowski-use-new-status-for-filters"