Skip to content

[deliver] fix app previews always running during usage.#29989

Merged
iBotPeaches merged 3 commits into
masterfrom
issue-29983
Apr 29, 2026
Merged

[deliver] fix app previews always running during usage.#29989
iBotPeaches merged 3 commits into
masterfrom
issue-29983

Conversation

@iBotPeaches

Copy link
Copy Markdown
Member

Problem

App Previews is gated by the config parameter app_previews_path, which was silently populated like it was an output directory. So the logic always ran. Which would normally just "no-op" since no videos, but it first captures version number. If the IPA is purely internal and no public facing versions - it crashes.

Solution

Gate App Previews only be the existence of the parameter. This make using App Previews "opt in".

fixes: #29983

@iBotPeaches iBotPeaches changed the title [deliver] fix all previews always running [deliver] fix app previews always running during usage. Apr 23, 2026
@iBotPeaches iBotPeaches marked this pull request as ready for review April 23, 2026 12:41
UI.important("Uploading App Preview videos...")
validate_path!

localizations = editable_version.get_app_store_version_localizations

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Seems unrelated but looks ok

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah good call out. I first thought adding some defensive logic in case you can't get a version, but now that its probably gated - it was probably overkill.

Comment thread deliver/spec/detect_values_spec.rb Outdated
it 'sets up app previews folder in fastlane folder' do
expect(options[:app_previews_path]).to eq('./fastlane/app-previews')
it 'does not automatically set up app previews folder in fastlane folder even if it exists' do
FileUtils.mkdir_p('./fastlane/app-previews')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Creating and removing folders within tests is a bit brittle.

unless you want to mock the file system

  • you could add an extra desc/before/after to ensure they get taken care of by rspsec
  • you could also use a test specific temp folder (as in Deliver::UploadMetadata spec)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

makes sense. I adapted following the pattern of UploadMetadata (spawning a temp dir, working in there, cleaning up in after)

@ccaruceru ccaruceru left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this lgtm. the only suggestion I have is to remove the tests about app_previews_path since they became... irrelevant.

@iBotPeaches iBotPeaches merged commit 686627a into master Apr 29, 2026
14 checks passed
@iBotPeaches iBotPeaches deleted the issue-29983 branch April 29, 2026 10:20

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey @iBotPeaches 👋

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 month, 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 🚀"

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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.233.1 🚀

@github-actions github-actions Bot locked and limited conversation to collaborators Jun 29, 2026
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.

2.233.0: sync_app_previews runs unconditionally during upload_metadata, crashes when no editable App Store version exists

4 participants