Skip to content

Commit

Permalink
Merge down release hotfixes 5.0 into 5.1 (#1470)
Browse files Browse the repository at this point in the history
* cherry-pick ea63855 (#1159)

Co-authored-by: pratik <[email protected]>

* Hotfix/enrollment complete fix (#1161)

* cherry-pick ea63855

* bump version after enrollment complete  hotfix

---------

Co-authored-by: pratik <[email protected]>

* Fix/version root only (#1163)

* revert, change version back to major-minor on root only

* add backend

* Fix/version root only (#1164)

* revert, change version back to major-minor on root only

* add backend

* commit the backend package.json

* no assignedCondition null in java lib (#1441)

* fix missing imports

* version bump 5.1.10

---------

Co-authored-by: pratik <[email protected]>
  • Loading branch information
danoswaltCL and ppratikcr7 authored Apr 23, 2024
1 parent 484f0c6 commit e55015c
Show file tree
Hide file tree
Showing 18 changed files with 45 additions and 29 deletions.
4 changes: 2 additions & 2 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ab_testing_backend",
"version": "5.1.9",
"version": "5.1.10",
"description": "Backend for A/B Testing Project",
"scripts": {
"install:all": "npm ci && cd packages/Scheduler && npm ci && cd ../Upgrade && npm ci",
Expand Down
4 changes: 2 additions & 2 deletions backend/packages/Scheduler/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/packages/Scheduler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ppl-upgrade-serverless",
"version": "5.1.9",
"version": "5.1.10",
"description": "Serverless webpack example using Typescript",
"main": "handler.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions backend/packages/Upgrade/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/packages/Upgrade/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ab_testing_backend",
"version": "5.1.9",
"version": "5.1.10",
"description": "Backend for A/B Testing Project",
"main": "index.js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,11 @@ export class ExperimentRepository extends Repository<Experiment> {

public async getValidExperiments(context: string): Promise<Experiment[]> {
const whereExperimentsClause =
'(experiment.state = :enrolling OR experiment.state = :enrollmentComplete) AND :context ILIKE ANY (ARRAY[experiment.context])';
'(experiment.state = :enrolling OR experiment.state = :enrollmentComplete) AND NOT (experiment.state = :enrollmentComplete AND experiment.postExperimentRule = :assign AND experiment.revertTo IS NULL) AND :context ILIKE ANY (ARRAY[experiment.context])';
const whereClauseParams = {
enrolling: 'enrolling',
enrollmentComplete: 'enrollmentComplete',
assign: 'assign',
context,
};
const experimentConditionLevelPayloadQuery = this.createQueryBuilder('experiment')
Expand Down Expand Up @@ -210,11 +211,12 @@ export class ExperimentRepository extends Repository<Experiment> {

public async getValidExperimentsWithPreview(context: string): Promise<Experiment[]> {
const whereExperimentsClause =
'(experiment.state = :enrolling OR experiment.state = :enrollmentComplete OR experiment.state = :preview) AND :context ILIKE ANY (ARRAY[experiment.context])';
'(experiment.state = :enrolling OR experiment.state = :enrollmentComplete OR experiment.state = :preview) AND NOT (experiment.state = :enrollmentComplete AND experiment.postExperimentRule = :assign AND experiment.revertTo IS NULL) AND :context ILIKE ANY (ARRAY[experiment.context])';
const whereClauseParams = {
enrolling: 'enrolling',
enrollmentComplete: 'enrollmentComplete',
preview: 'preview',
assign: 'assign',
context,
};
const experimentConditionLevelPayloadQuery = this.createQueryBuilder('experiment')
Expand Down
2 changes: 1 addition & 1 deletion clientlibs/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
at the same time that happen to rev to the same new version will be caught
by a merge conflict. -->

<version>5.1.9</version>
<version>5.1.10</version>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ public void onSuccess(@NonNull Assignment expResult){

System.out.println("code");
System.out.println(code);
MarkExperimentRequestData markData = new MarkExperimentRequestData(site, target);
experimentClient.markDecisionPoint(MarkedDecisionPointStatus.CONDITION_APPLIED, markData, "", new Date().toString(), new ResponseCallback<MarkDecisionPoint>(){
MarkExperimentRequestData data = new MarkExperimentRequestData(site, target, null);
System.out.println(data.getAssignedCondition());

experimentClient.markDecisionPoint(MarkedDecisionPointStatus.CONDITION_APPLIED, data, new ResponseCallback<MarkDecisionPoint>(){
@Override
public void onSuccess(@NonNull MarkDecisionPoint markResult){
result.complete("marked " + code + ": " + markResult.toString());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
package org.upgradeplatform.requestbeans;

import java.util.Map;

import org.upgradeplatform.responsebeans.Condition;
import org.upgradeplatform.responsebeans.Factor;

public class MarkExperimentRequestData {

private String site;
private String target;
private Condition assignedCondition;
private Condition assignedCondition = new Condition();
private Map<String, Factor> assignedFactor;

public MarkExperimentRequestData() {
super();
Expand All @@ -22,7 +26,15 @@ public MarkExperimentRequestData(String site, String target, Condition assignedC
super();
this.site = site;
this.target = target;
this.assignedCondition = assignedCondition;
this.assignedCondition = assignedCondition != null ? assignedCondition : new Condition();
}

public MarkExperimentRequestData(String site, String target, Condition assignedCondition, Map<String, Factor> assignedFactor){
super();
this.site = site;
this.target = target;
this.assignedCondition = assignedCondition != null ? assignedCondition : new Condition();
this.assignedFactor = assignedFactor;
}

public String getSite() {
Expand All @@ -46,7 +58,7 @@ public Condition getAssignedCondition() {
}

public void setAssignedCondition(Condition assignedCondition) {
this.assignedCondition = assignedCondition;
this.assignedCondition = assignedCondition != null ? assignedCondition : new Condition();
}

}
4 changes: 2 additions & 2 deletions clientlibs/js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion clientlibs/js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "upgrade_client_lib",
"version": "5.1.9",
"version": "5.1.10",
"description": "Client library to communicate with the Upgrade server",
"files": [
"dist/*"
Expand Down
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ab-testing",
"version": "5.1.9",
"version": "5.1.10",
"license": "MIT",
"scripts": {
"ng": "ng",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "UpGrade",
"version": "5.1.9",
"version": "5.1.10",
"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": {
Expand Down
4 changes: 2 additions & 2 deletions types/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "upgrade_types",
"version": "5.1.9",
"version": "5.1.10",
"description": "",
"main": "src/index.ts",
"types": "src/index.ts",
Expand Down

0 comments on commit e55015c

Please sign in to comment.