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

emulator bump to v1.1.20 #7254

Merged
merged 5 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
- Updated Pub/Sub emulator to v0.8.14 (#7197).
- Updates default resource names and template during `firebase init dataconnect`.
- Improved handling of 'fresh from Console' services during `init dataconnect`.
- Update to Firebase Data Connect Emulator v1.1.20 which adds support for Postgres 16
1 change: 0 additions & 1 deletion src/emulator/dataconnectEmulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
private logger = EmulatorLogger.forEmulator(Emulators.DATACONNECT);

async start(): Promise<void> {
this.logger.log("DEBUG", `Using Postgres connection string: ${this.getLocalConectionString()}`);

Check warning on line 37 in src/emulator/dataconnectEmulator.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Invalid type "string | undefined" of template literal expression
try {
const info = await DataConnectEmulator.build({ configDir: this.args.configDir });
if (requiresVector(info.metadata)) {
Expand All @@ -52,14 +52,13 @@
);
}
}
} catch (err: any) {

Check warning on line 55 in src/emulator/dataconnectEmulator.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
this.logger.log("DEBUG", `'fdc build' failed with error: ${err.message}`);

Check warning on line 56 in src/emulator/dataconnectEmulator.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Invalid type "any" of template literal expression

Check warning on line 56 in src/emulator/dataconnectEmulator.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe member access .message on an `any` value
}
return start(Emulators.DATACONNECT, {
auto_download: this.args.auto_download,
listen: listenSpecsToString(this.args.listen),
config_dir: this.args.configDir,
local_connection_string: this.getLocalConectionString(),
project_id: this.args.projectId,
service_location: this.args.locationId,
});
Expand Down Expand Up @@ -117,7 +116,7 @@
}
if (res.status !== 0) {
throw new FirebaseError(
`Unable to build your Data Connect schema and connectors (exit code ${res.status}): ${res.stderr}`,

Check warning on line 119 in src/emulator/dataconnectEmulator.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Invalid type "number | null" of template literal expression
);
}

Expand All @@ -133,7 +132,7 @@
}
}

private getLocalConectionString() {

Check warning on line 135 in src/emulator/dataconnectEmulator.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing return type on function
if (dataConnectLocalConnString()) {
return dataConnectLocalConnString();
}
Expand Down
19 changes: 9 additions & 10 deletions src/emulator/downloadableEmulators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,20 @@
dataconnect:
process.platform === "darwin"
? {
version: "1.1.19",
expectedSize: 25836864,
expectedChecksum: "b31ba00789b82a30f0dee1c03b8f74ce",
version: "1.1.20",
expectedSize: 23946048,
expectedChecksum: "af59c09968a00b0a0666cfc17d6883b2",
}
: process.platform === "win32"
? {
version: "1.1.19",
expectedSize: 23629824,
expectedChecksum: "bcbd7705b36cee72ff0587749d67bfc3",
version: "1.1.20",
expectedSize: 24355328,
expectedChecksum: "e56ca1467919c3566c04bd55c91e9524",
}
: {
version: "1.1.19",
expectedSize: 23247120,
expectedChecksum: "56d6cb2ad85474d3a67999e35d2916a1",
version: "1.1.20",
expectedSize: 23965956,
expectedChecksum: "3d2a1c0e9a883724bae9aa9aa60a4ec1",
},
};

Expand Down Expand Up @@ -273,7 +273,7 @@
shell: false,
},
pubsub: {
binary: getExecPath(Emulators.PUBSUB)!,

Check warning on line 276 in src/emulator/downloadableEmulators.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Forbidden non-null assertion
args: [],
optionalArgs: ["port", "host"],
joinArgs: true,
Expand All @@ -292,7 +292,6 @@
optionalArgs: [
"listen",
"config_dir",
"local_connection_string",
"project_id",
"service_location",
"disable_sdk_generation",
Expand All @@ -311,7 +310,7 @@
}

/**
* @param name

Check warning on line 313 in src/emulator/downloadableEmulators.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing JSDoc @param "name" description
*/
export function getLogFileName(name: string): string {
return `${name}-debug.log`;
Expand All @@ -324,7 +323,7 @@
*/
export function _getCommand(
emulator: DownloadableEmulators,
args: { [s: string]: any },

Check warning on line 326 in src/emulator/downloadableEmulators.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
): DownloadableEmulatorCommand {
const baseCmd = Commands[emulator];
const defaultPort = Constants.getDefaultPort(emulator);
Expand All @@ -337,7 +336,7 @@
if (
baseCmd.binary === "java" &&
utils.isRunningInWSL() &&
(!args.host || !args.host.includes(":"))

Check warning on line 339 in src/emulator/downloadableEmulators.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe member access .includes on an `any` value
) {
// HACK(https://github.com/firebase/firebase-tools-ui/issues/332): Force
// Java to use IPv4 sockets in WSL (unless IPv6 address explicitly used).
Expand Down
Loading