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

dataconnect: Improve usage of MutableStateFlow to improve readability #6840

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

dconeybe
Copy link
Contributor

@dconeybe dconeybe commented Apr 4, 2025

Use MutableStateFlow.update() instead of MutableStateFlow.compareAndSet() directly for improved readability and less potential for bugs

dconeybe added 7 commits April 4, 2025 06:34

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…DataConnect.awaitAuthReady() and FirebaseDataConnect.awaitAppCheckReady()
…w.compareAndSet() directly for improved readability and less potential for bugs
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 4, 2025

Coverage Report 1

Affected Products

  • firebase-dataconnect

    Overall coverage changed from 14.45% (d7a56a1) to 14.31% (fade6ea) by -0.14%.

    FilenameBase (d7a56a1)Merge (fade6ea)Diff
    DataConnectCredentialsTokenManager.kt34.12%32.10%-2.02%
    FirebaseDataConnectImpl.kt42.34%42.79%+0.45%

Test Logs

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

Copy link
Contributor

github-actions bot commented Apr 4, 2025

Test Results

   66 files  + 48     66 suites  +48   1m 20s ⏱️ + 1m 6s
  552 tests +466    551 ✅ +465  1 💤 +1  0 ❌ ±0 
1 104 runs  +932  1 102 ✅ +930  2 💤 +2  0 ❌ ±0 

Results for commit c9d70a3. ± Comparison against base commit d7a56a1.

This pull request removes 86 and adds 552 tests. Note that renamed tests count towards both.
com.google.firebase.vertexai.GenerativeModelTesting ‑ exception thrown when using invalid location
com.google.firebase.vertexai.GenerativeModelTesting ‑ system calling in request
com.google.firebase.vertexai.SchemaTests ‑ basic schema declaration
com.google.firebase.vertexai.SchemaTests ‑ full schema declaration
com.google.firebase.vertexai.SerializationTests ‑ test Candidate serialization as Json
com.google.firebase.vertexai.SerializationTests ‑ test GenerateContentResponse serialization as Json
com.google.firebase.vertexai.SerializationTests ‑ test Schema serialization as Json
com.google.firebase.vertexai.SerializationTests ‑ test countTokensResponse serialization as Json
com.google.firebase.vertexai.SerializationTests ‑ test modalityTokenCount serialization as Json
com.google.firebase.vertexai.VertexAIStreamingSnapshotTests ‑ citation parsed correctly
…
com.google.firebase.dataconnect.AnyValueSerializerUnitTest ‑ descriptor should have expected values
com.google.firebase.dataconnect.AnyValueSerializerUnitTest ‑ deserialize() should throw UnsupportedOperationException
com.google.firebase.dataconnect.AnyValueSerializerUnitTest ‑ serialize() should throw UnsupportedOperationException
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(Boolean) creates an object with the expected value
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(Double) creates an object with the expected value (edge cases)
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(Double) creates an object with the expected value (normal cases)
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(List) creates an object with the expected value (edge cases)
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(List) creates an object with the expected value (normal cases)
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(Map) creates an object with the expected value (edge cases)
com.google.firebase.dataconnect.AnyValueUnitTest ‑ constructor(Map) creates an object with the expected value (normal cases)
…

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 4, 2025

Size Report 1

Affected Products

  • firebase-dataconnect

    TypeBase (d7a56a1)Merge (fade6ea)Diff
    aar709 kB709 kB+536 B (+0.1%)
    apk (release)10.0 MB10.0 MB+412 B (+0.0%)

Test Logs

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

dconeybe added 2 commits April 5, 2025 10:19
…aconnect/MutableStateFlowUseUpdateInsteadOfCompareAndSet
Base automatically changed from dconeybe/dataconnect/AuthCodeCleanup to main April 8, 2025 21:07
dconeybe added 3 commits April 8, 2025 18:06
…dateInsteadOfCompareAndSet
…dateInsteadOfCompareAndSet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants