Skip to content
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

feat(rc): Add server side Remote Config support #2529

Merged
merged 17 commits into from
Apr 15, 2024
Merged

feat(rc): Add server side Remote Config support #2529

merged 17 commits into from
Apr 15, 2024

Commits on Feb 14, 2024

  1. Define SSRC API (#2456)

    Define SSRC API
    ---------
    
    Co-authored-by: Xin Wei <trekforever@users.noreply.github.com>
    erikeldridge and trekforever committed Feb 14, 2024
    Configuration menu
    Copy the full SHA
    bd9d4d8 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2024

  1. Update SSRC API client (#2457)

    Add API changes needed for SSRC
    
    ---------
    
    Co-authored-by: Xin Wei <xinwei@google.com>
    Co-authored-by: jen_h <harveyjen@google.com>
    3 people committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    aed5646 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2024

  1. Add public SSRC methods (#2458)

    Add public SSRC methods
    
    ---------
    
    Co-authored-by: Xin Wei <xinwei@google.com>
    Co-authored-by: jen_h <harveyjen@google.com>
    3 people committed Mar 5, 2024
    Configuration menu
    Copy the full SHA
    5c9b649 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2024

  1. Remove product prefix from SSRC types (#2496)

    We have a Firebase AIP to avoid these prefixes.
    erikeldridge committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    f89632a View commit details
    Browse the repository at this point in the history
  2. Fixes incorrect use of Object.assign when backfilling SSRC config w…

    …ith defaults. (#2503)
    
    In the logic where we backfill config with defaults, the first argument to Object.assign should be an object to assign to, but the code passed the object containing the defaults.
    erikeldridge committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    7246526 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    02c0559 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2024

  1. Remove defaultConfig from public SSRC API (#2505)

    In practice, we only set default config using the initialization
    methods, so make the internal field private to simplify the API.
    erikeldridge committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    ef4b2df View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    69c1262 View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2024

  1. Switch to longs for hash values for percent condition evaluation (#2507)

    * Get And condition passing
    
    * Support and.or condition
    
    * Support true condition
    
    * Support false condition, and fix tests
    
    * Use or.and, not the other way around
    
    * Integrate conditional values into evaluate method
    
    * Test handling for multiple conditions
    
    * Clean up logs
    
    * Extract condition evaluation to class for testing
    
    * Namespace condition names
    
    * Iterate over ordered condition list
    
    * Test condition ordering
    
    * Differentiate named conditions
    
    * Document condition types
    
    * Generalize condition eval test and fix styling
    
    * Replace log statement with todo
    
    * Implement evaluate percent condition for RC server-side
    
    * Apply lint fixes
    
    * Add context param to evaluate method
    
    * Add tests for percent condition eval
    
    * Update evaluator tests to use context
    
    * Increase threshold to +/- 500 for percent condition eval tests
    to prevent some flaky tests.
    
    * Clean up percentCondition tests a bit and add note on the tolerance used
    
    * Apply suggestions from code review
    
    Co-authored-by: jen_h <harveyjen@google.com>
    
    * Update copyright date and remove stray log statement
    
    * Mock farmhash in tests
    
    * Add Math.abs for farmhash - to be consistent with the internal implementation
    
    * Regenerate package-lock to fix Node 14 CI error re busboy
    
    * Fix lint errors
    
    * Rename "id" to "randomizationId" per discussion
    
    * Extract API
    
    * Only return false in cases of uknown template evaluation
    
    * Remove product prefix from type names
    
    * Remove product prefix from exported types
    
    * Remove unused "expression" field from server condition
    
    * Extract API
    
    * Remove prefix from impl classes, for consistency
    
    * Remove prefix from new internal classes
    
    * Remove "server" prefix
    
    * Remove prefix from NamedCondition
    
    * Rename "or" and "and" fields to match API
    
    * Rename "operator" field to "percentOperator" to match API
    
    * Extract API after "and" and "or" rename
    
    * use longjs library for hash
    
    * re-run npm install
    
    * re-attempt
    
    * use node 14, re-attempt
    
    * remove file
    
    * Add comment, switch from lte to lt
    
    ---------
    
    Co-authored-by: Erik Eldridge <erikeldridge@google.com>
    Co-authored-by: Xin Wei <xinwei@google.com>
    Co-authored-by: jen_h <harveyjen@google.com>
    4 people committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    36db280 View commit details
    Browse the repository at this point in the history
  2. Add functionality to accept a JSON template string when initializing …

    …a RC server template (#2520)
    
    * Add support to pass in a json string for RC server template initialization
    
    * Merge ssrc changes
    
    * Apply lint changes
    
    * Update comments
    
    * Run api-extractor:local
    
    * Update comments and address feedback
    
    * Update inline comment and lint fixes
    
    * Revert toJSON functionality for ServerTemplate
    trekforever committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    0aca056 View commit details
    Browse the repository at this point in the history
  3. Define type-specific getters for SSRC (#2519)

    RC's existing SDKs define type-specific getters, like getBoolean.
    These aren't idiomatic for TS/JS, but have a couple advantages:
    
    1. RC param names, values and types are mutable remotely, so a
    simple object can’t guarantee a strict type for application logic. A
    formal schema would address this, but feels excessive for the
    common case. Type-specific methods are consistent with RC's
    current SDKs and ensure appropriate types for application logic.
    2. RC Android and iOS SDKs log events when personalized values
    are used. A method interface facilitates such additional functionality
    erikeldridge committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    8dbf86f View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2024

  1. Add #set and #toJSON to RC ServerTemplate (#2522)

    * Add #set on ServerTemplate to allow for setting and caching a server template
    
    * Simplify initServerTemplate to make use of the new setter
    
    * Update tests
    
    * Address comments and feedback
    
    * Update API docs
    
    * Add export for new type ServerTemplateDataType to index.ts
    
    * Update some inline comments
    trekforever committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    86f4426 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2d16497 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1c2616e View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2024

  1. Configuration menu
    Copy the full SHA
    a48fa8a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0da3d93 View commit details
    Browse the repository at this point in the history
  3. Regenerate package-lock

    erikeldridge committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    f05355d View commit details
    Browse the repository at this point in the history