From f79ade912aa6bc07a011da092520ad44ecb37101 Mon Sep 17 00:00:00 2001 From: Yagnik Date: Wed, 14 Feb 2024 20:18:11 +0530 Subject: [PATCH 1/5] storing default condition payload values in db with conditions --- .../experiment-design-stepper.service.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/frontend/projects/upgrade/src/app/core/experiment-design-stepper/experiment-design-stepper.service.ts b/frontend/projects/upgrade/src/app/core/experiment-design-stepper/experiment-design-stepper.service.ts index 2bdae41ad4..629636bca6 100644 --- a/frontend/projects/upgrade/src/app/core/experiment-design-stepper/experiment-design-stepper.service.ts +++ b/frontend/projects/upgrade/src/app/core/experiment-design-stepper/experiment-design-stepper.service.ts @@ -323,9 +323,6 @@ export class ExperimentDesignStepperService { payloadTableData.forEach((payloadRowData: SimpleExperimentPayloadTableRowData) => { // if no custom payload, return early, do not add to array to send to backend - if (payloadRowData.payload === payloadRowData.condition) { - return; - } const parentCondition = conditions.find((condition) => condition.conditionCode === payloadRowData.condition); @@ -356,7 +353,7 @@ export class ExperimentDesignStepperService { id: uuidv4(), // TODO: maybe not the right place? levels: conditionLevelsData, condition: conditions, - payload: '', + payload: conditions, weight: '0.0', include: true, }; From 450c6fe8c64ea1959da5b0064cd2eeba756b07ff Mon Sep 17 00:00:00 2001 From: Yagnik Date: Wed, 14 Feb 2024 20:45:14 +0530 Subject: [PATCH 2/5] version bump to v5.1.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 540592e7ad..b9e7e861dd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "UpGrade", - "version": "5.1.0", + "version": "5.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "UpGrade", - "version": "5.1.0", + "version": "5.1.1", "license": "ISC", "devDependencies": { "@angular-eslint/eslint-plugin": "^14.1.2", diff --git a/package.json b/package.json index 4957c9a7fe..6524cfba67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "UpGrade", - "version": "5.1.0", + "version": "5.1.1", "description": "This is a combined repository for UpGrade, an open-source platform to support large-scale A/B testing in educational applications. Learn more at www.upgradeplatform.org", "main": "index.js", "devDependencies": { From 1ad5512fe530089ddc73afafd9f96238abc95735 Mon Sep 17 00:00:00 2001 From: Yagnik Date: Thu, 15 Feb 2024 08:54:43 +0530 Subject: [PATCH 3/5] code clean up review cmt --- .../experiment-design-stepper.service.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/projects/upgrade/src/app/core/experiment-design-stepper/experiment-design-stepper.service.ts b/frontend/projects/upgrade/src/app/core/experiment-design-stepper/experiment-design-stepper.service.ts index 629636bca6..9b24fc1bcb 100644 --- a/frontend/projects/upgrade/src/app/core/experiment-design-stepper/experiment-design-stepper.service.ts +++ b/frontend/projects/upgrade/src/app/core/experiment-design-stepper/experiment-design-stepper.service.ts @@ -322,8 +322,6 @@ export class ExperimentDesignStepperService { const payloadTableData = this.getSimpleExperimentPayloadTableData(); payloadTableData.forEach((payloadRowData: SimpleExperimentPayloadTableRowData) => { - // if no custom payload, return early, do not add to array to send to backend - const parentCondition = conditions.find((condition) => condition.conditionCode === payloadRowData.condition); const decisionPoint = decisionPoints.find( From 57f6545c7e9792c6fa3f32607b9c42a9fb0680b6 Mon Sep 17 00:00:00 2001 From: Yagnik Date: Fri, 16 Feb 2024 14:39:59 +0530 Subject: [PATCH 4/5] removing old condition payload when new are added --- .../Upgrade/src/api/services/ExperimentService.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/backend/packages/Upgrade/src/api/services/ExperimentService.ts b/backend/packages/Upgrade/src/api/services/ExperimentService.ts index 0f4af0b77f..7c95ac73e4 100644 --- a/backend/packages/Upgrade/src/api/services/ExperimentService.ts +++ b/backend/packages/Upgrade/src/api/services/ExperimentService.ts @@ -727,6 +727,7 @@ export class ExperimentService { const oldConditions = oldExperiment.conditions; const oldDecisionPoints = oldExperiment.partitions; const oldQueries = oldExperiment.queries; + const oldConditionPayloads = oldExperiment.conditionPayloads; // create schedules to start experiment and end experiment if (this.scheduledJobService) { @@ -929,6 +930,18 @@ export class ExperimentService { } }); + // delete condition payloads which don't exist in new experiment document + const toDeleteConditionPayloads = []; + oldConditionPayloads.forEach(({ id }) => { + if ( + !conditionPayloadDocToSave.find((doc) => { + return doc.id === id; + }) + ) { + toDeleteConditionPayloads.push(this.conditionPayloadRepository.deleteConditionPayload(id, logger)); + } + }); + // delete old decision points, conditions and queries await Promise.all([ ...toDeleteConditions, From 092ee5eb9e30500c14dadbf09763138ade2ec5cb Mon Sep 17 00:00:00 2001 From: danoswaltCL <97542869+danoswaltCL@users.noreply.github.com> Date: Mon, 26 Feb 2024 13:02:58 -0500 Subject: [PATCH 5/5] version bump to 5.1.1 --- backend/package-lock.json | 4 ++-- backend/package.json | 2 +- backend/packages/Scheduler/package-lock.json | 6 +++--- backend/packages/Scheduler/package.json | 4 ++-- backend/packages/Upgrade/package-lock.json | 4 ++-- backend/packages/Upgrade/package.json | 2 +- clientlibs/java/pom.xml | 2 +- clientlibs/js/package-lock.json | 4 ++-- clientlibs/js/package.json | 2 +- frontend/package-lock.json | 4 ++-- frontend/package.json | 2 +- types/package-lock.json | 4 ++-- types/package.json | 2 +- 13 files changed, 21 insertions(+), 21 deletions(-) diff --git a/backend/package-lock.json b/backend/package-lock.json index 603e6c80c2..047854a44a 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -1,12 +1,12 @@ { "name": "ab_testing_backend", - "version": "5.1.0", + "version": "5.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ab_testing_backend", - "version": "5.1.0", + "version": "5.1.1", "license": "ISC", "dependencies": { "dayjs": "^1.11.10", diff --git a/backend/package.json b/backend/package.json index c50c8db46c..28db2ccd53 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "ab_testing_backend", - "version": "5.1.0", + "version": "5.1.1", "description": "Backend for A/B Testing Project", "scripts": { "install:all": "npm ci && cd packages/Scheduler && npm ci && cd ../Upgrade && npm ci", diff --git a/backend/packages/Scheduler/package-lock.json b/backend/packages/Scheduler/package-lock.json index 92df324c84..5717c356fa 100644 --- a/backend/packages/Scheduler/package-lock.json +++ b/backend/packages/Scheduler/package-lock.json @@ -1,12 +1,12 @@ { "name": "ppl-upgrade-serverless", - "version": "4.3.0", + "version": "5.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ppl-upgrade-serverless", - "version": "4.3.0", + "version": "5.1.1", "license": "MIT", "dependencies": { "jsonwebtoken": "^9.0.0", @@ -8040,4 +8040,4 @@ "dev": true } } -} \ No newline at end of file +} diff --git a/backend/packages/Scheduler/package.json b/backend/packages/Scheduler/package.json index 618ee7d241..a7aa87457f 100644 --- a/backend/packages/Scheduler/package.json +++ b/backend/packages/Scheduler/package.json @@ -1,6 +1,6 @@ { "name": "ppl-upgrade-serverless", - "version": "5.1.0", + "version": "5.1.1", "description": "Serverless webpack example using Typescript", "main": "handler.js", "scripts": { @@ -33,4 +33,4 @@ }, "author": "The serverless webpack authors (https://github.com/elastic-coders/serverless-webpack)", "license": "MIT" -} \ No newline at end of file +} diff --git a/backend/packages/Upgrade/package-lock.json b/backend/packages/Upgrade/package-lock.json index 6bc2ca9382..164b4ce6d1 100644 --- a/backend/packages/Upgrade/package-lock.json +++ b/backend/packages/Upgrade/package-lock.json @@ -1,12 +1,12 @@ { "name": "ab_testing_backend", - "version": "5.1.0", + "version": "5.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ab_testing_backend", - "version": "5.1.0", + "version": "5.1.1", "license": "ISC", "dependencies": { "@aws-sdk/client-s3": "^3.485.0", diff --git a/backend/packages/Upgrade/package.json b/backend/packages/Upgrade/package.json index 8c39a954db..e49266a3a3 100644 --- a/backend/packages/Upgrade/package.json +++ b/backend/packages/Upgrade/package.json @@ -1,6 +1,6 @@ { "name": "ab_testing_backend", - "version": "5.1.0", + "version": "5.1.1", "description": "Backend for A/B Testing Project", "main": "index.js", "scripts": { diff --git a/clientlibs/java/pom.xml b/clientlibs/java/pom.xml index e087900fcd..791596795d 100644 --- a/clientlibs/java/pom.xml +++ b/clientlibs/java/pom.xml @@ -9,7 +9,7 @@ at the same time that happen to rev to the same new version will be caught by a merge conflict. --> - 5.1.0 + 5.1.2 diff --git a/clientlibs/js/package-lock.json b/clientlibs/js/package-lock.json index a8895f559c..7af7409992 100644 --- a/clientlibs/js/package-lock.json +++ b/clientlibs/js/package-lock.json @@ -1,12 +1,12 @@ { "name": "upgrade_client_lib", - "version": "5.1.0", + "version": "5.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "upgrade_client_lib", - "version": "5.1.0", + "version": "5.1.1", "license": "ISC", "dependencies": { "axios": "^1.4.0", diff --git a/clientlibs/js/package.json b/clientlibs/js/package.json index 4c4a11243e..3cd0d677c4 100644 --- a/clientlibs/js/package.json +++ b/clientlibs/js/package.json @@ -1,6 +1,6 @@ { "name": "upgrade_client_lib", - "version": "5.1.0", + "version": "5.1.1", "description": "Client library to communicate with the Upgrade server", "files": [ "dist/*" diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 0a86587856..ca7fd7e1a7 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "ab-testing", - "version": "5.1.0", + "version": "5.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ab-testing", - "version": "5.1.0", + "version": "5.1.1", "license": "MIT", "dependencies": { "@angular/animations": "^17.1.2", diff --git a/frontend/package.json b/frontend/package.json index 2bc844ee18..27a2fcbaba 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "ab-testing", - "version": "5.1.0", + "version": "5.1.1", "license": "MIT", "scripts": { "ng": "ng", diff --git a/types/package-lock.json b/types/package-lock.json index 20e2c7aa4d..ba92e534fd 100644 --- a/types/package-lock.json +++ b/types/package-lock.json @@ -1,12 +1,12 @@ { "name": "upgrade_types", - "version": "4.3.0", + "version": "5.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "upgrade_types", - "version": "4.3.0", + "version": "5.1.1", "license": "ISC", "devDependencies": { "eslint": "^8.27.0", diff --git a/types/package.json b/types/package.json index 12d9180555..784fe87e57 100644 --- a/types/package.json +++ b/types/package.json @@ -1,6 +1,6 @@ { "name": "upgrade_types", - "version": "5.1.0", + "version": "5.1.1", "description": "", "main": "src/index.ts", "types": "src/index.ts",