Initialize a new function as part of init dataconnect:resolver#9794
Initialize a new function as part of init dataconnect:resolver#9794rosalyntan wants to merge 14 commits intomainfrom
init dataconnect:resolver#9794Conversation
Summary of ChangesHello @rosalyntan, 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 a significant refactoring of the Firebase Functions initialization process, breaking down the monolithic 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. 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 refactors the Cloud Functions initialization feature to align with the askQuestions/actuate pattern, which is a good improvement for consistency. This change enables the dataconnect:resolver initialization to correctly trigger the functions setup flow. The refactoring is well-executed and the logic seems sound. I have one minor suggestion to improve code clarity by updating a comment that became misleading after the changes.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a significant and well-executed refactoring of the functions initialization feature, splitting it into askQuestions and actuate phases. This change enables the primary goal of the PR: to initialize a new Cloud Function with sample code for onGraphRequest as part of the firebase init dataconnect:resolver flow. The changes are logical, the tests have been updated to reflect the new structure, and new templates for the resolver function are included. My main feedback is regarding a small amount of code duplication that could be addressed to improve long-term maintainability.
fredzqm
left a comment
There was a problem hiding this comment.
Didn't have time to do full review today.
Thinking of ways to make it easier:
-
Are there refactors on functions and genkit part that could be split out?
Those part I don't feel less comfortable reviewing.
Maybe we can square them away with eyes from their team. -
The FDC part of the change is actually quite small, looks pretty reasonable to me at high-level. Since it's flag gated, we can certainly check them in, bugbash and iterate on it.
|
Can we set up a short meeting to discuss what you're doing? I have some thoughts and questions:
|
…ctions init flow from the resolver flow.
Description
In
firebase init dataconnect:resolver, also initialize a new functions codebase with sample code demonstrating the use of theonGraphRequestmethod.Note: As part of this change, I've also refactored the legacy
doSetupmethod for thefirebase init functionsflow into separateaskQuestionsandactuatesteps, which aligns with other products'initflows.Future work: If there are existing Cloud Run functions already deployed, allow the user to select a function URL to be associated with their custom resolver schema and bypass initializing a new functions codebase.
Scenarios Tested
Typescript (with eslint): https://paste.googleplex.com/4671059091652608
Typescript (without eslint): https://paste.googleplex.com/4716839617822720
Javascript: (with eslint): https://paste.googleplex.com/6309290279305216
Javascript (without eslint): https://paste.googleplex.com/5223639467294720
Regression testing (
firebase init functions): http://paste.googleplex.com/4665756417654784Sample Commands