Skip to content

dataconnect: use firebase-tools to launch fdc emulator instead of launching it directly #6896

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

Conversation

dconeybe
Copy link
Contributor

No description provided.

Copy link
Contributor

github-actions bot commented Apr 18, 2025

📝 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
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: v10.0

Copy link
Contributor

github-actions bot commented Apr 18, 2025

Test Results

 1 034 files  ±0   1 034 suites  ±0   34m 22s ⏱️ -13s
 5 874 tests ±0   5 852 ✅ ±0  22 💤 ±0  0 ❌ ±0 
11 811 runs  ±0  11 767 ✅ ±0  44 💤 ±0  0 ❌ ±0 

Results for commit 3d2db81. ± Comparison against base commit bd2cb5f.

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 18, 2025

Startup Time Report 1

The report is too large (122,595 chars) to be displayed on GitHub. Please check this report on GCS.

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 18, 2025

Coverage Report 1

Affected Products

  • firebase-config

    Overall coverage changed from ? (bd2cb5f) to 84.30% (3e52353) by ?.

    34 individual files with coverage change

    FilenameBase (bd2cb5f)Merge (3e52353)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.45%?
    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?31.58%?
    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.16% (bd2cb5f) to 50.18% (3e52353) by +0.02%.

    FilenameBase (bd2cb5f)Merge (3e52353)Diff
    ChildChangeAccumulator.java83.33%96.67%+13.33%
    DoubleNode.java100.00%88.24%-11.76%
  • firebase-firestore

    Overall coverage changed from 45.78% (bd2cb5f) to 45.78% (3e52353) by -0.00%.

    FilenameBase (bd2cb5f)Merge (3e52353)Diff
    DeleteMutation.java95.24%90.48%-4.76%
  • firebase-installations

    Overall coverage changed from ? (bd2cb5f) to 58.17% (3e52353) by ?.

    23 individual files with coverage change

    FilenameBase (bd2cb5f)Merge (3e52353)Diff
    AutoValue_InstallationResponse.java?58.93%?
    AutoValue_PersistedInstallationEntry.java?56.98%?
    AutoValue_TokenResult.java?42.22%?
    AwaitListener.java?0.00%?
    Clock.java?0.00%?
    CrossProcessLock.java?51.85%?
    FirebaseInstallations.java?96.62%?
    FirebaseInstallationServiceClient.java?4.80%?
    FirebaseInstallationsException.java?78.57%?
    FirebaseInstallationsRegistrar.java?100.00%?
    GetAuthTokenListener.java?100.00%?
    GetIdListener.java?70.00%?
    IidStore.java?22.39%?
    InstallationResponse.java?100.00%?
    Installations.kt?40.00%?
    PersistedInstallation.java?97.01%?
    PersistedInstallationEntry.java?100.00%?
    RandomFidGenerator.java?20.00%?
    RequestLimiter.java?100.00%?
    StateListener.java?0.00%?
    SystemClock.java?100.00%?
    TokenResult.java?100.00%?
    Utils.java?95.00%?

  • firebase-messaging

    Overall coverage changed from 84.02% (bd2cb5f) to 84.13% (3e52353) by +0.11%.

    FilenameBase (bd2cb5f)Merge (3e52353)Diff
    Metadata.java36.51%41.27%+4.76%
  • firebase-sessions

    Overall coverage changed from 66.67% (bd2cb5f) to 66.56% (3e52353) by -0.11%.

    FilenameBase (bd2cb5f)Merge (3e52353)Diff
    RemoteSettings.kt88.73%87.32%-1.41%

Test Logs

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

…e version used for codegen

diff --git a/.github/workflows/dataconnect.yml b/.github/workflows/dataconnect.yml
index a9e895d..0e77b04 100644
--- a/.github/workflows/dataconnect.yml
+++ b/.github/workflows/dataconnect.yml
@@ -174,14 +174,24 @@ jobs:
       - name: Start Firebase Emulators
         run: |
           set -xveuo pipefail
+
+          # Use the same dataconnect binary as was used for code generation in gradle assemble
+          DATACONNECT_EMULATOR_BINARY_PATH="$(find "$PWD"/firebase-dataconnect/connectors/build/intermediates/dataconnect/debug/executable -type f)"
+          if [[ -n $DATACONNECT_EMULATOR_BINARY_PATH ]] ; then
+            echo "INTERNAL ERROR v7kg2dfhbc: unable to find data connect binary" >&2
+            exit 1
+          fi
+          export DATACONNECT_EMULATOR_BINARY_PATH
+
           export FIREBASE_DATACONNECT_POSTGRESQL_STRING='postgresql://postgres:[email protected]:5432?sslmode=disable'
-          export DATACONNECT_EMULATOR_BINARY_PATH="$PWD"/firebase-dataconnect/connectors/build/intermediates/dataconnect/debug/executable/dataconnect-*
           cd firebase-dataconnect/emulator
           ${{ env.FDC_FIREBASE_COMMAND }} emulators:start --only=auth,dataconnect >firebase.emulators.log 2>&1 &

       - name: Start Logcat Capture
         continue-on-error: true
-        run: "$ANDROID_HOME/platform-tools/adb" logcat >logcat.log 2>&1 &
+        run: |
+          set -xveuo pipefail
+          "$ANDROID_HOME/platform-tools/adb" logcat >logcat.log 2>&1 &

       - name: Gradle connectedCheck
         id: connectedCheck
@dconeybe dconeybe marked this pull request as ready for review April 18, 2025 07:51
@dconeybe dconeybe requested a review from Copilot April 18, 2025 07:51
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the Firebase Tools version to v14.2.0 in the CI workflows and refactors the emulator startup process to use firebase-tools instead of directly downloading the emulator binary.

  • Update Firebase Tools version in both workflow files
  • Refactor emulator startup commands to locate and launch the dataconnect binary
  • Rename steps (e.g. "Data Connect Emulator Start" → "Start Firebase Emulators") for better clarity

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/dataconnect_demo_app.yml Updated FDC_FIREBASE_TOOLS_VERSION to v14.2.0
.github/workflows/dataconnect.yml Updated Firebase Tools version, removed restore-gradle-cache step, and refactored emulator start commands
Files not reviewed (1)
  • firebase-dataconnect/gradleplugin/plugin/src/main/resources/com/google/firebase/dataconnect/gradle/plugin/DataConnectExecutableVersions.json: Language not supported

@dconeybe dconeybe requested a review from aashishpatil-g April 18, 2025 07:55
@dconeybe dconeybe changed the title dataconnect: use firebase-tools to launch fdc emulator instead of downloading the emulator binary directly dataconnect: use firebase-tools to launch fdc emulator instead of launching it directly Apr 18, 2025
@dconeybe dconeybe merged commit fd65539 into main Apr 18, 2025
428 of 430 checks passed
@dconeybe dconeybe deleted the dconeybe/dataconnect/FirebaseToolsForDataConnectEmulator branch April 18, 2025 18:32
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.

3 participants