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

[supply] Prefer all default tracks when downloading metadata from Play store #20010

Merged
merged 1 commit into from
Feb 26, 2022
Merged

[supply] Prefer all default tracks when downloading metadata from Play store #20010

merged 1 commit into from
Feb 26, 2022

Conversation

tkorri
Copy link
Contributor

@tkorri tkorri commented Feb 23, 2022

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've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

Resolves #19926

Description

Fixes version selection in a situation where the version is not available in production or beta tracks of Google Play store.

Previously the code preferred the production track version, and if that wasn't available it chose the beta track. This logic failed when neither of these tracks were used, i.e. a version published on the internal track was promoted to the alpha track.

This PR changes the track selection logic by sorting the matching release versions by track. The sort order is production, beta, alpha, internal and everything else after that.

Testing Steps

  1. Publish a version to internal track on Play Store.
  2. Promote the internal track version to alpha track
  3. Download release metadata with download_from_play_store

Prefer tracks in production, beta, alpha, internal order when
searching for a release version from Play Store.
@tkorri
Copy link
Contributor Author

tkorri commented Feb 23, 2022

It seems that I cannot trigger a rerun for the failed build in CircleCI. But I guess the failure was just a random glitch, as it failed at code checkout.

Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks so much cleaner! Thank you for this 😊

@joshdholtz joshdholtz merged commit 12e5fe5 into fastlane:master Feb 26, 2022
@fastlane-bot
Copy link

Hey @tkorri 👋

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 fastlane locked and limited conversation to collaborators Apr 28, 2022
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.

Fastlane fails when downloading metadata from Google Play
3 participants