Skip to content

Removes unecessary setup code from FirebaseSessions and SessionInitia… #5436

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 3 commits into from
Oct 18, 2023

Conversation

bryanatkinson
Copy link
Contributor

…tor.

@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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 17, 2023

Coverage Report 1

Affected Products

  • firebase-sessions

    Overall coverage changed from ? (113b771) to 58.75% (991b00d) by ?.

    26 individual files with coverage change

    FilenameBase (113b771)Merge (991b00d)Diff
    ApplicationInfo.kt?100.00%?
    AutoSessionEventEncoder.java?100.00%?
    Comparisons.kt?0.00%?
    Dispatchers.kt?0.00%?
    Emitters.kt?0.00%?
    EventGDTLogger.kt?75.00%?
    FirebaseSessions.kt?0.00%?
    FirebaseSessionsDependencies.kt?91.30%?
    FirebaseSessionsRegistrar.kt?76.27%?
    LocalOverrideSettings.kt?100.00%?
    RemoteSettings.kt?88.06%?
    RemoteSettingsFetcher.kt?65.85%?
    SafeCollector.common.kt?0.00%?
    SessionDatastore.kt?0.00%?
    SessionEvent.kt?100.00%?
    SessionEvents.kt?97.78%?
    SessionFirelogPublisher.kt?83.33%?
    SessionGenerator.kt?20.83%?
    SessionLifecycleClient.kt?0.00%?
    SessionLifecycleService.kt?0.00%?
    SessionsActivityLifecycleCallbacks.kt?0.00%?
    SessionsSettings.kt?59.62%?
    SessionSubscriber.kt?75.00%?
    SettingsCache.kt?94.83%?
    SettingsProvider.kt?50.00%?
    TimeProvider.kt?0.00%?

Test Logs

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 17, 2023

Unit Test Results

     81 files       81 suites   2m 35s ⏱️
1 039 tests 1 038 ✔️ 0 💤 1
1 103 runs  1 102 ✔️ 0 💤 1

For more details on these failures, see this check.

Results for commit dea6d25.

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-sessions:
error: Added class com.google.firebase.sessions.Dispatchers [AddedClass]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

1 similar comment
@google-oss-bot
Copy link
Contributor

The public api surface has changed for the subproject firebase-sessions:
error: Added class com.google.firebase.sessions.Dispatchers [AddedClass]

Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly.

import kotlin.coroutines.CoroutineContext

/** Container for injecting dispatchers. */
class Dispatchers
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this whole class be internal and then not need internal on everything else?

Also could this be a data class?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

* Lifecycle callbacks that will inform the [SessionLifecycleClient] whenever an [Activity] in
* this application process goes foreground or background.
*/
private val activityLifecycleCallbacks =
Copy link
Contributor

Choose a reason for hiding this comment

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

This has no reference to any instance anymore. Could this be extracted into a top level object in its own file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 17, 2023

Size Report 1

Affected Products

  • base

    TypeBase (113b771)Merge (991b00d)Diff
    apk (aggressive)?8.39 kB? (?)
    apk (release)?8.66 kB? (?)
  • firebase-installations

    TypeBase (113b771)Merge (991b00d)Diff
    aar?58.8 kB? (?)
    apk (aggressive)?127 kB? (?)
    apk (release)?1.67 MB? (?)
  • firebase-installations-interop

    TypeBase (113b771)Merge (991b00d)Diff
    aar?8.17 kB? (?)
    apk (aggressive)?65.2 kB? (?)
    apk (release)?652 kB? (?)
  • firebase-sessions

    TypeBase (113b771)Merge (991b00d)Diff
    aar?142 kB? (?)
    apk (aggressive)?367 kB? (?)
    apk (release)?2.08 MB? (?)

Test Logs

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

@bryanatkinson bryanatkinson merged commit f3543de into sessions-nine Oct 18, 2023
@bryanatkinson bryanatkinson deleted the sessions-cleanup branch October 18, 2023 13:14
@firebase firebase locked and limited conversation to collaborators Nov 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants