FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

dataconnect: `FirebaseDataConnect.logLevel` changed to `MutableStateFlow` by dconeybe · Pull Request #6586 · firebase/firebase-android-sdk · GitHub

dataconnect: FirebaseDataConnect.logLevel changed to MutableStateFlow - #6586

Merged
dconeybe merged 15 commits into
mainfrom
dconeybe/dataconnect/LogLevelFlow
Dec 11, 2024
Merged

dataconnect: FirebaseDataConnect.logLevel changed to MutableStateFlow#6586
dconeybe merged 15 commits into
mainfrom
dconeybe/dataconnect/LogLevelFlow

Conversation

dconeybe commented Dec 10, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

Change the property FirebaseDataConnect.logLevel from LogLevel to MutableStateFlow<LogLevel>.

Being a MutableStateFlow enables applications to not only get and set its value, but also enables "collecting" the flow to be notified when its value changes. This can be useful, for example, to keep a UI element that reflects the log level (e.g. a "debug" checkbox) in sync with the actual log level in effect.

This PR also adds logcat messages to be emitted when the log level changes. This can be useful when examining logs after the fact to explain gaps in the logs (e.g. log level was unknowingly reduced to NONE, causing no logs to be emitted). The log messages look like this:

Log level set to WARN
Log level changed to DEBUG (was WARN)
Log level changed to WARN (was DEBUG)

github-actions Bot commented Dec 10, 2024
edited
Loading

Copy link
Copy Markdown
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
Copy Markdown
Contributor

Vertex AI Mock Responses Check ⚠️

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

Copy link
Copy Markdown
Collaborator

The public api surface has changed for the subproject firebase-dataconnect:
error: Method com.google.firebase.dataconnect.DataConnectLogging.getFlow has changed return type from kotlinx.coroutines.flow.StateFlow<com.google.firebase.dataconnect.LogLevel> to kotlinx.coroutines.flow.Flow<com.google.firebase.dataconnect.LogLevel> [ChangedType]

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.

google-oss-bot commented Dec 10, 2024
edited
Loading

Copy link
Copy Markdown
Collaborator

Coverage Report 1

Affected Products

  • firebase-dataconnect

    Overall coverage changed from 14.12% (2b072d9) to 14.82% (2a0d17a) by +0.70%.

    FilenameBase (2b072d9)Merge (2a0d17a)Diff
    Logger.kt52.17%73.68%+21.51%
    LogLevel.kt100.00%72.73%-27.27%

Test Logs

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

github-actions Bot commented Dec 10, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

Test Results

   64 files   -    972     64 suites   - 972   1m 6s ⏱️ - 33m 19s
  542 tests  -  5 331    541 ✅  -  5 310  1 💤  - 21  0 ❌ ±0 
1 084 runs   - 10 747  1 082 ✅  - 10 705  2 💤  - 42  0 ❌ ±0 

Results for commit 7631f77. ± Comparison against base commit 2b072d9.

This pull request removes 5332 and adds 1 tests. Note that renamed tests count towards both.
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
…
com.google.firebase.dataconnect.LoggerUnitTest ‑ noisiestOf()

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Collaborator

The public api surface has changed for the subproject firebase-dataconnect:
error: Method com.google.firebase.dataconnect.DataConnectLogging.getFlow has changed return type from kotlinx.coroutines.flow.StateFlow<com.google.firebase.dataconnect.LogLevel> to kotlinx.coroutines.flow.Flow<com.google.firebase.dataconnect.LogLevel> [ChangedType]

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.

google-oss-bot commented Dec 10, 2024
edited
Loading

Copy link
Copy Markdown
Collaborator

Size Report 1

Affected Products

  • firebase-dataconnect

    TypeBase (2b072d9)Merge (2a0d17a)Diff
    aar703 kB709 kB+5.44 kB (+0.8%)
    apk (release)10.0 MB10.0 MB+3.17 kB (+0.0%)

Test Logs

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

…dataconnect:generateApiTxtFile`, changing StateFlow to Flow
dconeybe removed the request for review from aashishpatil-g December 10, 2024 16:53
dconeybe marked this pull request as draft December 10, 2024 16:53

Copy link
Copy Markdown
Contributor Author

I'm writing an API proposal for this PR, and, in doing so, will be changing a lot of the new API surface. Please hold off reviewing for now.

Copy link
Copy Markdown
Collaborator

The public api surface has changed for the subproject firebase-dataconnect:
error: Method com.google.firebase.dataconnect.DataConnectLogging.getFlow has changed return type from kotlinx.coroutines.flow.Flow<com.google.firebase.dataconnect.LogLevel> to kotlinx.coroutines.flow.Flow [ChangedType]
error: Added method com.google.firebase.dataconnect.DataConnectLogging.getState() [AddedAbstractMethod]
error: Removed method com.google.firebase.dataconnect.DataConnectLogging.push(com.google.firebase.dataconnect.LogLevel) [RemovedMethod]
error: Removed class com.google.firebase.dataconnect.DataConnectLogging.LogLevelStackFrame [RemovedInterface]
error: Method com.google.firebase.dataconnect.FirebaseDataConnectKt.getLogging has changed return type from com.google.firebase.dataconnect.DataConnectLogging to com.google.firebase.dataconnect.DataConnectLogging<?> [ChangedType]

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.

dconeybe changed the title dataconnect: FirebaseDataConnect.logging added dataconnect: FirebaseDataConnect.logLeve changed to MutableStateFlow Dec 11, 2024
dconeybe changed the title dataconnect: FirebaseDataConnect.logLeve changed to MutableStateFlow dataconnect: FirebaseDataConnect.logLevel changed to MutableStateFlow Dec 11, 2024
dconeybe marked this pull request as ready for review December 11, 2024 19:30
dconeybe merged commit 8130292 into main Dec 11, 2024
dconeybe deleted the dconeybe/dataconnect/LogLevelFlow branch December 11, 2024 22:58
firebase locked and limited conversation to collaborators Jan 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL