Skip to content

Bugfix MTE-4133 Disable retries in fastlane #24251

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

Closed
wants to merge 27 commits into from

Conversation

clarmso
Copy link
Collaborator

@clarmso clarmso commented Jan 20, 2025

📜 Tickets

Jira ticket

💡 Description

Let's enable retries on the L10n test plan so that we will get some screenshots in just in case of flaky tests.

Bitrise L10nBuild workflow: https://app.bitrise.io/build/f078a5ac-5f28-4a23-b444-6fd7238d012f?tab=log

📝 Checklist

You have to check all boxes before merging

  • Filled in the above information (tickets numbers and description of your work)
  • Updated the PR name to follow our PR naming guidelines
  • Wrote unit tests and/or ensured the tests suite is passing
  • When working on UI, I checked and implemented accessibility (minimum Dynamic Text and VoiceOver)
  • If needed, I updated documentation / comments for complex code and public methods
  • If needed, added a backport comment (example @Mergifyio backport release/v120)

@clarmso clarmso requested a review from a team as a code owner January 20, 2025 19:46
@@ -46,7 +46,7 @@ for lang in $LOCALES; do
if [ "$?" != "0" ]; then
echo "Fastlane exited with code: $?"
exit $?
elif grep -q "** TEST FAILED **"; then
elif grep -q "TEST FAILED" "output.txt"; then
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

"output.txt" was missing previously, so this line might not be working properly before.

@@ -34,7 +34,7 @@ for lang in $LOCALES; do
echo "$(date) Snapshotting $lang"
mkdir "l10n-screenshots/$lang"
fastlane snapshot --project firefox-ios/Client.xcodeproj --scheme L10nSnapshotTests \
--number_of_retries 0 \
--number_of_retries 3 \
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can't tell if the default value has changed or not by reading the documentation. Let's hard code this value.

Copy link
Collaborator Author

@clarmso clarmso Jan 20, 2025

Choose a reason for hiding this comment

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

👀 testHistoryTableContextMenu failed. The whole list of tests are rerun. This may not be what we want.
https://app.bitrise.io/build/bc7e1954-3780-4157-afeb-51e10ad9ff3d?tab=log

Copy link
Contributor

@isabelrios isabelrios Jan 21, 2025

Choose a reason for hiding this comment

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

no, we don't want retries. Just one execution per locale no matter the reesult. Please see explanation here:https://mozilla.slack.com/archives/C02KSH6QNBS/p1737374666180979?thread_ts=1737374476.241319&cid=C02KSH6QNBS

Copy link
Contributor

Choose a reason for hiding this comment

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

This option is ignored now by fastlane. We should use set the retry opion to off from xcode and to do that, we need to create a test plan for the L10n schema where we can configure that. I have done that locally, forced a test to fail, and there are no retries.
Please try that and let me know in case you want a hack session to do that together.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have created a L10nSnapshotTests test plan and have the schema to use the test plan.

--skip_open_summary \
--xcargs "-maximum-parallel-testing-workers 2" \
--derived_data_path l10n-screenshots-dd \
--ios_version "18.2" \
--erase_simulator --localize_simulator \
--devices "iPhone 16" --languages "$lang" \
--output_directory "l10n-screenshots/$lang" \
--xcodebuild_formatter xcbeautify \
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The default formatter on Bitrise is now xcbeautify. I have intermittent issues on xcpretty currently with the latest fastlane. Let me ensure that I use the same formatter locally.

}
],
"defaultOptions" : {
"testRepetitionMode" : "retryOnFailure",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have enabled "Retry on Failure" for the test plan's config. The default value is 3.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When I run the test on Xcode 16, I see the following line in the logs:

Test Case '-[L10nSnapshotTests.L10nSuite1SnapshotTests test3ReloadButtonContextMenu]' started (Iteration 1 of 3).

In addition, a test retries 3 times when I made it to fail on purpose.

Copy link
Contributor

@isabelrios isabelrios Jan 22, 2025

Choose a reason for hiding this comment

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

we should NOT retry on failure. Please read my comments above and on slack about that.
The option --number_of_retries 0 is being ignored. By adding a test plan what we want is to have the option to set the retry to off in xcode. It is being ignored with the fastlane option but looks like if we have it enabled via xcode it works.
We don't want tests to retry because we run 6 locales per build, if there are retries, it takes too long to run each set of locales that builds timeout in Bitrise. If a test fail, we only miss that screenshoot, the rest are generated

@isabelrios isabelrios changed the title Bugfix MTE-4133 Enable retries in fastlane Bugfix MTE-4133 Disable retries in fastlane Jan 22, 2025
@clarmso
Copy link
Collaborator Author

clarmso commented Jan 22, 2025

Note that the formatting tests for focus-ios are failing. Let me recreate on another branch to see if anything from main fixes the issue.

Marceau TONELLI and others added 14 commits January 22, 2025 14:16
…l to use nested configurations (#24219)

* Merge exclude paths from focus-ios to root config

* Disable rules that trigger violations in focus-ios using a nested configuration

* Updated Swiftlint run phases of each subprojects to use nested configs

* Update Bitrise configuration to make use of nested configurations

---------

Co-authored-by: tonell_m <[email protected]>
… Widget (#24244)

* Completed Ticket

* Linter error fixed
* Fix closure length violation in Focus.

* Fix to properly swiftlint ignore nimbus generated files in Focus.
* Add FXIOS-10902 Firefox iOS: Send data deletion request when DAU ping is toggled off

* Update data review link

* Fix PR comments
…0118050318 (#24230)

* Auto update SPM with latest rust-component release 136.0.20250118050318

* Fix build issue with new ftsMatchInfo type added to Suggestion.amp case.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ih-codes <[email protected]>
…isabled when tapping on secure connection and returning to panel (#24264)

FXIOS-11127 #24262 ⁃ [Felt privacy - unified panel] - ETP toggle is disabled when tapping on secure connection and returning to panel
…n endpoint in beta (#24255)

Ensure we use production endpoint in beta
lmarceau and others added 6 commits January 22, 2025 14:16
…es (#24253)

* - Moved default browser user default to default browser util
- Change logic of rating prompt, remove cumulative days of use counter
- Call rating prompt on init of BVC
- Remove rating prompt from dependency container

* Fix tests

* Use time interval instead of calendar
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…r telemetry (#24257)

* Ensure we send to both places for telemetry

* Add tests, remove static from SponsoredTileTelemetry todo so

* Fix

* Remove savedEvent and replace with SavedEvents

* Add event check on array

* Adjust for latest main
…Terms of Service' card to maintain consistency with the other Onboarding Cards (#24280)

* FXIOS-11138 [Terms of service] Landscape mode should not be supported for 'Terms of Service' card to maintain consistency with the other Onboarding Cards

* Moved override methods inside the main class
FXIOS-11128 [Terms of service] - "Continue" is written with lowercase
@clarmso clarmso requested a review from a team as a code owner January 22, 2025 19:16
@clarmso
Copy link
Collaborator Author

clarmso commented Jan 22, 2025

Cherry pick to a new branch. #24285

@clarmso clarmso closed this Jan 22, 2025
@mobiletest-ci-bot
Copy link

Warnings
⚠️ Pull Request size seems relatively large. If this Pull Request contains multiple changes, please split each into separate PR will helps faster, easier review. Consider using epic branches for work that would affect main.
Messages
📖 Project coverage: 33.95%
📖 Edited 121 files
📖 Created 3 files

Client.app: Coverage: 32.37

File Coverage
TrackingProtectionViewController.swift 12.14% ⚠️
EditBookmarkViewController.swift 36.59% ⚠️
BrowserViewController.swift 3.53% ⚠️
LegacyFeatureFlagsManager.swift 95.6%
BookmarksCoordinator.swift 73.68%
TermsOfServiceViewController.swift 81.42%
HomepageContextMenuHelper.swift 3.99% ⚠️
GleanUsageReporting.swift 67.07%
GleanPlumbContextProvider.swift 100.0%
LegacyBookmarksPanel.swift 39.7% ⚠️
AppDelegate.swift 0.0% ⚠️
BookmarksViewController.swift 8.91% ⚠️
TopSitesViewModel.swift 33.48% ⚠️
RouteBuilder.swift 88.8%
DefaultBrowserUtil.swift 88.06%
UnifiedAdsCallbackTelemetry.swift 86.57%
BaseCoordinator.swift 93.94%
TopSite.swift 46.67% ⚠️
ActionProviderBuilder.swift 0.0% ⚠️
BookmarksTelemetry.swift 100.0%
EditBookmarkCell.swift 0.0% ⚠️
NimbusFlaggableFeature.swift 99.3%
TopSiteState.swift 54.93%
SponsoredTileTelemetry.swift 100.0%
EditFolderViewController.swift 43.56% ⚠️
DependencyHelper.swift 0.0% ⚠️
NimbusFeatureFlagLayer.swift 63.39%
OneLineTableViewCell.swift 0.0% ⚠️
TelemetryWrapper.swift 66.9%
SceneDelegate.swift 0.0% ⚠️
LegacyBookmarkDetailPanel.swift 17.98% ⚠️
BookmarksFolderCell.swift 0.0% ⚠️
BookmarksSaver.swift 97.35%
RatingPromptManager.swift 97.58%
PrivacyPreferencesViewController.swift 0.0% ⚠️
GleanWrapper.swift 16.07% ⚠️
CoreFlaggableFeature.swift 100.0%

WidgetKitExtension.appex: Coverage: 7.05

File Coverage
OpenTabsWidget.swift 0.0% ⚠️

libStorage.a: Coverage: 55.32

File Coverage
RustFirefoxSuggestion.swift 23.53% ⚠️

Generated by 🚫 Danger Swift against 46fc441

@rvandermeulen rvandermeulen deleted the cs/MTE-4133-bitrise-retries branch February 11, 2025 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.