-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Rc a/b testing & rollouts cli #9213
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
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: varun rathore <[email protected]> Co-authored-by: Varun Rathore <[email protected]>
* Rc rollouts implementation Remote Config Rollouts CLI implementation --------- Authored-by: Varun Rathore <[email protected]>
Summary of ChangesHello @rathovarun1032, 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 significantly expands the Firebase CLI's capabilities by introducing a full suite of command-line tools for managing Remote Config Experiments and Rollouts. Users can now perform common operations like retrieving, listing, and deleting these configurations directly from their terminal, streamlining development workflows and providing greater control over their Firebase projects. 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 adds new CLI commands for managing Remote Config Experiments and Rollouts. The implementation is comprehensive, including commands for getting, listing, and deleting both experiments and rollouts, along with corresponding API clients and tests. The code is well-structured. I've provided some suggestions to improve consistency, correctness, and user experience. Key points include making command arguments required where appropriate, fixing a typo in an error message, and improving consistency in naming and logging.
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.
Some small nits to fix before submitting, but overall this looks great!
.action(async (options: Options) => { | ||
const projectNumber = await needProjectNumber(options); | ||
const listExperimentOptions: ListExperimentOptions = { | ||
pageSize: (options.pageSize as string) ?? DEFAULT_PAGE_SIZE, |
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.
I like to avoid this sort of casting by adding a specialized RemoteConfigOptions type that is fulfilled by Options. Here's an example from hosting, would love something similar here: https://github.com/firebase/firebase-tools/blob/master/src/hosting/options.ts
Applies for all the commands.
- Improved the clarity of the `firebase apptesting:execute` command when you have zero or multiple apps. | ||
- `firebase dataconnect:sql:migrate` now supports Cloud SQL instances with only private IPs. The command must be run in the same VPC of the instance to work. (##9200) | ||
- Fixed an issue where `firebase deploy --only firestore` would fail with 403 errors on projects that never had a database created. | ||
- Added `remoteconfig:experiments:get`, `remoteconfig:experiments:list`, and `remoteconfig:experiments:delete` commands to manage Remote Config experiments. |
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.
Looks like this CHANGELOG is out of date and is pulling in things that went out in the last release. Can you change this to only include lines 9, 10, and 11?
Description
This PR adds the implementation of the CLI utility for Remote Config Experiments & Rollouts. The operations exposed are:
GetExperiment
ListExperiments
DeleteExperiment
GetRollout
ListRollouts
DeleteRollout
Scenarios Tested
FirebaseError
and returns it.--json
flag forGet
,List
andDelete
experiments & rollouts.GetExperiment
andDeleteExperiment
share similar test cases:Expectation: The user should pass the
experimentID
that is required to be fetched / deleted.Test cases:
experimentId
experimentId
ListExperiment
Expectation: The user can optionally pass a
filter
,page_size
andpage_token
.page_size
number of experiments10
experiments after thepage_token
or remaining experiments (minimum of both)page_token
andpage_size
page_size
number of experiments starting atpage_token
page_token
,page_size
andfilter
page_token
GetRollout
andDeleteRollout
share similar test cases:Expectation: The user should pass the
rolloutId
that is required to be fetched / deleted.Test cases:
rolloutId
rolloutId
ListRollouts
Expectation: The user can optionally pass a
filter
,page_size
andpage_token
.page_size
number of rollouts10
rollouts after thepage_token
or remaining rollouts (minimum of both)page_token
andpage_size
page_size
number of rollouts starting atpage_token
page_token
,page_size
andfilter
page_token
Sample Commands
GetExperiment
firebase remoteconfig:experiments:get <experiment ID>
ListExperiment
firebase remoteconfig:experiement:list --filter <optional filter> --page_size <optional page size> --page token <optional page token>
DeleteExperiment
firebase remoteconfig:experiments:delete <experiment ID>
GetRollout
firebase remoteconfig:rollouts:get <rolloutId>
ListRollouts
firebase remoteconfig:rollouts:list --filter <optional filter> --page_size <optional page size> --page_token <optional page token>
DeleteRollout
firebase remoteconfig:rollouts:delete <rolloutId>