Merge pull request #84 from navi-medici/clickstream-customisation

Clickstream customisation
This commit is contained in:
chandresh pancholi
2023-11-30 15:27:20 +05:30
committed by GitHub
18 changed files with 50 additions and 37 deletions

View File

@@ -1,5 +1,5 @@
FROM 193044292705.dkr.ecr.ap-south-1.amazonaws.com/common/maven:3.8.3-openjdk-17-slim as builder
ARG ARTIFACT_VERSION=2.0.9-RELEASE
ARG ARTIFACT_VERSION=3.0.0-RELEASE
RUN mkdir -p /build
WORKDIR /build
COPY . /build
@@ -7,7 +7,7 @@ RUN mvn clean install
RUN mvn clean verify -DskipTests -Dartifact.version=${ARTIFACT_VERSION}
FROM 193044292705.dkr.ecr.ap-south-1.amazonaws.com/common/openjdk:17-slim-bullseye
ARG ARTIFACT_VERSION=2.0.9-RELEASE
ARG ARTIFACT_VERSION=3.0.0-RELEASE
RUN mkdir -p /usr/local
RUN apt-get update -y && apt-get -y install fontconfig libpng-dev
WORKDIR /usr/local/

View File

@@ -1,5 +1,5 @@
FROM 193044292705.dkr.ecr.ap-south-1.amazonaws.com/common/maven:3.8.3-openjdk-17-slim as builder
ARG ARTIFACT_VERSION=2.0.9-RELEASE
ARG ARTIFACT_VERSION=3.0.0-RELEASE
RUN mkdir -p /build
WORKDIR /build
COPY . /build
@@ -7,7 +7,7 @@ RUN mvn clean install -DskipTests
RUN mvn clean verify -DskipTests -Dartifact.version=${ARTIFACT_VERSION}
FROM 193044292705.dkr.ecr.ap-south-1.amazonaws.com/common/openjdk:17-slim-bullseye
ARG ARTIFACT_VERSION=2.0.9-RELEASE
ARG ARTIFACT_VERSION=3.0.0-RELEASE
RUN mkdir -p /usr/local
RUN apt-get update -y && apt-get -y install fontconfig libpng-dev
WORKDIR /usr/local/

View File

@@ -4,11 +4,11 @@
<parent>
<artifactId>litmus</artifactId>
<groupId>com.navi.medici</groupId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</parent>
<artifactId>litmus-cache</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
<packaging>jar</packaging>
<name>litmus-cache</name>

View File

@@ -5,11 +5,11 @@
<parent>
<artifactId>litmus</artifactId>
<groupId>com.navi.medici</groupId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</parent>
<artifactId>litmus-client</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
<packaging>jar</packaging>
<name>litmus-client</name>
@@ -43,7 +43,7 @@
<dependency>
<groupId>com.navi.medici</groupId>
<artifactId>litmus-model</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</dependency>
<dependency>

View File

@@ -27,6 +27,7 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.BiFunction;
import lombok.extern.log4j.Log4j2;
@@ -167,7 +168,7 @@ public class DefaultLitmus implements Litmus {
.register(this.config.getMeterRegistry())
.increment();
if (config.isEnableClickStream()) {
if (config.isEnableClickStream() && Objects.requireNonNull(litmusExperiment).isEnableClickStream() ) {
this.eventDispatcher.publish(context, litmusExperiment, enabled, null);
}

View File

@@ -1 +1 @@
litmus.client.version=2.0.9-RELEASE
litmus.client.version=3.0.0-RELEASE

View File

@@ -5,11 +5,11 @@
<parent>
<artifactId>litmus</artifactId>
<groupId>com.navi.medici</groupId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</parent>
<artifactId>litmus-core</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
<packaging>jar</packaging>
<name>litmus-core</name>
@@ -31,19 +31,19 @@
<dependency>
<groupId>com.navi.medici</groupId>
<artifactId>litmus-model</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</dependency>
<dependency>
<groupId>com.navi.medici</groupId>
<artifactId>litmus-db</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</dependency>
<dependency>
<groupId>com.navi.medici</groupId>
<artifactId>litmus-util</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</dependency>
<dependency>
@@ -61,13 +61,13 @@
<dependency>
<groupId>com.navi.medici</groupId>
<artifactId>litmus-cache</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</dependency>
<dependency>
<groupId>com.navi.medici</groupId>
<artifactId>litmus-util</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</dependency>
<dependency>

View File

@@ -193,6 +193,7 @@ public class ExperimentServiceImpl implements ExperimentService {
.vertical(litmusExperimentRequest.getVertical())
.startTime(litmusExperimentRequest.getStartTime())
.endTime(litmusExperimentRequest.getEndTime())
.enableClickstream(litmusExperimentRequest.isEnableClickStream())
.build();

View File

@@ -4,11 +4,11 @@
<parent>
<artifactId>litmus</artifactId>
<groupId>com.navi.medici</groupId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</parent>
<artifactId>litmus-db</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
<packaging>jar</packaging>
<name>litmus-db</name>
@@ -31,7 +31,7 @@
<dependency>
<groupId>com.navi.medici</groupId>
<artifactId>litmus-model</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</dependency>
<dependency>
<groupId>com.vladmihalcea</groupId>

View File

@@ -66,6 +66,9 @@ public class ExperimentEntity extends BaseEntity {
@Column(name = "vertical")
String vertical;
@Column(name = "enable_click_stream")
boolean enableClickstream;
String createdBy;
String updatedBy;

View File

@@ -4,11 +4,11 @@
<parent>
<artifactId>litmus</artifactId>
<groupId>com.navi.medici</groupId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</parent>
<artifactId>litmus-liquibase</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
<packaging>jar</packaging>
<name>litmus-liquibase</name>

View File

@@ -0,0 +1,5 @@
--liquibase formatted sql
--changeset author:chandresh id:202311301506
ALTER TABLE experiments
ADD COLUMN enable_click_stream VARCHAR;

View File

@@ -4,11 +4,11 @@
<parent>
<artifactId>litmus</artifactId>
<groupId>com.navi.medici</groupId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</parent>
<artifactId>litmus-mock</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
<packaging>jar</packaging>
<name>litmus-mock</name>
@@ -16,13 +16,13 @@
<dependency>
<groupId>com.navi.medici</groupId>
<artifactId>litmus-model</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</dependency>
<dependency>
<groupId>com.navi.medici</groupId>
<artifactId>litmus-client</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</dependency>
<dependency>

View File

@@ -5,11 +5,11 @@
<parent>
<artifactId>litmus</artifactId>
<groupId>com.navi.medici</groupId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</parent>
<artifactId>litmus-model</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
<packaging>jar</packaging>
<name>litmus-model</name>

View File

@@ -56,6 +56,9 @@ public class LitmusExperiment {
@JsonProperty("vertical")
String vertical;
@JsonProperty("enable_click_stream")
boolean enableClickStream = true;
public boolean isEnabled() {
return enabled;
}

View File

@@ -4,11 +4,11 @@
<parent>
<artifactId>litmus</artifactId>
<groupId>com.navi.medici</groupId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</parent>
<artifactId>litmus-proxy</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
<packaging>jar</packaging>
<name>litmus-proxy</name>
@@ -17,19 +17,19 @@
<dependency>
<groupId>com.navi.medici</groupId>
<artifactId>litmus-model</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</dependency>
<dependency>
<groupId>com.navi.medici</groupId>
<artifactId>litmus-client</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</dependency>
<dependency>
<groupId>com.navi.medici</groupId>
<artifactId>litmus-util</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</dependency>
<dependency>

View File

@@ -5,11 +5,11 @@
<parent>
<artifactId>litmus</artifactId>
<groupId>com.navi.medici</groupId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
</parent>
<artifactId>litmus-util</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
<name>litmus-util</name>

View File

@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.navi.medici</groupId>
<artifactId>litmus</artifactId>
<version>2.0.9-RELEASE</version>
<version>3.0.0-RELEASE</version>
<packaging>pom</packaging>
<name>litmus</name>