Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…/UpGrade into hotfix/post-exp-rule-default-enrollmentComplete-latency-issue909-new
  • Loading branch information
ppratikcr7 committed Nov 16, 2023
2 parents ab42aed + 2633f79 commit a379f52
Show file tree
Hide file tree
Showing 17 changed files with 444 additions and 17 deletions.
419 changes: 419 additions & 0 deletions backend/locust/load_test_omnibus.py

Large diffs are not rendered by default.

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.0.11",
"version": "5.0.12",
"description": "Backend for A/B Testing Project",
"scripts": {
"install:all": "npm ci && cd packages/Scheduler && npm ci && cd ../Upgrade && npm ci --legacy-peer-deps",
Expand Down
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.0.11",
"version": "5.0.12",
"description": "Serverless webpack example using Typescript",
"main": "handler.js",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions backend/packages/Upgrade/.env.docker.local
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ APP_ROUTE_PREFIX=/api
APP_BANNER=true
APP_DEMO=false
CACHING_ENABLED=true
CACHING_TTL=10

#
# LOGGING
Expand Down
3 changes: 2 additions & 1 deletion backend/packages/Upgrade/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ APP_PORT=3030
APP_ROUTE_PREFIX=/api
APP_BANNER=true
APP_DEMO=false

CACHING_ENABLED=true
CACHING_TTL=10
#
# LOGGING
#
Expand Down
2 changes: 2 additions & 0 deletions backend/packages/Upgrade/.env.test
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ APP_PORT=3030
APP_ROUTE_PREFIX=/api
APP_BANNER=true
APP_DEMO=false
CACHING_ENABLED=true
CACHING_TTL=10

#
# LOGGING
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.0.11",
"version": "5.0.12",
"description": "Backend for A/B Testing Project",
"main": "index.js",
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion backend/packages/Upgrade/src/api/services/CacheService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { CACHE_PREFIX } from 'upgrade_types';
@Service()
export class CacheService {
private memoryCache: cacheManager.Cache;
private ttl = env.caching.ttl || 900;

constructor() {
// read from the environment variable for initializing caching
let store: 'memory' | 'none';
Expand All @@ -14,7 +16,8 @@ export class CacheService {
} else {
store = 'none';
}
this.memoryCache = cacheManager.caching({ store, max: 100, ttl: 900 });

this.memoryCache = cacheManager.caching({ store, max: 100, ttl: this.ttl });
}

public setCache<T>(id: string, value: T): Promise<T> {
Expand Down
1 change: 1 addition & 0 deletions backend/packages/Upgrade/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export const env = {
tokenSecretKey: getOsEnv('TOKEN_SECRET_KEY'),
caching: {
enabled: toBool(getOsEnvOptional('CACHING_ENABLED')),
ttl: toNumber(getOsEnvOptional('CACHING_TTL')),
},
clientApi: {
secret: getOsEnv('CLIENT_API_SECRET'),
Expand Down
4 changes: 2 additions & 2 deletions clientlibs/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
at the same time that happen to rev to the same new version will be caught
by a merge conflict. -->

<!-- 5.0.10 -> 5.0.11: 1080 temporarily hide error tab -->
<!-- 5.0.11 -> 5.0.12: Hotfix caching getValidExperiments and query performance improvements -->

<version>5.0.11</version>
<version>5.0.12</version>
<build>
<plugins>
<plugin>
Expand Down
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.0.11",
"version": "5.0.12",
"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.0.11",
"version": "5.0.12",
"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.0.7",
"version": "5.0.12",
"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
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.0.11",
"version": "5.0.12",
"description": "",
"main": "src/index.ts",
"types": "src/index.ts",
Expand Down

0 comments on commit a379f52

Please sign in to comment.