Add experimental feature to export functions' IaC#10117
Add experimental feature to export functions' IaC#10117
Conversation
Summary of ChangesHello, 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 introduces an experimental feature to export Cloud Functions' Infrastructure as Code (IaC). The primary goal is to enable the management of Firebase Functions through external deployment tools by providing a standardized output format. This initial version focuses on generating a Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
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.
Code Review
This pull request introduces a new experimental command, functions:export, to export function configurations as Infrastructure as Code. The changes are well-structured, adding the command definition, core export logic, tests, and enabling it behind an experiment flag. My review focuses on improving type safety by removing any, enhancing code structure to reduce nesting, making the code more robust with better checks, and expanding test coverage to include error cases, all in alignment with the repository's style guide.
f6bfce9 to
f1df64a
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new experimental command functions:export to export function configurations as IaC, starting with a functions.yaml format. The implementation is well-structured, with the new command guarded by an experiment flag and supported by new logic and tests for IaC export.
My review focuses on improving type safety and fixing a logic issue in the new command. I've suggested using specific types instead of any to align with the repository's style guide. More importantly, I've identified and proposed a fix for a critical bug where the --codebase option was being ignored.
Overall, this is a good proof-of-concept. Addressing the feedback will make the new feature more robust and reliable.
| await runtimeDelegate.build(); | ||
|
|
||
| logger.debug(`Discovering ${runtimeDelegate.language} source`); | ||
| const build = await runtimeDelegate.discoverBuild( |
There was a problem hiding this comment.
Wanted to double-check, could passing in empty {} here be problematic for any kinds of functions (v1 or other)?
Fragment of #10115 for easier reviewing
Adds experiment-guarded command to export IaC for functions codebases. Has a variety of purposes, including allowing functions to be managed with other deployment engines.
This fragment is a PoC that just exports functions.yaml. This can be used to verify SDKs work as expected before building a corresponding feature in the CLI