Skip to content

Commit 15a67f9

Browse files
authored
Fixed an issue where the FDC emulator did not have ADC provided (#8820)
* Fixed an issue where the FDC emulator did not have ADC provided * PR suggestion * Format
1 parent 6e49bd3 commit 15a67f9

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
- Improve App Hosting compute service account flow for source deploys. (#8785)
22
- Fixed an issue with `ext:configure` where params without default values could not be set. (#8810)
3+
- Fixed an issue where the Data Connect emulator wasn't provided application default credentials. (#8819)

src/emulator/controller.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,8 @@ export async function startAll(
560560
await startEmulator(extensionEmulator);
561561
}
562562

563+
const account = getProjectDefaultAccount(options.projectRoot);
564+
563565
if (emulatableBackends.length) {
564566
if (!listenForEmulator.functions || !listenForEmulator.eventarc || !listenForEmulator.tasks) {
565567
// We did not know that we need Functions and Eventarc earlier but now we do.
@@ -601,8 +603,6 @@ export async function startAll(
601603
);
602604
}
603605

604-
const account = getProjectDefaultAccount(options.projectRoot);
605-
606606
// TODO(b/213241033): Figure out how to watch for changes to extensions .env files & reload triggers when they change.
607607
const functionsEmulator = new FunctionsEmulator({
608608
projectId,
@@ -887,6 +887,7 @@ export async function startAll(
887887
enable_output_generated_sdk: true, // TODO: source from arguments
888888
enable_output_schema_extensions: true,
889889
debug: options.debug,
890+
account,
890891
};
891892

892893
if (exportMetadata.dataconnect) {

src/emulator/dataconnectEmulator.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ export class DataConnectEmulator implements EmulatorInstance {
363363
// If Firebase CLI is logged in, always pass in the credentials to FDC emulator.
364364
const defaultCredPath = await getCredentialPathAsync(account);
365365
if (defaultCredPath) {
366-
logger.log("DEBUG", `Setting GAC to ${defaultCredPath}`);
367366
credsEnv.GOOGLE_APPLICATION_CREDENTIALS = defaultCredPath;
368367
}
369368
}

0 commit comments

Comments
 (0)