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] add a check in app_version.setup_screenshots to also check if there is an app_preview already uploaded #14738

Merged
merged 2 commits into from Mar 10, 2020

Conversation

xpy
Copy link
Contributor

@xpy xpy commented May 10, 2019

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

When trying to do any update, fastlane will first update the scaled flags of the display_families to true unless they have a screenshot. This doesn't take in account that a trailer (app preview) might be present instead. As a result, the scaled flag is set to true for said display_family and upon saving, the server complains that Your app preview can't be uploaded because you have selected to use an app preview from a larger display size.

This happens when a user tries to do a deliver, even with the skip_screenshots flags set to true. And that is because Fastlane will send the whole configuration again in order to update any part of it. The prerequisites are that there should be only video previews in a display_family that can be set as scalable. It might also happen if the overwrite_screenshots flag is also set to true.

Description

There is one more check added to check if the trailers key is present and the value key of it has contents.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@xpy
Copy link
Contributor Author

xpy commented May 10, 2019

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@janpio janpio changed the title add a check in setup_screenshots to also check if there is an app_preview alredy uploaded [spaceship] add a check in app_version.setup_screenshots to also check if there is an app_preview already uploaded May 10, 2019
@janpio
Copy link
Member

janpio commented May 10, 2019

The comment at the beginning of the method might need an update as well.

Can you also explain the bigger picture here? What would a user do to trigger this code?

@max-ott
Copy link
Contributor

max-ott commented May 15, 2019

Hey @xpy, looks like a great PR. What’s the fastest way to test this? Can I directly test it with spaceship?

@xpy
Copy link
Contributor Author

xpy commented May 15, 2019

@max-ott Hello! I have to admit that I only tested around my case and I didn't dive into other cases. What I do is fastlane deliver --skip_binary_upload true --run_precheck_before_submit false --force true --overwrite_screenshots true I also tried with --skip_screenshots and --skip_metadata and still have the same problem. And on the App Store Connect I have only one app preview video on the iPhone 5.5'', but I suspect it would also trigger for any display size that can be checked as "scalable".

@almostintuitive
Copy link
Contributor

hi! we're encountering the same issue, is there any chance this will be merged? thank you!

@max-ott
Copy link
Contributor

max-ott commented Jun 26, 2019

It needs more tests. We can’t simply merge each PR without enough tests and reviews from maintainers. As there were no other ways presented to easily test and debug this, its still waiting for more input from the author.

@xpy
Copy link
Contributor Author

xpy commented Jun 27, 2019

@max-ott I already mentioned that I tested for the very case that the PR is about. I also described the way to reproduce, if it seems difficult to reproduce, it probably is because it is indeed a very specific case that is difficult to reproduce. I am not sure what else you expect from me to do to validate this PR.

@max-ott
Copy link
Contributor

max-ott commented Jul 5, 2019

@xpy as this changes spaceship behaviour it would be useful to have steps to reproduce via spacecship. PRs require tests from other people than the initial contributor and if no one else can test it, it won't get merged.

Easiest way would be to provide steps for the spaceship playground / IRB. (https://github.com/fastlane/fastlane/blob/master/spaceship/docs/AppStoreConnect.md)

@max-ott
Copy link
Contributor

max-ott commented Jul 23, 2019

EDIT: This fixed indeed a small problem. spaceship incorrectly adds the scaled = true flag to all device categories, even if there is an app preview present. This fixes the case, when you want to upload another app preview. (Case: No screenshots in that device_family, but an app preview)

To Do (Other PR): Display scaled = true for the initial upload of an app preview. upload_trailer! still fails, if you a) don't have a screenshot in that device category and b) did not manually disable the scaled property.

@joshdholtz This is ready to get merged. I spent ~ half a day testing this directly with spaceship.

@mackoj
Copy link
Contributor

mackoj commented Jan 21, 2020

This fix, fixes our CI has anyone have any issue with it ?

@rabbitinspace
Copy link
Contributor

fixed #15036 for me as well

@mackoj
Copy link
Contributor

mackoj commented Feb 12, 2020

Hi @joshdholtz,
Could you review this PR please ?

@joshdholtz
Copy link
Member

Ah yes yes! I will do some review on this this week! Thanks for friendly ping ❤️

@mackoj
Copy link
Contributor

mackoj commented Mar 10, 2020

How could we help with this PR ? Did you get time to review it @joshdholtz ?

@joshdholtz
Copy link
Member

@mackoj Thanks for ping on this! Got lost in the shuffle 😔 Bumping this to top of list for rest of this week

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 great! Sorry it took so long to get through 😔 I'm really trying to improve my personal processes to keep conversations and merges going. Sorry to everyone that needed this but really appreciate the contribution! ❤️

@joshdholtz joshdholtz merged commit ad1cf01 into fastlane:master Mar 10, 2020
@fastlane-bot
Copy link

Hey @xpy 👋

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 🚀

Copy link

@fastlane-bot fastlane-bot left a comment

Choose a reason for hiding this comment

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

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

@fastlane fastlane locked and limited conversation to collaborators May 23, 2020
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

9 participants