-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Data Connect Emulator release v3.0.1 #9627
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
Conversation
Summary of ChangesHello @itsrakhil, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the configuration for the Data Connect Emulator to its latest patch release, version 3.0.1. This ensures that all users downloading the emulator will receive the most current build, incorporating any recent bug fixes or minor enhancements. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates the Data Connect emulator to version 3.0.1 by updating its download information in downloadableEmulatorInfo.json. The changes appear correct for a version bump. My review includes two suggestions for improvement: one to enhance security by using SHA-256 for checksum validation instead of the current MD5, and another to refactor the JSON structure to reduce duplication and improve maintainability for future releases.
| "version": "3.0.1", | ||
| "expectedSize": 30212960, | ||
| "expectedChecksum": "5a556a6e52d8e4707be9e65555cf6fc0", | ||
| "expectedChecksumSHA256": "04507e034d26a9e1053a246508351881473c82daf86357a28472e112f50e0128", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this PR correctly updates the SHA256 checksum, the emulator download logic in src/emulator/download.ts still appears to use the MD5 checksum (expectedChecksum) for validation. MD5 is considered cryptographically weak and is not recommended for integrity checks.
To improve security, please consider prioritizing the update to the validateChecksum function to use expectedChecksumSHA256 for a more robust verification of downloaded files. This would provide stronger guarantees about file integrity and address the TODO noted in src/emulator/types.ts.
| "version": "3.0.1", | ||
| "expectedSize": 30212960, | ||
| "expectedChecksum": "5a556a6e52d8e4707be9e65555cf6fc0", | ||
| "expectedChecksumSHA256": "04507e034d26a9e1053a246508351881473c82daf86357a28472e112f50e0128", | ||
| "remoteUrl": "https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-macos-amd64-v3.0.1", | ||
| "downloadPathRelativeToCacheDir": "dataconnect-emulator-3.0.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's significant duplication of the version string '3.0.1' within this block and across other platform configurations for dataconnect. It appears in version, remoteUrl, and downloadPathRelativeToCacheDir. This makes version updates tedious and error-prone.
To improve maintainability, consider refactoring the dataconnect object structure to define the version once and derive the other values from it. This would require changes in the consuming code (src/emulator/downloadableEmulators.ts) but would make future releases safer and less susceptible to copy-paste errors.
Co-authored-by: Joe Hanley <joehanley@google.com>
No description provided.