Skip to content

Conversation

@yuchenshi
Copy link
Member

@yuchenshi yuchenshi commented Apr 2, 2025

Description

The protocol should never be set according to go/emulator-suite-admin-sdk and setting it breaks the Node.js Admin SDK.

Symptoms include error messages like getaddrinfo ENOTFOUND http because it's trying to resolve the word http via DNS.

The other environment variable FIREBASE_DATA_CONNECT_EMULATOR_HOST is consumed by the JS SDK, which requires a protocol right now. We've decided not to remove the protocol for now to avoid breaking the JS SDK (e.g. when used within the Functions emulator where this env var is automatically set).

Scenarios Tested

Not tested

Sample Commands

N/A

The protocol should never be set according to go/emulator-suite-admin-sdk and setting it breaks the Node.js Admin SDK.

Symptoms include error messages like `getaddrinfo ENOTFOUND http` because it's trying to resolve the word `http` via DNS.

I have not tested whether the client SDKs tolerates it but let's just settle on the correct behavior.
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 51.20%. Comparing base (290fab9) to head (85fda84).
Report is 20 commits behind head on master.

Files with missing lines Patch % Lines
src/emulator/env.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8396      +/-   ##
==========================================
+ Coverage   51.08%   51.20%   +0.12%     
==========================================
  Files         425      425              
  Lines       30374    30390      +16     
  Branches     6223     6227       +4     
==========================================
+ Hits        15516    15562      +46     
+ Misses      13471    13439      -32     
- Partials     1387     1389       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yuchenshi yuchenshi changed the title Remove protocol from data connect emulator env var. Remove protocol from DATA_CONNECT_EMULATOR_HOST. Apr 2, 2025
Copy link
Member

@joehan joehan left a comment

Choose a reason for hiding this comment

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

Thank you for adding the detailed comments too!

@yuchenshi yuchenshi disabled auto-merge April 2, 2025 18:23
@yuchenshi yuchenshi enabled auto-merge (squash) April 2, 2025 18:25
@yuchenshi yuchenshi merged commit 159d689 into master Apr 2, 2025
48 of 49 checks passed
@joehan joehan deleted the yuchenshi-patch-2 branch April 2, 2025 18:57
blidd-google pushed a commit that referenced this pull request May 12, 2025
This unbreaks the Node.js Admin SDK who doesn't expect a protocol. The other env vars are unchanged for now but comments were added to clarify their use cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants