Skip to content

[Storage] Replace hardcoded SDK version with Config.OLDEST_SDK #7034

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

rlazo
Copy link
Collaborator

@rlazo rlazo commented Jun 13, 2025

Tests will use the Config.OLDEST_SDK instead of a hardcoded SDK if the corresponding hardcoded SDK would be below our inteded minSdk.

As a pending work is re-evaluate whether these tests are necessary to keep around, or if they are irrelevant when bumping the minSdk.

Related to cl/769913191

Tests will use the Config.OLDEST_SDK instead of a hardcoded SDK if the
corresponding hardcoded SDK would be below our inteded minSdk.

As a pending work is re-evaluate whether these tests are necessary to
keep around, or if they are irrelevant when bumping the minSdk.

Related to cl/769913191
Copy link
Contributor

github-actions bot commented Jun 13, 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

Firebase AI Mock Responses Check ⚠️

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

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @rlazo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request standardizes the SDK version used for Robolectric tests in the Storage component. By replacing a specific hardcoded SDK version with Config.OLDEST_SDK, these tests will automatically align with our project's minimum supported SDK, making them more resilient to future updates of the minimum SDK version.

Highlights

  • Standardize Test SDK Configuration: I've updated several Robolectric test classes in the Storage module to use Config.OLDEST_SDK instead of a hardcoded Build.VERSION_CODES.LOLLIPOP_MR1 for their @Config(sdk = ...) annotation.
  • Code Cleanup: Removed the now unused import android.os.Build; statement from the affected test files.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configureGemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@google-oss-bot
Copy link
Contributor

1 Warning
⚠️ Did you forget to add a changelog entry? (Add the 'no-changelog' label to the PR to silence this warning.)

Generated by 🚫 Danger

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request effectively replaces a hardcoded SDK version (Build.VERSION_CODES.LOLLIPOP_MR1) with Config.OLDEST_SDK in four test files. This is a good improvement for maintainability, as it centralizes the SDK configuration for these tests and makes future updates easier.

The removal of the unused android.os.Build import in each affected file is also a welcome cleanup, keeping the codebase tidy.

As noted in the pull request description, re-evaluating the necessity of these tests when the minSdk is bumped is a valuable pending task to ensure test relevance and efficiency.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 13, 2025

Coverage Report 1

Affected Products

  • firebase-storage

    Overall coverage changed from 83.96% (f08e0c7) to 84.00% (6b11667) by +0.04%.

    FilenameBase (f08e0c7)Merge (6b11667)Diff
    UploadTask.java81.52%81.85%+0.33%

Test Logs

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

Copy link
Contributor

github-actions bot commented Jun 13, 2025

Test Results

 44 files   -  1 014   44 suites   - 1 014   6m 17s ⏱️ - 29m 35s
136 tests  -  5 849  136 ✅  -  5 827  0 💤  - 22  0 ❌ ±0 
292 runs   - 11 741  292 ✅  - 11 697  0 💤  - 44  0 ❌ ±0 

Results for commit 635d17d. ± Comparison against base commit f08e0c7.

This pull request removes 5849 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 Jun 13, 2025

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 14, 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
    Percentilef08e0c76b11667DiffSignificant (?)
    p10260 ±314 μs472 ±730 μs+211 μs (+81.1%)NO
    p25282 ±331 μs489 ±746 μs+207 μs (+73.3%)NO
    p50321 ±354 μs524 ±790 μs+203 μs (+63.1%)NO
    p75436 ±491 μs604 ±871 μs+168 μs (+38.6%)NO
    p90563 ±576 μs734 ±1017 μs+171 μs (+30.3%)NO

    20 test runs in comparison
    CommitTest Runs
    f08e0c7
    • 2025-06-17_14:04:00.219665_jVxl
    • 2025-06-17_14:04:00.219701_GrrJ
    • 2025-06-17_14:04:00.219713_tzRQ
    • 2025-06-17_14:04:00.219721_BWWY
    • 2025-06-17_14:04:00.219729_UsGW
    • 2025-06-17_14:04:00.219737_ejuQ
    • 2025-06-17_14:04:00.219743_LPho
    • 2025-06-17_14:04:00.219751_iHPe
    • 2025-06-17_14:04:00.219758_Mzxq
    • 2025-06-17_14:04:00.219765_dSnp
    6b11667
    • 2025-06-18_16:31:42.478149_owGL
    • 2025-06-18_16:31:42.478187_yXaf
    • 2025-06-18_16:31:42.478196_WAVZ
    • 2025-06-18_16:31:42.478203_EhaO
    • 2025-06-18_16:31:42.478210_tuxS
    • 2025-06-18_16:31:42.478217_FAWA
    • 2025-06-18_16:31:42.478224_pwAC
    • 2025-06-18_16:31:42.478231_RzFX
    • 2025-06-18_16:31:42.478238_qBco
    • 2025-06-18_16:31:42.478245_CZAv
    redfin-30
    Percentilef08e0c76b11667DiffSignificant (?)
    p10818 ±1635 μs318 ±126 μs-500 μs (-61.1%)NO
    p25892 ±1755 μs349 ±159 μs-543 μs (-60.9%)NO
    p501.01 ±2 ms417 ±279 μs-591 μs (-58.6%)NO
    p751.15 ±2 ms498 ±357 μs-652 μs (-56.7%)NO
    p901.43 ±2 ms656 ±505 μs-775 μs (-54.2%)NO

    20 test runs in comparison
    CommitTest Runs
    f08e0c7
    • 2025-06-17_14:04:00.219665_jVxl
    • 2025-06-17_14:04:00.219701_GrrJ
    • 2025-06-17_14:04:00.219713_tzRQ
    • 2025-06-17_14:04:00.219721_BWWY
    • 2025-06-17_14:04:00.219729_UsGW
    • 2025-06-17_14:04:00.219737_ejuQ
    • 2025-06-17_14:04:00.219743_LPho
    • 2025-06-17_14:04:00.219751_iHPe
    • 2025-06-17_14:04:00.219758_Mzxq
    • 2025-06-17_14:04:00.219765_dSnp
    6b11667
    • 2025-06-18_16:31:42.478149_owGL
    • 2025-06-18_16:31:42.478187_yXaf
    • 2025-06-18_16:31:42.478196_WAVZ
    • 2025-06-18_16:31:42.478203_EhaO
    • 2025-06-18_16:31:42.478210_tuxS
    • 2025-06-18_16:31:42.478217_FAWA
    • 2025-06-18_16:31:42.478224_pwAC
    • 2025-06-18_16:31:42.478231_RzFX
    • 2025-06-18_16:31:42.478238_qBco
    • 2025-06-18_16:31:42.478245_CZAv
  • fire-gcs

    DeviceStatisticsDistributions
    oriole-32
    Percentilef08e0c76b11667DiffSignificant (?)
    p1024.9 ±2 μs28.4 ±5 μs+3.56 μs (+14.3%)NO
    p2526.2 ±2 μs29.5 ±5 μs+3.22 μs (+12.3%)NO
    p5029.1 ±5 μs32.2 ±5 μs+3.12 μs (+10.7%)NO
    p7534.5 ±8 μs37.1 ±6 μs+2.64 μs (+7.7%)NO
    p9043.9 ±14 μs45.7 ±12 μs+1.72 μs (+3.9%)NO

    20 test runs in comparison
    CommitTest Runs
    f08e0c7
    • 2025-06-17_14:04:00.219665_jVxl
    • 2025-06-17_14:04:00.219701_GrrJ
    • 2025-06-17_14:04:00.219713_tzRQ
    • 2025-06-17_14:04:00.219721_BWWY
    • 2025-06-17_14:04:00.219729_UsGW
    • 2025-06-17_14:04:00.219737_ejuQ
    • 2025-06-17_14:04:00.219743_LPho
    • 2025-06-17_14:04:00.219751_iHPe
    • 2025-06-17_14:04:00.219758_Mzxq
    • 2025-06-17_14:04:00.219765_dSnp
    6b11667
    • 2025-06-18_16:31:42.478149_owGL
    • 2025-06-18_16:31:42.478187_yXaf
    • 2025-06-18_16:31:42.478196_WAVZ
    • 2025-06-18_16:31:42.478203_EhaO
    • 2025-06-18_16:31:42.478210_tuxS
    • 2025-06-18_16:31:42.478217_FAWA
    • 2025-06-18_16:31:42.478224_pwAC
    • 2025-06-18_16:31:42.478231_RzFX
    • 2025-06-18_16:31:42.478238_qBco
    • 2025-06-18_16:31:42.478245_CZAv
    redfin-30
    Percentilef08e0c76b11667DiffSignificant (?)
    p1053.2 ±11 μs51.2 ±10 μs-2.05 μs (-3.9%)NO
    p2555.3 ±11 μs52.9 ±10 μs-2.46 μs (-4.4%)NO
    p5058.6 ±12 μs55.7 ±10 μs-2.86 μs (-4.9%)NO
    p7564.4 ±14 μs60.8 ±9 μs-3.58 μs (-5.6%)NO
    p9077.9 ±19 μs68.5 ±9 μs-9.39 μs (-12.1%)NO

    20 test runs in comparison
    CommitTest Runs
    f08e0c7
    • 2025-06-17_14:04:00.219665_jVxl
    • 2025-06-17_14:04:00.219701_GrrJ
    • 2025-06-17_14:04:00.219713_tzRQ
    • 2025-06-17_14:04:00.219721_BWWY
    • 2025-06-17_14:04:00.219729_UsGW
    • 2025-06-17_14:04:00.219737_ejuQ
    • 2025-06-17_14:04:00.219743_LPho
    • 2025-06-17_14:04:00.219751_iHPe
    • 2025-06-17_14:04:00.219758_Mzxq
    • 2025-06-17_14:04:00.219765_dSnp
    6b11667
    • 2025-06-18_16:31:42.478149_owGL
    • 2025-06-18_16:31:42.478187_yXaf
    • 2025-06-18_16:31:42.478196_WAVZ
    • 2025-06-18_16:31:42.478203_EhaO
    • 2025-06-18_16:31:42.478210_tuxS
    • 2025-06-18_16:31:42.478217_FAWA
    • 2025-06-18_16:31:42.478224_pwAC
    • 2025-06-18_16:31:42.478231_RzFX
    • 2025-06-18_16:31:42.478238_qBco
    • 2025-06-18_16:31:42.478245_CZAv
  • timeToInitialDisplay

    DeviceStatisticsDistributions
    oriole-32
    Percentilef08e0c76b11667DiffSignificant (?)
    p10199 ±4 ms200 ±2 ms+1.48 ms (+0.7%)NO
    p25204 ±4 ms206 ±2 ms+1.64 ms (+0.8%)NO
    p50211 ±4 ms213 ±3 ms+2.29 ms (+1.1%)NO
    p75218 ±4 ms221 ±2 ms+3.36 ms (+1.5%)NO
    p90226 ±4 ms231 ±4 ms+4.66 ms (+2.1%)NO

    20 test runs in comparison
    CommitTest Runs
    f08e0c7
    • 2025-06-17_14:04:00.219665_jVxl
    • 2025-06-17_14:04:00.219701_GrrJ
    • 2025-06-17_14:04:00.219713_tzRQ
    • 2025-06-17_14:04:00.219721_BWWY
    • 2025-06-17_14:04:00.219729_UsGW
    • 2025-06-17_14:04:00.219737_ejuQ
    • 2025-06-17_14:04:00.219743_LPho
    • 2025-06-17_14:04:00.219751_iHPe
    • 2025-06-17_14:04:00.219758_Mzxq
    • 2025-06-17_14:04:00.219765_dSnp
    6b11667
    • 2025-06-18_16:31:42.478149_owGL
    • 2025-06-18_16:31:42.478187_yXaf
    • 2025-06-18_16:31:42.478196_WAVZ
    • 2025-06-18_16:31:42.478203_EhaO
    • 2025-06-18_16:31:42.478210_tuxS
    • 2025-06-18_16:31:42.478217_FAWA
    • 2025-06-18_16:31:42.478224_pwAC
    • 2025-06-18_16:31:42.478231_RzFX
    • 2025-06-18_16:31:42.478238_qBco
    • 2025-06-18_16:31:42.478245_CZAv
    redfin-30
    Percentilef08e0c76b11667DiffSignificant (?)
    p10227 ±7 ms250 ±6 ms+22.8 ms (+10.0%)MAYBE
    p25234 ±8 ms256 ±6 ms+21.8 ms (+9.3%)NO
    p50243 ±11 ms264 ±6 ms+20.4 ms (+8.4%)NO
    p75253 ±14 ms274 ±7 ms+20.8 ms (+8.3%)NO
    p90264 ±19 ms286 ±9.5 ms+22.3 ms (+8.4%)NO

    20 test runs in comparison
    CommitTest Runs
    f08e0c7
    • 2025-06-17_14:04:00.219665_jVxl
    • 2025-06-17_14:04:00.219701_GrrJ
    • 2025-06-17_14:04:00.219713_tzRQ
    • 2025-06-17_14:04:00.219721_BWWY
    • 2025-06-17_14:04:00.219729_UsGW
    • 2025-06-17_14:04:00.219737_ejuQ
    • 2025-06-17_14:04:00.219743_LPho
    • 2025-06-17_14:04:00.219751_iHPe
    • 2025-06-17_14:04:00.219758_Mzxq
    • 2025-06-17_14:04:00.219765_dSnp
    6b11667
    • 2025-06-18_16:31:42.478149_owGL
    • 2025-06-18_16:31:42.478187_yXaf
    • 2025-06-18_16:31:42.478196_WAVZ
    • 2025-06-18_16:31:42.478203_EhaO
    • 2025-06-18_16:31:42.478210_tuxS
    • 2025-06-18_16:31:42.478217_FAWA
    • 2025-06-18_16:31:42.478224_pwAC
    • 2025-06-18_16:31:42.478231_RzFX
    • 2025-06-18_16:31:42.478238_qBco
    • 2025-06-18_16:31:42.478245_CZAv

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

@rlazo rlazo requested review from VinayGuthal and davidmotson June 14, 2025 03:28
@rlazo
Copy link
Collaborator Author

rlazo commented Jun 18, 2025

Friendly ping

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.

4 participants