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

Aqs sdk processinfo #5488

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

Aqs sdk processinfo #5488

wants to merge 44 commits into from

Conversation

jrothfeder
Copy link
Contributor

No description provided.

mrober and others added 30 commits October 10, 2023 16:16
#5397)

Introduces a new SessionDataService that is bound to by each process and
used to deliver session-ids.
Created a SessionLifecycleService class which contains all the
service-side code, and a SessionLifecycleClient object which handles the
connection to the server and the sending and receiving of events.
Avoid changing the api surface. Having `val`s at the file level causes
Kotlin to generate a public class with the filenameKt which adds a
public class to the public api surface: "The public api surface has
changed for the subproject firebase-sessions: error: Added class
com.google.firebase.sessions.SessionDatastoreKt [AddedClass]". So we
have to put them in a class or companion object.
…ance` so it can be accessed from a bound service. (#5407)

Co-authored-by: jrothfeder <[email protected]>
Make `SessionGenerator` injectable. Also made `WallClock` an object to
avoid needing to pass it around. Moved `collectEvents` out of
SessionGenerator since it will need to be handled in the service.
Using the SessionGenerator to generate new sessions and create
SessionDetails instead of directly creating UUID session ids in the
service.

Also updated the boundClients queue to be a LinkedBlockingQueue to avoid
ConcurrentModificationExceptions if a client binds while a message is
being handled by the server.
Made SessionsSettings injectable. Also removed SessionMaintainer.
This will make it safe to call `Firebase.app` any time from anywhere in
this SDK.
#5427)

… the FirelogPublisher handle the full SessionEvent creation since
that's only relevant to Firelog.
#5431)

… the MainLooper which is the application main thread and so could
interfere with things there. Also fixes issue with missing import.
#5434)

…and use the same Messenger instance for every client. This makes sure
that all state manipulation happens on the same looper, so we can get
rid of the LinkedBlockingQueue or worry about volatile booleans.
Co-authored-by: Mila <[email protected]>
Co-authored-by: Rodrigo Lazo <[email protected]>
Co-authored-by: Greg Sakakihara <[email protected]>
Co-authored-by: David Motsonashvili <[email protected]>
Co-authored-by: David Motsonashvili <[email protected]>
Co-authored-by: Vinay Guthal <[email protected]>
Co-authored-by: cherylEnkidu <[email protected]>
Co-authored-by: Mark Duckworth <[email protected]>
Co-authored-by: Ehsan Nasiri <[email protected]>
Co-authored-by: Rosalyn Tan <[email protected]>
Co-authored-by: themiswang <[email protected]>
#5443)

…acks based on the sdk enablement in SessionsSettings.
#5452)

…irebaseSessionsDependencies` can be accessed directly.

---------

Co-authored-by: jrothfeder <[email protected]>
#5461)

…e and managed by the Registrar in order to improve testability in the
SessionLifecycleService.
Adds fake implementations for the newly added interfaces and creates a
fake registrar installing our fake implementations.
mrober and others added 14 commits October 20, 2023 20:25
#5468)

… lifecycle events. We can't have the handler thread reacting to
lifecycle events because:

* There's no guarantee that an activity is ever started on a process,
but we still want session ids pushed there (eg. service-only process)
* There can be more than one activity per process and the first time one
of those activities is stopped, the handlertthread will be stopped and
so we'll have no thread to process the callback messages.

Updated to use MainLooper
#5472)

…t, and pulls the service binding into a different class to improve
testability of the client.
Keep track of pending foreground before settings fetched to catch the
first session in cold start with no settings cache.
@google-cla
Copy link

google-cla bot commented Oct 30, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@jrothfeder jrothfeder changed the base branch from master to sessions-nine October 30, 2023 18:30
@github-actions
Copy link
Contributor

github-actions bot commented Oct 30, 2023

Release note changes

The following release notes were modified. Please ensure they look correct.

Release Notes
firebase-perf
### {{perfmon}} version 20.5.1 {: #performance_v20-5-1}

* {{changed}} Make Fireperf generate its own session Id.

#### {{perfmon}} Kotlin extensions version 20.5.1 {: #performance-ktx_v20-5-1}

The Kotlin extensions library transitively includes the updated
`firebase-performance` library. The Kotlin extensions library has no additional
updates.

@github-actions
Copy link
Contributor

buildSrc Test Results

37 tests   37 ✔️  1m 24s ⏱️
  8 suites    0 💤
  8 files      0

Results for commit e32ecd1.

@github-actions
Copy link
Contributor

Unit Test Results

   758 files  +   756     758 suites  +756   32m 28s ⏱️ + 32m 12s
4 073 tests +4 072  4 051 ✔️ +4 050  21 💤 +21  1 +1 
8 025 runs  +8 023  7 982 ✔️ +7 980  42 💤 +42  1 +1 

For more details on these failures, see this check.

Results for commit e32ecd1. ± Comparison against base commit 3704b6e.

@google-oss-bot
Copy link
Contributor

Coverage Report 1

Affected Products

  • firebase-database

    Overall coverage changed from 50.13% (3704b6e) to 50.17% (aaccff3) by +0.04%.

    FilenameBase (3704b6e)Merge (aaccff3)Diff
    ChildChangeAccumulator.java83.33%96.67%+13.33%
  • firebase-firestore

    Overall coverage changed from 44.76% (3704b6e) to 44.77% (aaccff3) by +0.00%.

    FilenameBase (3704b6e)Merge (aaccff3)Diff
    SetMutation.java94.44%97.22%+2.78%
  • firebase-messaging

    Overall coverage changed from 83.87% (3704b6e) to 83.95% (aaccff3) by +0.08%.

    FilenameBase (3704b6e)Merge (aaccff3)Diff
    RequestDeduplicator.java80.00%90.00%+10.00%
  • firebase-ml-modeldownloader

    Overall coverage changed from 83.36% (3704b6e) to 83.43% (aaccff3) by +0.06%.

    FilenameBase (3704b6e)Merge (aaccff3)Diff
    FirebaseModelDownloader.java84.05%84.66%+0.61%
  • firebase-storage

    Overall coverage changed from ? (3704b6e) to 84.12% (aaccff3) by ?.

    48 individual files with coverage change

    FilenameBase (3704b6e)Merge (aaccff3)Diff
    ActivityLifecycleListener.java?74.14%?
    AdaptiveStreamBuffer.java?84.62%?
    CancelException.java?100.00%?
    CancellableTask.java?100.00%?
    ControllableTask.java?100.00%?
    DeleteNetworkRequest.java?100.00%?
    DeleteStorageTask.java?100.00%?
    ExponentialBackoffSender.java?86.00%?
    FileDownloadTask.java?80.00%?
    FirebaseStorage.java?83.67%?
    FirebaseStorageComponent.java?100.00%?
    GetDownloadUrlTask.java?96.77%?
    GetMetadataNetworkRequest.java?100.00%?
    GetMetadataTask.java?85.19%?
    GetNetworkRequest.java?100.00%?
    HttpURLConnectionFactory.java?0.00%?
    HttpURLConnectionFactoryImpl.java?50.00%?
    ListNetworkRequest.java?100.00%?
    ListResult.java?100.00%?
    ListTask.java?85.71%?
    NetworkRequest.java?87.29%?
    OnPausedListener.java?0.00%?
    OnProgressListener.java?0.00%?
    ResumableNetworkRequest.java?100.00%?
    ResumableUploadByteRequest.java?90.91%?
    ResumableUploadCancelRequest.java?100.00%?
    ResumableUploadQueryRequest.java?100.00%?
    ResumableUploadStartRequest.java?95.24%?
    Slashes.java?88.24%?
    Sleeper.java?0.00%?
    SleeperImpl.java?100.00%?
    SmartHandler.java?92.31%?
    Storage.kt?39.58%?
    StorageException.java?65.45%?
    StorageMetadata.java?86.34%?
    StorageReference.java?89.94%?
    StorageReferenceUri.java?100.00%?
    StorageRegistrar.java?100.00%?
    StorageTask.java?83.69%?
    StorageTaskManager.java?100.00%?
    StorageTaskScheduler.java?95.45%?
    StreamDownloadTask.java?88.89%?
    TaskListenerImpl.java?100.00%?
    TaskState.kt?0.00%?
    UpdateMetadataNetworkRequest.java?100.00%?
    UpdateMetadataTask.java?82.14%?
    UploadTask.java?82.51%?
    Util.java?73.24%?

Test Logs

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

Base automatically changed from sessions-nine to master November 6, 2023 19:39
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.

5 participants