Skip to content

6.0.0 - Breaking Change on Core API, DataAapter Keys, Environment tier, and getClientIntializeResponse

Compare
Choose a tag to compare
@statsig-kong statsig-kong released this 18 Nov 18:26
· 2 commits to main since this release
74a9406

This version introducing several breaking changes, please read when upgrade.
Detailed upgrade guide can be found here

Breaking Changes

Synchronou Core APIs

Summary: Make most of core APIs synchronous functions: checkGate, getFeatureGate, getConfig, getExperiment, getLayer and deprecated many apis.
Changes: We have deprecated a series of apis such as async checkGate() a while ago, now we are removing this series of apis. All core apis within SDKs are synchronous.
b. Deprecate *Sync functions such as checkGateSync, getConfigSync.. Which serve the same functionalities as the new Synchronous APIs
For migration:
1. if you are using _sync functions, you can just rename functions name to be without sync() for example checkGateSync → checkGate
2. If you are using async functions, compile (for ts) or runtime error will be encountered if you are using .then().error() to handle this promise.

GetClientIntializeResponse() Response Changes

What changed: Default hash algorithm for getClientInitializeResponse() changed from sha256 to djb2.
For migration:
1. If you are passing hashAlgorithm, this should have no impact on you.
2. If you are not, please make sure your client SDKs are up to date (so it handles djb2 responses properly)

DataAdapter Cache Key Changes

Summary: Change cache keys SDK used to read and write from your DataAdapter.
Changes
1. Change cache key for config_specs to be “statsig|v1/download_config_specs|plain_text //copmress encoding|{SHA256Hashed(secretkey)} //false”
2. Change cache key for get_id_lists to be “statsig|get_id_lists|plain_text // compress encoding|{SHA256Hashed(secretkey)}”
4. Change cache key for inidividual id list to be statsig|id_list::${String(idListName)}|plain_text//encoding|${SHA256Hashed(secretKey)}
Migration guide
1. ⚠️ If you are using one fo provided Edge DataAdapter, DO NOT upgrade yet
2. If you are ok with cache miss with the first request, then you don’t need to do anything, SDK will write to cache with new key.
3. If you don’t want cold cache, please write with the new key before upgrade

Default SDK environment tier if not being set

What changed: Before if no environment tier is set, we consider it to be null, which will fail rules which set environment tier. We now assign default value to it: 1. Use SDK Key Tier if being set 2. Use production otherwise
Migration guide
Consider setting environment tier if you are not already.
If you are not setting environment tier, SDK will fail rules which set environment tier to be non-production.

Deprecate WithExposureLoggingDisabled

Migration Guide
Use core API with option instead.
For example, Instead of calling Statsig.getConfigWithExposureLoggingDisabled() call Statsig.getConfig(user, config_name,{disableExposureLogging: true})

New Features

  • Log event compression except edge function

Improvements

  • Add pass field to dynamic configs

Included In This Release

  • cabe3f6 dependabot[bot]
    • Bump micromatch from 4.0.5 to 4.0.8 (#493)
  • 10ed575 sroyal-statsig
    • Add Passed Field to Dynamic Configs for GCIR (#522)
  • b84c37e Xin Li
    • refac: Change checkGate getExperiment getConfig and getLayer functions to be synchronous and remove {core_api}_async functions (#511)
  • e8edac7 Xin Li
    • DataAdapter key v2: Include path and sdk keys as part of DataAdapter key (#509)
  • 44d2983 sroyal-statsig
    • Add Support for Default Environment from Server (#521)
  • a942533 kenny-statsig
    • Re-enable log event compression except for Edge (#506)

Included In This Release

  • 74a8802 Xin Li
    • Update data adapter key (#527)
  • cc2d94d Xin Li
    • change data adapter key for idlists (#526)
  • cabe3f6 dependabot[bot]
    • Bump micromatch from 4.0.5 to 4.0.8 (#493)
  • 10ed575 sroyal-statsig
    • Add Passed Field to Dynamic Configs for GCIR (#522)
  • b84c37e Xin Li
    • refac: Change checkGate getExperiment getConfig and getLayer functions to be synchronous and remove {core_api}_async functions (#511)
  • e8edac7 Xin Li
    • DataAdapter key v2: Include path and sdk keys as part of DataAdapter key (#509)
  • 44d2983 sroyal-statsig
    • Add Support for Default Environment from Server (#521)
  • a942533 kenny-statsig
    • Re-enable log event compression except for Edge (#506)

Full Changelog: 5.30.0...6.0.0