Skip to content

Conversation

Namyalg
Copy link

@Namyalg Namyalg commented Aug 29, 2025

Description

This PR adds the implementation of the CLI utility for Remote Config Experiments. The operations exposed are:

  1. GetExperiment
  2. ListExperiments
  3. DeleteExperiment

Scenarios Tested

  1. Unit tests have been written
  2. Manual E2E tests have been performed for the CLI commands.
  3. The CLI wraps raw API errors into FirebaseError and returns it
  4. Verify with the --json flag for Get, List and Delete experiments

GetExperiment and DeleteExperiment share similar test cases:

Expectation: The user should pass the experimentID that is required to be fetched / deleted.

Test cases:

Test Case Description Expectation
i Passing a valid experimentId Return the specified experiment.
ii Not passing an experimentId Returns an error about resource being invalid.
iii Passing an incorrect / invalid ID Returns an error about resource being invalid.

ListExperiment

Expectation: The user can optionally pass a filter, page_size and page_token.

Test Case Description Expectation
i Passing none of the filter, page_size and page_token. Return all experiments
ii Passing a valid filter Return the filtered experiment(s)
iii Passing only a valid page size Return page_size number of experiments
iv Passing only a page token Return 10 experiments after the page_token or remaining experiments (minimum of both)
v Passing page_token and page_size Return page_size number of experiments starting at page_token
vi Pass a combination of page_token, page_size and filter Return the filtered experiment(s)
vii Pass an incorrect page_token Return an error stating token is invalid
viii Pass an incorrect / invalid filter Return an empty object or no experiments

Sample Commands

  1. GetExperiment

firebase remoteconfig:experiments:get <experiment ID>

  1. ListExperiment

firebase remoteconfig:experiement:list --filter <optional filter> --page_size <optional page size> --page token <optional page token>

  1. DeleteExperiment

firebase remoteconfig:experiments:delete <experiment ID>

@Namyalg Namyalg changed the title chore: add initial implementation of GetExperiment [WIP] CLI for Remote Config Experiments Aug 29, 2025
@Namyalg Namyalg force-pushed the lg-abt-cli branch 2 times, most recently from 109ec6c to f6f6710 Compare September 15, 2025 04:05
@Namyalg Namyalg marked this pull request as ready for review September 15, 2025 05:33
@Namyalg Namyalg changed the title [WIP] CLI for Remote Config Experiments CLI for Remote Config Experiments Sep 16, 2025
@Namyalg Namyalg requested a review from athiramanu September 16, 2025 05:43
Copy link

@ashish-kothari ashish-kothari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Namyalg Namyalg requested a review from joehan September 16, 2025 12:48
Copy link
Contributor

@joehan joehan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a changelog entry - otherwise, this LGTM

@Namyalg Namyalg merged commit 77ea009 into rc-abt-rollouts-cli Sep 24, 2025
44 checks passed
@Namyalg Namyalg deleted the lg-abt-cli branch September 24, 2025 07:21
@github-project-automation github-project-automation bot moved this from Approved [PR] to Done in [Cloud] Extensions + Functions Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants