Skip to content

Commit

Permalink
Merge pull request #226 from splitio/development
Browse files Browse the repository at this point in the history
Release v1.8.3
  • Loading branch information
EmilianoSanchez authored Jun 29, 2023
2 parents 85f1ed0 + aa82069 commit 84e2134
Show file tree
Hide file tree
Showing 24 changed files with 2,142 additions and 1,876 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @splitio/sdk
5 changes: 5 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.8.3 (June 29, 2023)
- Updated some transitive dependencies for vulnerability fixes.
- Updated SDK_READY_TIMED_OUT event to be emitted immediately when a connection error occurs using pluggable storage (i.e., when the wrapper `connect` promise is rejected) in consumer and partial consumer modes.
- Bugfix - The `destroy` method has been updated to immediately flag the SDK client as destroyed, to prevent unexpected behaviours when `getTreatment` and `track` methods are called synchronously after `destroy` method is called.

1.8.2 (May 15, 2023)
- Updated terminology on the SDKs codebase to be more aligned with current standard without causing a breaking change. The core change is the term split for feature flag on things like logs and IntelliSense comments.
- Updated split storage modules to optimize some operations when using Redis and pluggable storages.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Split has built and maintains SDKs for:

* .NET [Github](https://github.com/splitio/dotnet-client) [Docs](https://help.split.io/hc/en-us/articles/360020240172--NET-SDK)
* Android [Github](https://github.com/splitio/android-client) [Docs](https://help.split.io/hc/en-us/articles/360020343291-Android-SDK)
* Angular [Github](https://github.com/splitio/angular-sdk-plugin) [Docs](https://help.split.io/hc/en-us/articles/6495326064397-Angular-utilities)
* GO [Github](https://github.com/splitio/go-client) [Docs](https://help.split.io/hc/en-us/articles/360020093652-Go-SDK)
* iOS [Github](https://github.com/splitio/ios-client) [Docs](https://help.split.io/hc/en-us/articles/360020401491-iOS-SDK)
* Java [Github](https://github.com/splitio/java-client) [Docs](https://help.split.io/hc/en-us/articles/360020405151-Java-SDK)
Expand Down
3,824 changes: 1,994 additions & 1,830 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@splitsoftware/splitio-commons",
"version": "1.8.2",
"version": "1.8.3",
"description": "Split Javascript SDK common components",
"main": "cjs/index.js",
"module": "esm/index.js",
Expand Down
55 changes: 40 additions & 15 deletions src/readiness/__tests__/readinessManager.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ test('READINESS MANAGER / Ready event should be fired once', () => {
expect(counter).toBe(1); // should be called once
});

test('READINESS MANAGER / Ready event should be fired once', (done) => {
test('READINESS MANAGER / Ready from cache event should be fired once', (done) => {
const readinessManager = readinessManagerFactory(EventEmitter);
let counter = 0;

Expand Down Expand Up @@ -143,26 +143,51 @@ test('READINESS MANAGER / Segment updates should not be propagated', (done) => {
});
});

test('READINESS MANAGER / Timeout ready event', (done) => {
const readinessManager = readinessManagerFactory(EventEmitter, 10);
describe('READINESS MANAGER / Timeout ready event', () => {
let readinessManager: IReadinessManager;
let timeoutCounter: number;

let timeoutCounter = 0;
beforeEach(() => {
// Schedule timeout to be fired before SDK_READY
readinessManager = readinessManagerFactory(EventEmitter, 10);
timeoutCounter = 0;

readinessManager.gate.on(SDK_READY_TIMED_OUT, () => {
expect(readinessManager.hasTimedout()).toBe(true);
if (!readinessManager.isReady()) timeoutCounter++;
readinessManager.gate.on(SDK_READY_TIMED_OUT, () => {
expect(readinessManager.hasTimedout()).toBe(true);
if (!readinessManager.isReady()) timeoutCounter++;
});

setTimeout(() => {
readinessManager.splits.emit(SDK_SPLITS_ARRIVED);
readinessManager.segments.emit(SDK_SEGMENTS_ARRIVED);
}, 20);
});

readinessManager.gate.on(SDK_READY, () => {
expect(readinessManager.isReady()).toBe(true);
expect(timeoutCounter).toBe(1); // Timeout was scheduled to be fired quickly
done();
test('should be fired once', (done) => {
readinessManager.gate.on(SDK_READY, () => {
expect(readinessManager.isReady()).toBe(true);
expect(timeoutCounter).toBe(1);
done();
});

readinessManager.gate.on(SDK_READY_TIMED_OUT, () => {
// Calling timeout again should not re-trigger the event
readinessManager.timeout();
setTimeout(readinessManager.timeout);
});
});

setTimeout(() => {
readinessManager.splits.emit(SDK_SPLITS_ARRIVED);
readinessManager.segments.emit(SDK_SEGMENTS_ARRIVED);
}, 50);
test('should be fired once if called explicitly', (done) => {
readinessManager.gate.on(SDK_READY, () => {
expect(readinessManager.isReady()).toBe(true);
expect(timeoutCounter).toBe(1);
done();
});

// Calling timeout multiple times triggers the event only once
readinessManager.timeout();
setTimeout(readinessManager.timeout);
});
});

test('READINESS MANAGER / Cancel timeout if ready fired', (done) => {
Expand Down
14 changes: 10 additions & 4 deletions src/readiness/readinessManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,16 @@ export function readinessManagerFactory(

// emit SDK_READY_TIMED_OUT
let hasTimedout = false;

function timeout() {
if (hasTimedout) return;
hasTimedout = true;
gate.emit(SDK_READY_TIMED_OUT, 'Split SDK emitted SDK_READY_TIMED_OUT event.');
}

let readyTimeoutId: ReturnType<typeof setTimeout>;
if (readyTimeout > 0) {
readyTimeoutId = setTimeout(() => {
hasTimedout = true;
gate.emit(SDK_READY_TIMED_OUT, 'Split SDK emitted SDK_READY_TIMED_OUT event.');
}, readyTimeout);
readyTimeoutId = setTimeout(timeout, readyTimeout);
}

// emit SDK_READY and SDK_UPDATE
Expand Down Expand Up @@ -108,6 +112,8 @@ export function readinessManagerFactory(
return readinessManagerFactory(EventEmitter, readyTimeout, splits);
},

timeout,

destroy() {
isDestroyed = true;

Expand Down
1 change: 1 addition & 0 deletions src/readiness/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export interface IReadinessManager {
isDestroyed(): boolean,
isOperational(): boolean,

timeout(): void,
destroy(): void,

/** for client-side */
Expand Down
6 changes: 3 additions & 3 deletions src/sdkClient/clientAttributesDecoration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ export function clientAttributesDecoration<TClient extends SplitIO.IClient | Spl
},

/**
* Returns the attribute with the given key
* Returns the attribute with the given name
*
* @param {string} attributeName Attribute name
* @returns {Object} Attribute with the given key
* @returns {Object} Attribute with the given name
*/
getAttribute(attributeName: string) {
log.debug(`retrieved attribute ${attributeName}`);
Expand Down Expand Up @@ -100,7 +100,7 @@ export function clientAttributesDecoration<TClient extends SplitIO.IClient | Spl
},

/**
* Removes from client's in memory attributes storage the attribute with the given key
* Removes from client's in memory attributes storage the attribute with the given name
*
* @param {string} attributeName
* @returns {boolean} true if attribute was removed and false otherways
Expand Down
8 changes: 4 additions & 4 deletions src/sdkClient/clientInputValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ export function clientInputValidationDecorator<TClient extends SplitIO.IClient |
const key = validateKey(log, maybeKey, methodName);
const splitOrSplits = multi ? validateSplits(log, maybeFeatureFlagNameOrNames, methodName) : validateSplit(log, maybeFeatureFlagNameOrNames, methodName);
const attributes = validateAttributes(log, maybeAttributes, methodName);
const isOperational = validateIfNotDestroyed(log, readinessManager, methodName);
const isNotDestroyed = validateIfNotDestroyed(log, readinessManager, methodName);

validateIfOperational(log, readinessManager, methodName);

const valid = isOperational && key && splitOrSplits && attributes !== false;
const valid = isNotDestroyed && key && splitOrSplits && attributes !== false;

return {
valid,
Expand Down Expand Up @@ -105,9 +105,9 @@ export function clientInputValidationDecorator<TClient extends SplitIO.IClient |
const event = validateEvent(log, maybeEvent, 'track');
const eventValue = validateEventValue(log, maybeEventValue, 'track');
const { properties, size } = validateEventProperties(log, maybeProperties, 'track');
const isOperational = validateIfNotDestroyed(log, readinessManager, 'track');
const isNotDestroyed = validateIfNotDestroyed(log, readinessManager, 'track');

if (isOperational && key && tt && event && eventValue !== false && properties !== false) { // @ts-expect-error
if (isNotDestroyed && key && tt && event && eventValue !== false && properties !== false) { // @ts-expect-error
return client.track(key, tt, event, eventValue, properties, size);
} else {
return isSync ? false : Promise.resolve(false);
Expand Down
5 changes: 4 additions & 1 deletion src/sdkClient/sdkClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export function sdkClientFactory(params: ISdkFactoryContext, isSharedClient?: bo
return __cooldown(__flush, COOLDOWN_TIME_IN_MILLIS);
},
destroy() {
// Mark the SDK as destroyed immediately
sdkReadinessManager.readinessManager.destroy();

// record stat before flushing data
if (!isSharedClient) telemetryTracker.sessionLength();

Expand All @@ -61,12 +64,12 @@ export function sdkClientFactory(params: ISdkFactoryContext, isSharedClient?: bo

return __flush().then(() => {
// Cleanup event listeners
sdkReadinessManager.readinessManager.destroy();
signalListener && signalListener.stop();

// Release the SDK Key if it is the main client
if (!isSharedClient) releaseApiKey(settings.core.authorizationKey);

// @TODO stop only if last client is destroyed
if (uniqueKeysTracker) uniqueKeysTracker.stop();

// Cleanup storage
Expand Down
5 changes: 4 additions & 1 deletion src/sdkClient/sdkClientMethodCS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ export function sdkClientMethodCSFactory(params: ISdkFactoryContext): (key?: Spl

const sharedSdkReadiness = sdkReadinessManager.shared(readyTimeout);
const sharedStorage = storage.shared && storage.shared(matchingKey, (err) => {
if (err) return;
if (err) {
sharedSdkReadiness.readinessManager.timeout();
return;
}
// Emit SDK_READY in consumer mode for shared clients
sharedSdkReadiness.readinessManager.segments.emit(SDK_SEGMENTS_ARRIVED);
});
Expand Down
5 changes: 4 additions & 1 deletion src/sdkClient/sdkClientMethodCSWithTT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ export function sdkClientMethodCSFactory(params: ISdkFactoryContext): (key?: Spl

const sharedSdkReadiness = sdkReadinessManager.shared(readyTimeout);
const sharedStorage = storage.shared && storage.shared(matchingKey, (err) => {
if (err) return;
if (err) {
sharedSdkReadiness.readinessManager.timeout();
return;
}
// Emit SDK_READY in consumer mode for shared clients
sharedSdkReadiness.readinessManager.segments.emit(SDK_SEGMENTS_ARRIVED);
});
Expand Down
6 changes: 5 additions & 1 deletion src/sdkFactory/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ export function sdkFactory(params: ISdkFactoryParams): SplitIO.ICsSDK | SplitIO.
const storage = storageFactory({
settings,
onReadyCb: (error) => {
if (error) return; // Don't emit SDK_READY if storage failed to connect. Error message is logged by wrapperAdapter
if (error) {
// If storage fails to connect, SDK_READY_TIMED_OUT event is emitted immediately. Review when timeout and non-recoverable errors are reworked
readiness.timeout();
return;
}
readiness.splits.emit(SDK_SPLITS_ARRIVED);
readiness.segments.emit(SDK_SEGMENTS_ARRIVED);
},
Expand Down
2 changes: 1 addition & 1 deletion src/storages/pluggable/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export function PluggableStorage(options: PluggableStorageOptions): IStorageAsyn
}).catch((e) => {
e = e || new Error('Error connecting wrapper');
onReadyCb(e);
return e;
return e; // Propagate error for shared clients
});

return {
Expand Down
1 change: 0 additions & 1 deletion src/sync/polling/updaters/segmentChangesUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export function segmentChangesUpdaterFactory(

for (let index = 0; index < segmentNames.length; index++) {
updaters.push(updateSegment(segmentNames[index], noCache, till, fetchOnlyNew));

}

return Promise.all(updaters).then(shouldUpdateFlags => {
Expand Down
5 changes: 4 additions & 1 deletion src/sync/streaming/SSEHandler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ export interface ISegmentUpdateData {

export interface ISplitUpdateData {
type: SPLIT_UPDATE,
changeNumber: number
changeNumber: number,
pcn?: number,
d?: string,
c?: Compression
}

export interface ISplitKillData {
Expand Down
24 changes: 24 additions & 0 deletions src/sync/streaming/__tests__/dataMocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,3 +249,27 @@ export const bitmaps = [
]
}
];


export const splitNotifications = [
{
compression: 0,
data: 'eyJ0cmFmZmljVHlwZU5hbWUiOiJ1c2VyIiwiaWQiOiJkNDMxY2RkMC1iMGJlLTExZWEtOGE4MC0xNjYwYWRhOWNlMzkiLCJuYW1lIjoibWF1cm9famF2YSIsInRyYWZmaWNBbGxvY2F0aW9uIjoxMDAsInRyYWZmaWNBbGxvY2F0aW9uU2VlZCI6LTkyMzkxNDkxLCJzZWVkIjotMTc2OTM3NzYwNCwic3RhdHVzIjoiQUNUSVZFIiwia2lsbGVkIjpmYWxzZSwiZGVmYXVsdFRyZWF0bWVudCI6Im9mZiIsImNoYW5nZU51bWJlciI6MTY4NDMyOTg1NDM4NSwiYWxnbyI6MiwiY29uZmlndXJhdGlvbnMiOnt9LCJjb25kaXRpb25zIjpbeyJjb25kaXRpb25UeXBlIjoiV0hJVEVMSVNUIiwibWF0Y2hlckdyb3VwIjp7ImNvbWJpbmVyIjoiQU5EIiwibWF0Y2hlcnMiOlt7Im1hdGNoZXJUeXBlIjoiV0hJVEVMSVNUIiwibmVnYXRlIjpmYWxzZSwid2hpdGVsaXN0TWF0Y2hlckRhdGEiOnsid2hpdGVsaXN0IjpbImFkbWluIiwibWF1cm8iLCJuaWNvIl19fV19LCJwYXJ0aXRpb25zIjpbeyJ0cmVhdG1lbnQiOiJvZmYiLCJzaXplIjoxMDB9XSwibGFiZWwiOiJ3aGl0ZWxpc3RlZCJ9LHsiY29uZGl0aW9uVHlwZSI6IlJPTExPVVQiLCJtYXRjaGVyR3JvdXAiOnsiY29tYmluZXIiOiJBTkQiLCJtYXRjaGVycyI6W3sia2V5U2VsZWN0b3IiOnsidHJhZmZpY1R5cGUiOiJ1c2VyIn0sIm1hdGNoZXJUeXBlIjoiSU5fU0VHTUVOVCIsIm5lZ2F0ZSI6ZmFsc2UsInVzZXJEZWZpbmVkU2VnbWVudE1hdGNoZXJEYXRhIjp7InNlZ21lbnROYW1lIjoibWF1ci0yIn19XX0sInBhcnRpdGlvbnMiOlt7InRyZWF0bWVudCI6Im9uIiwic2l6ZSI6MH0seyJ0cmVhdG1lbnQiOiJvZmYiLCJzaXplIjoxMDB9LHsidHJlYXRtZW50IjoiVjQiLCJzaXplIjowfSx7InRyZWF0bWVudCI6InY1Iiwic2l6ZSI6MH1dLCJsYWJlbCI6ImluIHNlZ21lbnQgbWF1ci0yIn0seyJjb25kaXRpb25UeXBlIjoiUk9MTE9VVCIsIm1hdGNoZXJHcm91cCI6eyJjb21iaW5lciI6IkFORCIsIm1hdGNoZXJzIjpbeyJrZXlTZWxlY3RvciI6eyJ0cmFmZmljVHlwZSI6InVzZXIifSwibWF0Y2hlclR5cGUiOiJBTExfS0VZUyIsIm5lZ2F0ZSI6ZmFsc2V9XX0sInBhcnRpdGlvbnMiOlt7InRyZWF0bWVudCI6Im9uIiwic2l6ZSI6MH0seyJ0cmVhdG1lbnQiOiJvZmYiLCJzaXplIjoxMDB9LHsidHJlYXRtZW50IjoiVjQiLCJzaXplIjowfSx7InRyZWF0bWVudCI6InY1Iiwic2l6ZSI6MH1dLCJsYWJlbCI6ImRlZmF1bHQgcnVsZSJ9XX0=',
decoded: {trafficTypeName:'user',id:'d431cdd0-b0be-11ea-8a80-1660ada9ce39',name:'mauro_java',trafficAllocation:100,trafficAllocationSeed:-92391491,seed:-1769377604,status:'ACTIVE',killed:false,defaultTreatment:'off',changeNumber:1684329854385,algo:2,configurations:{},conditions:[{conditionType:'WHITELIST',matcherGroup:{combiner:'AND',matchers:[{matcherType:'WHITELIST',negate:false,whitelistMatcherData:{whitelist:['admin','mauro','nico']}}]},partitions:[{treatment:'off',size:100}],label:'whitelisted'},{conditionType:'ROLLOUT',matcherGroup:{combiner:'AND',matchers:[{keySelector:{trafficType:'user'},matcherType:'IN_SEGMENT',negate:false,userDefinedSegmentMatcherData:{segmentName:'maur-2'}}]},partitions:[{treatment:'on',size:0},{treatment:'off',size:100},{treatment:'V4',size:0},{treatment:'v5',size:0}],label:'in segment maur-2'},{conditionType:'ROLLOUT',matcherGroup:{combiner:'AND',matchers:[{keySelector:{trafficType:'user'},matcherType:'ALL_KEYS',negate:false}]},partitions:[{treatment:'on',size:0},{treatment:'off',size:100},{treatment:'V4',size:0},{treatment:'v5',size:0}],label:'default rule'}]}
},
{
compression: 1, // GZIP
data: 'H4sIAAAAAAAA/8yT327aTBDFXyU612vJxoTgvUMfKB8qcaSapqoihAZ7DNusvWi9TpUiv3tl/pdQVb1qL+cwc3bOj/EGzlKeq3T6tuaYCoZEXbGFgMogkXXDIM0y31v4C/aCgMnrU9/3gl7Pp4yilMMIAuVusqDamvlXeiWIg/FAa5OSU6aEDHz/ip4wZ5Be1AmjoBsFAtVOCO56UXh31/O7ApUjV1eQGPw3HT+NIPCitG7bctIVC2ScU63d1DK5gksHCZPnEEhXVC45rosFW8ig1++GYej3g85tJEB6aSA7Aqkpc7Ws7XahCnLTbLVM7evnzalsUUHi8//j6WgyTqYQKMilK7b31tRryLa3WKiyfRCDeHhq2Dntiys+JS/J8THUt5VyrFXlHnYTQ3LU2h91yGdQVqhy+0RtTeuhUoNZ08wagTVZdxbBndF5vYVApb7z9m9pZgKaFqwhT+6coRHvg398nEweP/157Bd+S1hz6oxtm88O73B0jbhgM47nyej+YRRfgdNODDlXJWcJL9tUF5SqnRqfbtPr4LdcTHnk4rfp3buLOkG7+Pmp++vRM9w/wVblzX7Pm8OGfxf5YDKZfxh9SS6B/2Pc9t/7ja01o5k1PwIAAP//uTipVskEAAA=',
decoded: {trafficTypeName:'user',id:'d431cdd0-b0be-11ea-8a80-1660ada9ce39',name:'mauro_java',trafficAllocation:100,trafficAllocationSeed:-92391491,seed:-1769377604,status:'ACTIVE',killed:false,defaultTreatment:'off',changeNumber:1684333081259,algo:2,configurations:{},conditions:[{conditionType:'WHITELIST',matcherGroup:{combiner:'AND',matchers:[{matcherType:'WHITELIST',negate:false,whitelistMatcherData:{whitelist:['admin','mauro','nico']}}]},partitions:[{treatment:'v5',size:100}],label:'whitelisted'},{conditionType:'ROLLOUT',matcherGroup:{combiner:'AND',matchers:[{keySelector:{trafficType:'user'},matcherType:'IN_SEGMENT',negate:false,userDefinedSegmentMatcherData:{segmentName:'maur-2'}}]},partitions:[{treatment:'on',size:0},{treatment:'off',size:100},{treatment:'V4',size:0},{treatment:'v5',size:0}],label:'in segment maur-2'},{conditionType:'ROLLOUT',matcherGroup:{combiner:'AND',matchers:[{keySelector:{trafficType:'user'},matcherType:'ALL_KEYS',negate:false}]},partitions:[{treatment:'on',size:0},{treatment:'off',size:100},{treatment:'V4',size:0},{treatment:'v5',size:0}],label:'default rule'}]}
},
{
compression: 2, // ZLIB
data: 'eJzMk99u2kwQxV8lOtdryQZj8N6hD5QPlThSTVNVEUKDPYZt1jZar1OlyO9emf8lVFWv2ss5zJyd82O8hTWUZSqZvW04opwhUVdsIKBSSKR+10vS1HWW7pIdz2NyBjRwHS8IXEopTLgbQqDYT+ZUm3LxlV4J4mg81LpMyKqygPRc94YeM6eQTtjphp4fegLVXvD6Qdjt9wPXF6gs2bqCxPC/2eRpDIEXpXXblpGuWCDljGptZ4bJ5lxYSJRZBoFkTcWKozpfsoH0goHfCXpB6PfcngDpVQnZEUjKIlOr2uwWqiC3zU5L1aF+3p7LFhUkPv8/mY2nk3gGgZxssmZzb8p6A9n25ktVtA9iGI3ODXunQ3HDp+AVWT6F+rZWlrWq7MN+YkSWWvuTDvkMSnNV7J6oTdl6qKTEvGnmjcCGjL2IYC/ovPYgUKnvvPtbmrmApiVryLM7p2jE++AfH6fTx09/HvuF32LWnNjStM0Xh3c8ukZcsZlEi3h8/zCObsBpJ0acqYLTmFdtqitK1V6NzrfpdPBbLmVx4uK26e27izpDu/r5yf/16AXun2Cr4u6w591xw7+LfDidLj6Mv8TXwP8xbofv/c7UmtHMmx8BAAD//0fclvU=',
decoded: {trafficTypeName:'user',id:'d431cdd0-b0be-11ea-8a80-1660ada9ce39',name:'mauro_java',trafficAllocation:100,trafficAllocationSeed:-92391491,seed:-1769377604,status:'ACTIVE',killed:false,defaultTreatment:'off',changeNumber:1684265694505,algo:2,configurations:{},conditions:[{conditionType:'WHITELIST',matcherGroup:{combiner:'AND',matchers:[{matcherType:'WHITELIST',negate:false,whitelistMatcherData:{whitelist:['admin','mauro','nico']}}]},partitions:[{treatment:'v5',size:100}],label:'whitelisted'},{conditionType:'ROLLOUT',matcherGroup:{combiner:'AND',matchers:[{keySelector:{trafficType:'user'},matcherType:'IN_SEGMENT',negate:false,userDefinedSegmentMatcherData:{segmentName:'maur-2'}}]},partitions:[{treatment:'on',size:0},{treatment:'off',size:100},{treatment:'V4',size:0},{treatment:'v5',size:0}],label:'in segment maur-2'},{conditionType:'ROLLOUT',matcherGroup:{combiner:'AND',matchers:[{keySelector:{trafficType:'user'},matcherType:'ALL_KEYS',negate:false}]},partitions:[{treatment:'on',size:0},{treatment:'off',size:100},{treatment:'V4',size:0},{treatment:'v5',size:0}],label:'default rule'}]},
},
{
compression: 2, // ZLIB
data: 'eJxsUdFu4jAQ/JVqnx3JDjTh/JZCrj2JBh0EqtOBIuNswKqTIMeuxKH8+ykhiKrqiyXvzM7O7lzAGlEUSqbnEyaiRODgGjRAQOXAIQ/puPB96tHHIPQYQ/QmFNErxEgG44DKnI2AQHXtTOI0my6WcXZAmxoUtsTKvil7nNZVoQ5RYdFERh7VBwK5TY60rqWwqq6AM0q/qa8Qc+As/EHZ5HHMCDR9wQ/9kIajcEygscK6BjhEy+nLr008AwLvSuuOVgjdIIEcC+H03RZw2Hg/n88JEJBHUR0wceUeDXAWTAIWPAYsZEFAQOhDDdwnIPslnOk9NcAvNwEOly3IWtdmC3wLe+1wCy0Q2Hh/zNvTV9xg3sFtr5irQe3v5f7twgAOy8V8vlinQKAUVh7RPJvanbrBsi73qurMQpTM7oSrzjueV6hR2tp05E8J39MV1hq1d7YrWWxsZ2cQGYjzeLXK0pcoyRbLLP69juZZuuiyxoPo2oa7ukqYc+JKNEq+XgVmwopucC6sGMSS9etTvAQCH0I7BO7Ttt21BE7C2E8XsN+l06h/CJy25CveH/eGM0rbHQEt9qiHnR62jtKR7N/8wafQ7tr/AQAA//8S4fPB',
decoded: {trafficTypeName:'user',id:'d704f220-0567-11ee-80ee-fa3c6460cd13',name:'NET_CORE_getTreatmentWithConfigAfterArchive',trafficAllocation:100,trafficAllocationSeed:179018541,seed:272707374,status:'ARCHIVED',killed:false,defaultTreatment:'V-FGyN',changeNumber:1686165617166,algo:2,configurations:{'V-FGyN':'{"color":"blue"}','V-YrWB':'{"color":"red"}'},conditions:[{conditionType:'ROLLOUT',matcherGroup:{combiner:'AND',matchers:[{keySelector:{trafficType:'user',attribute:'test'},matcherType:'LESS_THAN_OR_EQUAL_TO',negate:false,unaryNumericMatcherData:{dataType:'NUMBER',value:20}}]},partitions:[{treatment:'V-FGyN',size:0},{treatment:'V-YrWB',size:100}],label:'test \u003c\u003d 20'}]}
}
];
Loading

0 comments on commit 84e2134

Please sign in to comment.