Skip to content

[Storage] Migrate from Robolectric.flushForegroundThreadScheduler to ShadowLooper.runToEndOfTasks #6927

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

Merged
merged 7 commits into from
May 6, 2025

Conversation

rlazo
Copy link
Collaborator

@rlazo rlazo commented May 1, 2025

The Robolectric Scheduler APIs are designed for LEGACY Looper mode, where tasks were controlled by Scheduler objects. LEGACY Looper mode has been deprecated for 5+ years. Migrate from Robolectric.flushForegroundThreadScheduler to ShadowLooper APIs.

See cl/752917858 for reference

…ShadowLooper.runToEndOfTasks

The Robolectric Scheduler APIs are designed for LEGACY Looper mode, where tasks
were controlled by Scheduler objects. LEGACY Looper mode has been deprecated
for 5+ years. Migrate from Robolectric.flushForegroundThreadScheduler to
ShadowLooper APIs.

See cl/752917858 for reference
Copy link
Contributor

github-actions bot commented May 1, 2025

📝 PRs merging into main branch

Our main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released.

Copy link
Contributor

github-actions bot commented May 1, 2025

Vertex AI Mock Responses Check ⚠️

A newer major version of the mock responses for Vertex AI unit tests is available. update_responses.sh should be updated to clone the latest version of the responses: v11.1

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 1, 2025

Coverage Report 1

Affected Products

  • firebase-storage

    Overall coverage changed from 83.96% (4c29e0b) to 84.00% (b800a03) by +0.04%.

    FilenameBase (4c29e0b)Merge (b800a03)Diff
    UploadTask.java81.52%81.85%+0.33%

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/wZC5onh5ps.html

Copy link
Contributor

github-actions bot commented May 1, 2025

Test Results

 44 files   -  1 012   44 suites   - 1 012   6m 11s ⏱️ - 29m 8s
136 tests  -  5 838  136 ✅  -  5 816  0 💤  - 22  0 ❌ ±0 
292 runs   - 11 719  292 ✅  - 11 675  0 💤  - 44  0 ❌ ±0 

Results for commit 4f1aee6. ± Comparison against base commit 525f293.

This pull request removes 5838 tests.
com.google.android.datatransport.cct.CctBackendFactoryTest ‑ create_returnCCTBackend_WhenBackendNameIsCCT
com.google.android.datatransport.cct.CctDestinationTest ‑ cctDestination_shouldOnlySupportProtoAndJson
com.google.android.datatransport.cct.CctDestinationTest ‑ cctDestination_shouldSupportProtoAndJson
com.google.android.datatransport.cct.CctTransportBackendTest ‑ decorate_whenOffline_shouldProperlyPopulateNetworkInfo
com.google.android.datatransport.cct.CctTransportBackendTest ‑ decorate_whenOnline_shouldProperlyPopulateNetworkInfo
com.google.android.datatransport.cct.CctTransportBackendTest ‑ schedule_shouldAddCookieOnPseudonymousIds
com.google.android.datatransport.cct.CctTransportBackendTest ‑ schedule_shouldDropCookieOnMixedPseudonymousIds
com.google.android.datatransport.cct.CctTransportBackendTest ‑ send_CompressedResponseIsUncompressed
com.google.android.datatransport.cct.CctTransportBackendTest ‑ send_whenBackendRedirectsMoreThan5Times_shouldOnlyRedirect4Times
com.google.android.datatransport.cct.CctTransportBackendTest ‑ send_whenBackendRedirects_shouldCorrectlyFollowTheRedirectViaPost
…

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 1, 2025

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 1, 2025

Startup Time Report 1

Note: Layout is sometimes suboptimal due to limited formatting support on GitHub. Please check this report on GCS.

Notes

Startup Times

  • fire-app-check

    DeviceStatisticsDistributions
    oriole-32
    Percentile4c29e0bb800a03DiffSignificant (?)
    p10140 ±15 μs372 ±734 μs+231 μs (+164.9%)NO
    p25152 ±14 μs389 ±755 μs+237 μs (+156.3%)NO
    p50172 ±20 μs433 ±788 μs+260 μs (+150.9%)NO
    p75221 ±31 μs529 ±881 μs+308 μs (+139.7%)NO
    p90301 ±60 μs682 ±987 μs+381 μs (+126.4%)NO

    19 test runs in comparison
    CommitTest Runs
    4c29e0b
    • 2025-05-06_17:48:35.490961_WJMD
    • 2025-05-06_17:48:35.491847_NzUf
    • 2025-05-06_17:48:35.491855_AXMH
    • 2025-05-06_17:48:35.491860_vPUY
    • 2025-05-06_17:48:35.491864_JkjC
    • 2025-05-06_17:48:35.491868_EPaY
    • 2025-05-06_17:48:35.491875_ZrcI
    • 2025-05-06_17:48:35.491879_gAfI
    • 2025-05-06_17:48:35.491883_eahZ
    • 2025-05-06_17:48:35.491886_bSdU
    b800a03
    • 2025-05-06_18:35:34.418852_mMGW
    • 2025-05-06_18:35:34.418888_IWPj
    • 2025-05-06_18:35:34.418895_NvjB
    • 2025-05-06_18:35:34.418900_bgQS
    • 2025-05-06_18:35:34.418904_jkUg
    • 2025-05-06_18:35:34.418908_mDOT
    • 2025-05-06_18:35:34.418920_LItg
    • 2025-05-06_18:35:34.418924_tgNA
    • 2025-05-06_18:35:34.418928_oZoB
    redfin-30
    Percentile4c29e0bb800a03DiffSignificant (?)
    p10274 ±50 μs1.36 ±2 ms+1.09 ms (+396.1%)NO
    p25301 ±75 μs1.46 ±2 ms+1.16 ms (+384.4%)NO
    p50343 ±133 μs1.59 ±2 ms+1.25 ms (+365.1%)NO
    p75421 ±262 μs1.86 ±3 ms+1.44 ms (+341.9%)NO
    p90546 ±443 μs2.23 ±3 ms+1.68 ms (+308.2%)NO

    19 test runs in comparison
    CommitTest Runs
    4c29e0b
    • 2025-05-06_17:48:35.490961_WJMD
    • 2025-05-06_17:48:35.491847_NzUf
    • 2025-05-06_17:48:35.491855_AXMH
    • 2025-05-06_17:48:35.491860_vPUY
    • 2025-05-06_17:48:35.491864_JkjC
    • 2025-05-06_17:48:35.491868_EPaY
    • 2025-05-06_17:48:35.491875_ZrcI
    • 2025-05-06_17:48:35.491879_gAfI
    • 2025-05-06_17:48:35.491883_eahZ
    • 2025-05-06_17:48:35.491886_bSdU
    b800a03
    • 2025-05-06_18:35:34.418852_mMGW
    • 2025-05-06_18:35:34.418888_IWPj
    • 2025-05-06_18:35:34.418895_NvjB
    • 2025-05-06_18:35:34.418900_bgQS
    • 2025-05-06_18:35:34.418904_jkUg
    • 2025-05-06_18:35:34.418908_mDOT
    • 2025-05-06_18:35:34.418920_LItg
    • 2025-05-06_18:35:34.418924_tgNA
    • 2025-05-06_18:35:34.418928_oZoB
  • fire-gcs

    DeviceStatisticsDistributions
    oriole-32
    Percentile4c29e0bb800a03DiffSignificant (?)
    p1027.3 ±4 μs27.4 ±4 μs+135 ns (+0.5%)NO
    p2528.5 ±4 μs28.5 ±4 μs+24.8 ns (+0.1%)NO
    p5030.7 ±5 μs30.8 ±5 μs+99.0 ns (+0.3%)NO
    p7534.7 ±7 μs35.7 ±7 μs+993 ns (+2.9%)NO
    p9043.0 ±16 μs42.6 ±13 μs-424 ns (-1.0%)NO

    19 test runs in comparison
    CommitTest Runs
    4c29e0b
    • 2025-05-06_17:48:35.490961_WJMD
    • 2025-05-06_17:48:35.491847_NzUf
    • 2025-05-06_17:48:35.491855_AXMH
    • 2025-05-06_17:48:35.491860_vPUY
    • 2025-05-06_17:48:35.491864_JkjC
    • 2025-05-06_17:48:35.491868_EPaY
    • 2025-05-06_17:48:35.491875_ZrcI
    • 2025-05-06_17:48:35.491879_gAfI
    • 2025-05-06_17:48:35.491883_eahZ
    • 2025-05-06_17:48:35.491886_bSdU
    b800a03
    • 2025-05-06_18:35:34.418852_mMGW
    • 2025-05-06_18:35:34.418888_IWPj
    • 2025-05-06_18:35:34.418895_NvjB
    • 2025-05-06_18:35:34.418900_bgQS
    • 2025-05-06_18:35:34.418904_jkUg
    • 2025-05-06_18:35:34.418908_mDOT
    • 2025-05-06_18:35:34.418920_LItg
    • 2025-05-06_18:35:34.418924_tgNA
    • 2025-05-06_18:35:34.418928_oZoB
    redfin-30
    Percentile4c29e0bb800a03DiffSignificant (?)
    p1053.1 ±12 μs46.8 ±7 μs-6.22 μs (-11.7%)NO
    p2555.2 ±11 μs48.5 ±7 μs-6.62 μs (-12.0%)NO
    p5058.5 ±12 μs51.2 ±8 μs-7.37 μs (-12.6%)NO
    p7562.5 ±12 μs55.7 ±9 μs-6.81 μs (-10.9%)NO
    p9067.9 ±13 μs64.5 ±13 μs-3.34 μs (-4.9%)NO

    19 test runs in comparison
    CommitTest Runs
    4c29e0b
    • 2025-05-06_17:48:35.490961_WJMD
    • 2025-05-06_17:48:35.491847_NzUf
    • 2025-05-06_17:48:35.491855_AXMH
    • 2025-05-06_17:48:35.491860_vPUY
    • 2025-05-06_17:48:35.491864_JkjC
    • 2025-05-06_17:48:35.491868_EPaY
    • 2025-05-06_17:48:35.491875_ZrcI
    • 2025-05-06_17:48:35.491879_gAfI
    • 2025-05-06_17:48:35.491883_eahZ
    • 2025-05-06_17:48:35.491886_bSdU
    b800a03
    • 2025-05-06_18:35:34.418852_mMGW
    • 2025-05-06_18:35:34.418888_IWPj
    • 2025-05-06_18:35:34.418895_NvjB
    • 2025-05-06_18:35:34.418900_bgQS
    • 2025-05-06_18:35:34.418904_jkUg
    • 2025-05-06_18:35:34.418908_mDOT
    • 2025-05-06_18:35:34.418920_LItg
    • 2025-05-06_18:35:34.418924_tgNA
    • 2025-05-06_18:35:34.418928_oZoB
  • timeToInitialDisplay

    DeviceStatisticsDistributions
    oriole-32
    Percentile4c29e0bb800a03DiffSignificant (?)
    p10198 ±5 ms198 ±3 ms+114 μs (+0.1%)NO
    p25204 ±6 ms205 ±2 ms+157 μs (+0.1%)NO
    p50212 ±6 ms212 ±2 ms+794 μs (+0.4%)NO
    p75219 ±7 ms221 ±3 ms+1.93 ms (+0.9%)NO
    p90231 ±15 ms231 ±4 ms-421 μs (-0.2%)NO

    19 test runs in comparison
    CommitTest Runs
    4c29e0b
    • 2025-05-06_17:48:35.490961_WJMD
    • 2025-05-06_17:48:35.491847_NzUf
    • 2025-05-06_17:48:35.491855_AXMH
    • 2025-05-06_17:48:35.491860_vPUY
    • 2025-05-06_17:48:35.491864_JkjC
    • 2025-05-06_17:48:35.491868_EPaY
    • 2025-05-06_17:48:35.491875_ZrcI
    • 2025-05-06_17:48:35.491879_gAfI
    • 2025-05-06_17:48:35.491883_eahZ
    • 2025-05-06_17:48:35.491886_bSdU
    b800a03
    • 2025-05-06_18:35:34.418852_mMGW
    • 2025-05-06_18:35:34.418888_IWPj
    • 2025-05-06_18:35:34.418895_NvjB
    • 2025-05-06_18:35:34.418900_bgQS
    • 2025-05-06_18:35:34.418904_jkUg
    • 2025-05-06_18:35:34.418908_mDOT
    • 2025-05-06_18:35:34.418920_LItg
    • 2025-05-06_18:35:34.418924_tgNA
    • 2025-05-06_18:35:34.418928_oZoB
    redfin-30
    Percentile4c29e0bb800a03DiffSignificant (?)
    p10226 ±4 ms247 ±4 ms+21.1 ms (+9.3%)YES
    p25232 ±4 ms254 ±4 ms+22.0 ms (+9.5%)YES
    p50239 ±4 ms262 ±3 ms+22.6 ms (+9.4%)YES
    p75248 ±5 ms270 ±3 ms+22.4 ms (+9.0%)MAYBE
    p90257 ±6 ms282 ±5 ms+24.7 ms (+9.6%)MAYBE

    19 test runs in comparison
    CommitTest Runs
    4c29e0b
    • 2025-05-06_17:48:35.490961_WJMD
    • 2025-05-06_17:48:35.491847_NzUf
    • 2025-05-06_17:48:35.491855_AXMH
    • 2025-05-06_17:48:35.491860_vPUY
    • 2025-05-06_17:48:35.491864_JkjC
    • 2025-05-06_17:48:35.491868_EPaY
    • 2025-05-06_17:48:35.491875_ZrcI
    • 2025-05-06_17:48:35.491879_gAfI
    • 2025-05-06_17:48:35.491883_eahZ
    • 2025-05-06_17:48:35.491886_bSdU
    b800a03
    • 2025-05-06_18:35:34.418852_mMGW
    • 2025-05-06_18:35:34.418888_IWPj
    • 2025-05-06_18:35:34.418895_NvjB
    • 2025-05-06_18:35:34.418900_bgQS
    • 2025-05-06_18:35:34.418904_jkUg
    • 2025-05-06_18:35:34.418908_mDOT
    • 2025-05-06_18:35:34.418920_LItg
    • 2025-05-06_18:35:34.418924_tgNA
    • 2025-05-06_18:35:34.418928_oZoB

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/fPbGDrQ8xi/index.html

@rlazo rlazo requested a review from daymxn May 2, 2025 22:57
@rlazo
Copy link
Collaborator Author

rlazo commented May 5, 2025

friendly ping

Copy link
Member

@daymxn daymxn left a comment

Choose a reason for hiding this comment

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

LGTM, but left some comments

@rlazo rlazo enabled auto-merge (squash) May 6, 2025 18:25
@rlazo rlazo merged commit 4c4c7c9 into main May 6, 2025
35 of 36 checks passed
@rlazo rlazo deleted the rl.storage.fix branch May 6, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants