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

Fix nightly test runs. #2663

Merged
merged 2 commits into from
Feb 1, 2025

Conversation

brandonpage
Copy link
Contributor

@brandonpage brandonpage commented Feb 1, 2025

This PR changes the Nightly test structure from running one Firebase Test Lab with all supported API levels simultaneously to running them sequentially.

If we try to run 8 instances (API 28 to 35) of our tests at once, matrixes across all of our libraries, it is simply too many simultaneous API calls to the server and the tokens gets invalidated. This also probably would have lead to a lot of flapping tests in MobileSync when manipulating data on the server.

Here is an example of the report from a test I ran with just 28 and 35:
Screenshot 2025-01-31 at 4 22 47 PM

In production it will show all (8 as of now) supported API levels in a single report page per library:

Screenshot 2025-01-31 at 6 37 28 PM

--directories-to-pull=/sdcard \
--results-dir=${GCLOUD_RESULTS_DIR} \
--results-history-name=${{ inputs.lib }} \
--timeout=20m --no-auto-google-login --no-record-video --no-performance-metrics --num-flaky-test-attempts=1 || true
Copy link
Contributor Author

@brandonpage brandonpage Feb 1, 2025

Choose a reason for hiding this comment

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

The || true is a little trick to ensure the test run does not return a non-zero value to the shell, since that will cause the entire step to end before we have looped through all API levels.

This is fine because the "Test Report" step below fails if any tests fail.

- name: Copy Test Results
continue-on-error: true
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 put this here and on the "Run Tests" step just to help ensure we actually loop though all API levels.

Comment on lines +134 to +136
if $IS_PR ; then
echo "No test results found"
exit 1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Error on PR to make sure expected tests were actually run.

Comment on lines +113 to +115
# Most used according to https://gs.statcounter.com/android-version-market-share/mobile-tablet/worldwide
PR_API_VERSION: "34"
FULL_API_RANGE: "28 29 30 31 32 33 34 35"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As I have said on previous PR's but wow, how does Github Actions not support YAML Anchors???

I am actively watching the (4 year old!) issue requesting the feature which may actually be getting fulfilled soon, but I will specially mention this needs to be updated in multiple places on out Github Actions doc.

@brandonpage brandonpage merged commit 1be9dc5 into forcedotcom:dev Feb 1, 2025
3 checks passed
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.

2 participants