-
Notifications
You must be signed in to change notification settings - Fork 1.1k
firebase init
no longer requires login if no project is selected
#9251
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 @fredzqm, 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 significant changes to the Firebase CLI and its VS Code extension to support a more streamlined and accessible emulator experience. By allowing 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 introduces support for a project-less and login-less emulator experience in VS Code by allowing firebase init
to run with a placeholder project. The changes look good and align with the goal, but I found one issue where the wrong option property was being checked, which would prevent the feature from working correctly. My review includes a suggestion to fix this.
@joehan Hope you are less busy today. Wonder what's your take on this. There are many ways (interactive & non-interactive) to skip project setup in Firebase init. Though login is always required. It's reasonable to expect FDC emulator experience to work e2e without login and project. Given our prior art to use |
I think this is a totally valid use case! In general, init shouldn't require auth unless you choose a project, and if there is no project/user, it should just write files and skip any provisioning. This current implementation seems quite laser focused on the VSCE use case, but i'd prefer to expand it to cover all flows. |
expect(prompt.select).to.be.calledOnce; | ||
expect(prompt.input).to.be.calledTwice; | ||
expect(createFirebaseProjectStub).to.be.not.called; | ||
}); |
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.
expect(prompt.select).to.be.calledOnce; | ||
expect(promptAvailableProjectIdStub).to.be.calledOnce; | ||
expect(addFirebaseProjectStub).to.be.not.called; | ||
}); |
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.
This still works. I moved the validation into promptAvailableProjectId
.
d362d3d
to
edbb6df
Compare
firebase init
no longer requires login if no project is selected
Today,
firebase init
requiresfirebase login
. This is a reasonable requirement for most use cases.However, if you want to try out the emulator experience without a project, login shouldn't be necessary theoretically.
This PR supports
firebase init --project demo-no-project
, which relax thelogin
requirement and skips the project selection.The FDC Data Connect extensions can show "run init" button in zero state with no login and no project connected.
Developers can setup the local emulator and try things out quickly.