@naturalcycles/abba 1.14.1 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/util.js +4 -0
- package/package.json +1 -1
- package/src/util.ts +4 -0
package/dist/util.js
CHANGED
|
@@ -126,6 +126,10 @@ exports.canGenerateNewAssignments = canGenerateNewAssignments;
|
|
|
126
126
|
const getUserExclusionSet = (experiments, existingAssignments) => {
|
|
127
127
|
const exclusionSet = new Set();
|
|
128
128
|
existingAssignments.forEach(assignment => {
|
|
129
|
+
// Users who are excluded from an experiment due to sampling
|
|
130
|
+
// should not prevent potential assignment to other mutually exclusive experiments
|
|
131
|
+
if (assignment.bucketId === null)
|
|
132
|
+
return;
|
|
129
133
|
const experiment = experiments.find(e => e.id === assignment.experimentId);
|
|
130
134
|
experiment?.exclusions.forEach(experimentId => exclusionSet.add(experimentId));
|
|
131
135
|
});
|
package/package.json
CHANGED
package/src/util.ts
CHANGED
|
@@ -150,6 +150,10 @@ export const getUserExclusionSet = (
|
|
|
150
150
|
): ExclusionSet => {
|
|
151
151
|
const exclusionSet: ExclusionSet = new Set()
|
|
152
152
|
existingAssignments.forEach(assignment => {
|
|
153
|
+
// Users who are excluded from an experiment due to sampling
|
|
154
|
+
// should not prevent potential assignment to other mutually exclusive experiments
|
|
155
|
+
if (assignment.bucketId === null) return
|
|
156
|
+
|
|
153
157
|
const experiment = experiments.find(e => e.id === assignment.experimentId)
|
|
154
158
|
experiment?.exclusions.forEach(experimentId => exclusionSet.add(experimentId))
|
|
155
159
|
})
|