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

Update pubsub version/md5/byte size. #5205

Merged
merged 5 commits into from Nov 9, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,5 @@
- Updated the pubsub emulator to v0.7.1.
- Updated some emulator download logic to pause after unzipping to avoid a file not found issue.
- Fixes gzipped file handling in Storage Emulator.
- Add support for object list using certain Admin SDKs (#5208)
- Fixes source token expiration issue by acquiring new source token upon expiration.
Expand Down
6 changes: 5 additions & 1 deletion src/emulator/download.ts
Expand Up @@ -37,6 +37,10 @@ export async function downloadEmulator(name: DownloadableEmulators): Promise<voi
await unzip(emulator.downloadPath, emulator.unzipDir);
}

// Set a delay while the unzip stream completes before running chmod
// See https://github.com/ZJONSSON/node-unzipper/issues/165
await new Promise((f) => setTimeout(f, 2000));

const executablePath = emulator.binaryPath || emulator.downloadPath;
fs.chmodSync(executablePath, 0o755);

Expand Down Expand Up @@ -79,7 +83,7 @@ function unzip(zipPath: string, unzipDir: string): Promise<void> {
fs.createReadStream(zipPath)
.pipe(unzipper.Extract({ path: unzipDir })) // eslint-disable-line new-cap
.on("error", reject)
.on("finish", resolve);
.on("close", resolve);
});
}

Expand Down
6 changes: 3 additions & 3 deletions src/emulator/downloadableEmulators.ts
Expand Up @@ -50,9 +50,9 @@ const EMULATOR_UPDATE_DETAILS: { [s in DownloadableEmulators]: EmulatorUpdateDet
expectedChecksum: "a4944414518be206280b495f526f18bf",
},
pubsub: {
version: "0.1.0",
expectedSize: 36623622,
expectedChecksum: "81704b24737d4968734d3e175f4cde71",
version: "0.7.1",
expectedSize: 65137179,
expectedChecksum: "b59a6e705031a54a69e5e1dced7ca9bf",
},
};

Expand Down