Skip to content

[test] Use ktor3 #7052

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

[test] Use ktor3 #7052

wants to merge 1 commit into from

Conversation

rlazo
Copy link
Collaborator

@rlazo rlazo commented Jun 19, 2025

Test using ktor3 as the network stack

Test using ktor3 as the network stack
Copy link
Contributor

📝 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

@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 is a test to evaluate the project's compatibility with Ktor 3 as the network stack. My primary goal is to update the necessary core and related dependency versions to facilitate this potential migration and ensure everything compiles and runs as expected.

Highlights

  • Dependency Updates: I've updated the project's dependencies to test compatibility with Ktor 3. This includes upgrading ktorVersion to 3.0.3, kotlin to 2.0.21, and serialization to 1.7.3.
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 configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

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.

Code Review

This PR updates Kotlin to 2.0.21, Ktor to 3.0.3, and Kotlinx Serialization to 1.7.3. The primary concern is the Ktor upgrade to v3, a major change that typically involves breaking API changes. This PR only updates the version string; if Ktor is in use, code adaptations are necessary for the project to compile and function with Ktor 3, aligning with the PR's goal to "Test using ktor3". The Kotlin 2.0 and Kotlinx Serialization upgrades also warrant thorough testing. Clarification on whether this PR is solely for version bumping or includes full Ktor 3 integration would be beneficial.

kotlin = "1.8.22"
ktorVersion = "2.3.2"
kotlin = "2.0.21"
ktorVersion = "3.0.3"

Choose a reason for hiding this comment

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

high

Upgrading Ktor from 2.3.2 to 3.0.3 is a major version change that typically includes breaking API changes. This PR updates the version number, but there are no corresponding code changes to adapt existing Ktor usage (if any) to the new Ktor 3.x APIs.

If Ktor is currently used in the project, this change will likely cause compilation errors or runtime issues, preventing the goal stated in the PR title/description to "Test using ktor3".

To effectively test Ktor 3, the necessary code adaptations for its new APIs should be included. If this PR is intended only as a version bump, with code changes to follow, please clarify this in the PR description. Otherwise, the required code modifications for Ktor 3 compatibility are missing.

@@ -68,7 +68,7 @@ robolectric = "4.12"
runner = "1.0.2"
rxandroid = "2.0.2"
rxjava = "2.1.14"
serialization = "1.5.1"
serialization = "1.7.3"

Choose a reason for hiding this comment

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

medium

The update from Kotlinx Serialization 1.5.1 to 1.7.3 is a significant version upgrade. While generally beneficial, major version changes can sometimes introduce subtle behavioral differences or require adjustments to build configurations and plugin compatibilities.

It's crucial to perform thorough testing across the project to ensure everything compiles correctly and all existing tests pass. Pay attention to any new compiler diagnostics or runtime behaviors.

@@ -45,8 +45,8 @@ javalite = "3.25.5"
jsonassert = "1.5.0"
kotest = "5.9.0" # Do not use 5.9.1 because it reverts the fix for https://github.com/kotest/kotest/issues/3981
kotestAssertionsCore = "5.8.1"
kotlin = "1.8.22"
ktorVersion = "2.3.2"
kotlin = "2.0.21"

Choose a reason for hiding this comment

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

medium

The update from Kotlin 1.8.22 to 2.0.21 is a significant language version upgrade. While Kotlin 2.0 aims for backward compatibility and brings many improvements, major version changes can sometimes introduce subtle behavioral differences, new compiler warnings/errors, or require adjustments to build configurations and plugin compatibilities.

It's crucial to perform thorough testing across the project to ensure everything compiles correctly and all existing tests pass. Pay attention to any new compiler diagnostics or runtime behaviors.

@rlazo rlazo requested a review from thatfiredev June 19, 2025 22:16
Copy link
Contributor

Test Results

  869 files  +  869    869 suites  +869   27m 10s ⏱️ + 27m 10s
5 151 tests +5 151  5 128 ✅ +5 128  22 💤 +22  1 ❌ +1 
9 903 runs  +9 903  9 859 ✅ +9 859  43 💤 +43  1 ❌ +1 

For more details on these failures, see this check.

Results for commit 29406b4. ± Comparison against base commit cbb470a.

@google-oss-bot
Copy link
Contributor

Coverage Report 1

Affected Products

  • firebase-appcheck

    Overall coverage changed from 80.50% (cbb470a) to 80.64% (4d694ba) by +0.14%.

  • firebase-appdistribution

    Overall coverage changed from ? (cbb470a) to 75.72% (4d694ba) by ?.

    68 individual files with coverage change

    FilenameBase (cbb470a)Merge (4d694ba)Diff
    AabUpdater.java?98.36%?
    AabUpdater_Factory.java?0.00%?
    ApkInstaller.java?100.00%?
    ApkInstaller_Factory.java?0.00%?
    ApkUpdater.java?92.63%?
    ApkUpdater_Factory.java?0.00%?
    AppDistributionReleaseImpl.java?100.00%?
    AppDistributionReleaseInternal.java?100.00%?
    AppDistroComponent.java?0.00%?
    AppDistroComponent_MainModule_BindContentResolverFactory.java?0.00%?
    AppIconSource.java?84.62%?
    AppIconSource_Factory.java?100.00%?
    AutoValue_AppDistributionReleaseImpl.java?65.45%?
    AutoValue_AppDistributionReleaseInternal.java?71.58%?
    AutoValue_ImageUtils_ImageSize.java?35.00%?
    AutoValue_TesterApiDisabledErrorDetails.java?29.41%?
    AutoValue_TesterApiDisabledErrorDetails_HelpLink.java?54.17%?
    AutoValue_UpdateProgressImpl.java?65.96%?
    DaggerAppDistroComponent.java?80.56%?
    DevModeDetector.java?9.09%?
    DevModeDetector_Factory.java?100.00%?
    ErrorMessages.java?0.00%?
    FeedbackActivity.java?3.39%?
    FeedbackActivity_MembersInjector.java?0.00%?
    FeedbackSender.java?84.48%?
    FeedbackSender_Factory.java?0.00%?
    FeedbackTrigger.java?61.54%?
    FirebaseAppDistributionExceptions.java?80.00%?
    FirebaseAppDistributionFileProvider.java?0.00%?
    FirebaseAppDistributionImpl.java?89.89%?
    FirebaseAppDistributionImpl_Factory.java?0.00%?
    FirebaseAppDistributionLifecycleNotifier.java?91.49%?
    FirebaseAppDistributionLifecycleNotifier_Factory.java?0.00%?
    FirebaseAppDistributionNotificationsManager.java?88.89%?
    FirebaseAppDistributionNotificationsManager_Factory.java?0.00%?
    FirebaseAppDistributionRegistrar.java?95.83%?
    FirebaseAppDistributionTesterApiClient.java?88.78%?
    FirebaseAppDistributionTesterApiClient_Factory.java?0.00%?
    HttpsUrlConnectionFactory.java?50.00%?
    HttpsUrlConnectionFactory_Factory.java?100.00%?
    ImageUtils.java?100.00%?
    InstallActivity.java?2.67%?
    LogWrapper.java?86.67%?
    NewReleaseFetcher.java?86.67%?
    NewReleaseFetcher_Factory.java?0.00%?
    PackageInfoUtils.java?42.86%?
    ReleaseIdentifier.java?91.78%?
    ReleaseIdentifier_Factory.java?0.00%?
    ReleaseUtils.java?83.33%?
    ScreenshotTaker.java?36.17%?
    ScreenshotTaker_Factory.java?0.00%?
    SequentialReference.java?100.00%?
    SignInResultActivity.java?0.00%?
    SignInStorage.java?100.00%?
    SignInStorage_Factory.java?0.00%?
    TakeScreenshotAndStartFeedbackActivity.java?0.00%?
    TakeScreenshotAndStartFeedbackActivity_MembersInjector.java?0.00%?
    TaskCache.java?100.00%?
    TaskCompletionSourceCache.java?72.41%?
    TaskUtils.java?77.50%?
    TesterApiDisabledErrorDetails.java?93.75%?
    TesterApiHttpClient.java?90.09%?
    TesterApiHttpClient_Factory.java?0.00%?
    TesterSignInManager.java?89.41%?
    TesterSignInManager_Factory.java?0.00%?
    UpdateProgressImpl.java?100.00%?
    UpdateTaskCache.java?91.30%?
    UpdateTaskImpl.java?76.32%?

  • firebase-appdistribution-api

    Overall coverage changed from 42.41% (cbb470a) to 42.95% (4d694ba) by +0.54%.

  • firebase-common

    Overall coverage changed from 52.66% (cbb470a) to 52.21% (4d694ba) by -0.45%.

    FilenameBase (cbb470a)Merge (4d694ba)Diff
    Firebase.kt35.71%38.46%+2.75%
  • firebase-config

    Overall coverage changed from ? (cbb470a) to 84.35% (4d694ba) by ?.

    34 individual files with coverage change

    FilenameBase (cbb470a)Merge (4d694ba)Diff
    AutoValue_ConfigUpdate.java?29.41%?
    Code.java?0.00%?
    ConfigAutoFetch.java?86.73%?
    ConfigCacheClient.java?93.33%?
    ConfigContainer.java?94.29%?
    ConfigFetchHandler.java?92.94%?
    ConfigFetchHttpClient.java?86.27%?
    ConfigGetParameterHandler.java?96.45%?
    ConfigRealtimeHandler.java?41.38%?
    ConfigRealtimeHttpClient.java?73.57%?
    ConfigSharedPrefsClient.java?87.50%?
    ConfigStorageClient.java?100.00%?
    ConfigUpdate.java?100.00%?
    ConfigUpdateListener.java?0.00%?
    ConfigUpdateListenerRegistration.java?0.00%?
    CustomSignals.java?100.00%?
    DefaultsXmlParser.java?0.00%?
    FirebaseRemoteConfig.java?89.76%?
    FirebaseRemoteConfigClientException.java?75.00%?
    FirebaseRemoteConfigException.java?95.65%?
    FirebaseRemoteConfigFetchThrottledException.java?100.00%?
    FirebaseRemoteConfigInfo.java?0.00%?
    FirebaseRemoteConfigInfoImpl.java?100.00%?
    FirebaseRemoteConfigServerException.java?68.42%?
    FirebaseRemoteConfigSettings.java?61.54%?
    FirebaseRemoteConfigValue.java?0.00%?
    FirebaseRemoteConfigValueImpl.java?84.62%?
    Personalization.java?91.43%?
    RemoteConfig.kt?33.33%?
    RemoteConfigComponent.java?90.70%?
    RemoteConfigConstants.java?0.00%?
    RemoteConfigRegistrar.java?100.00%?
    RolloutsStateFactory.java?95.24%?
    RolloutsStateSubscriptionsHandler.java?100.00%?

  • firebase-database

    Overall coverage changed from 50.21% (cbb470a) to 50.16% (4d694ba) by -0.04%.

    FilenameBase (cbb470a)Merge (4d694ba)Diff
    ChildChangeAccumulator.java96.67%83.33%-13.33%
    Database.kt20.00%17.65%-2.35%
  • firebase-dynamic-links

    Overall coverage changed from 73.25% (cbb470a) to 73.32% (4d694ba) by +0.06%.

    FilenameBase (cbb470a)Merge (4d694ba)Diff
    FirebaseDynamicLinks.kt80.77%80.39%-0.38%
  • firebase-firestore

    Overall coverage changed from 45.78% (cbb470a) to 45.77% (4d694ba) by -0.00%.

    FilenameBase (cbb470a)Merge (4d694ba)Diff
    DeleteMutation.java90.48%95.24%+4.76%
    Firestore.kt42.31%41.18%-1.13%
    PatchMutation.java100.00%98.39%-1.61%
    SetMutation.java97.22%94.44%-2.78%
  • firebase-inappmessaging-display

    Overall coverage changed from 42.01% (cbb470a) to 42.00% (4d694ba) by -0.01%.

    FilenameBase (cbb470a)Merge (4d694ba)Diff
    InAppMessagingDisplay.kt25.00%33.33%+8.33%
  • firebase-installations

    Overall coverage changed from 58.17% (cbb470a) to 58.23% (4d694ba) by +0.06%.

    FilenameBase (cbb470a)Merge (4d694ba)Diff
    Installations.kt40.00%50.00%+10.00%
  • firebase-ml-modeldownloader

    Overall coverage changed from 82.11% (cbb470a) to 82.09% (4d694ba) by -0.01%.

    FilenameBase (cbb470a)Merge (4d694ba)Diff
    FirebaseModelDownloader.java84.66%84.05%-0.61%
  • firebase-perf

    Overall coverage changed from 70.64% (cbb470a) to 70.64% (4d694ba) by +0.01%.

    FilenameBase (cbb470a)Merge (4d694ba)Diff
    Performance.kt7.14%7.69%+0.55%
  • firebase-storage

    Overall coverage changed from 83.96% (cbb470a) to 84.03% (4d694ba) by +0.07%.

    FilenameBase (cbb470a)Merge (4d694ba)Diff
    Storage.kt39.58%40.43%+0.84%
    StorageTask.java83.38%83.69%+0.30%

Test Logs

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

@@ -45,8 +45,8 @@ javalite = "3.25.5"
jsonassert = "1.5.0"
kotest = "5.9.0" # Do not use 5.9.1 because it reverts the fix for https://github.com/kotest/kotest/issues/3981
kotestAssertionsCore = "5.8.1"
kotlin = "1.8.22"
ktorVersion = "2.3.2"
kotlin = "2.0.21"
Copy link
Member

Choose a reason for hiding this comment

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

FWIW Gradle 9 also uses Kotlin 2 :)
(I hope this makes our transition smoother when the time comes)
https://docs.gradle.org/9.0.0-rc-1/release-notes.html#update-to-kotlin-2

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.

3 participants