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

[spaceship] Use new app store statuses to filter app versions and app infos #21895

Merged
merged 8 commits into from May 3, 2024

Conversation

lucgrabowski
Copy link
Contributor

@lucgrabowski lucgrabowski commented Feb 27, 2024

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.
  • I've added or updated relevant unit tests.

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 and AppStoreVersion by state in App model.

  • Filtering AppStoreVersion by appVersionState attribute (instead of appStoreState that is deprecated) using AppStoreVersion::AppVersionState values.
  • Filtering AppInfo by state attribute (instead of appStoreState that is deprecated) using AppInfo::AppStoreState values.

Searching for DEVELOPER_REMOVED_FROM_SALE is removed from fetching live app_info and app_store_version.
Checking PROCESSING_FOR_DISTRIBUTION in get_live_app_store_version

Functionality that should be tested:

  • functionality of deliver tool, submitting for review, canceling review submission (reject_if_possible), downloading and uploading metadata and screenshots (also with use_live_version option), synchronizing screenshots when uploading to appstore connect,
  • deliver's html generator that creates a summary of metadata changes (deliver generate_summary),
  • precheck
  • AppStoreBuildNumberAction
  • DownloadDsymsAction
  • SetChangelogAction

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"

@lucgrabowski lucgrabowski marked this pull request as ready for review February 29, 2024 08:09
]

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)
Copy link
Collaborator

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

Copy link
Contributor Author

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

Copy link
Contributor Author

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.

@max-ott max-ott merged commit e8fe2a9 into master May 3, 2024
7 checks passed
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

3 participants