From 6ffa00cfe49e353e7df60a15592603da333381e3 Mon Sep 17 00:00:00 2001 From: --global <--global> Date: Mon, 14 Feb 2022 16:54:53 +0100 Subject: [PATCH 01/19] chore(http): check for custom endpoint for caching Signed-off-by: --global <--global> --- .../openreplay/charts/assets/templates/deployment.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml index 1af5164ca..1c8216468 100644 --- a/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml @@ -59,7 +59,11 @@ spec: # Ref: https://stackoverflow.com/questions/53634583/go-template-split-string-by-delimiter # We need https://bucketname.s3endpoint - name: ASSETS_ORIGIN + {{- if eq .Values.global.s3.endpoint "http://minio.db.svc.cluster.local:9000" }} + value: 'https://{{ .Values.global.domainName }}/{{.Values.global.s3.assetsBucket}}' + {{- else }} value: {{ (split "://" .Values.global.s3.endpoint)._0 }}://{{.Values.global.s3.assetsBucket}}.{{ (split "://" .Values.global.s3.endpoint)._1 }} + {{- end }} {{- range $key, $val := .Values.env }} - name: {{ $key }} value: '{{ $val }}' From c1f0e79c8dd1dc55758df45e3e7cc51dfe106f94 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Mon, 14 Feb 2022 17:51:44 +0100 Subject: [PATCH 02/19] fix(ui) - typo --- .../app/components/shared/SaveSearchModal/SaveSearchModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/components/shared/SaveSearchModal/SaveSearchModal.tsx b/frontend/app/components/shared/SaveSearchModal/SaveSearchModal.tsx index b579652e9..1ba6b3d56 100644 --- a/frontend/app/components/shared/SaveSearchModal/SaveSearchModal.tsx +++ b/frontend/app/components/shared/SaveSearchModal/SaveSearchModal.tsx @@ -39,7 +39,7 @@ function SaveSearchModal(props: Props) { if (await confirm({ header: 'Confirm', confirmButton: 'Yes, Delete', - confirmation: `Are you sure you want to permanently delete this Saved serch?`, + confirmation: `Are you sure you want to permanently delete this Saved search?`, })) { props.remove(savedSearch.searchId).then(() => { closeHandler(); From e705c8566c3a430fab3a46291f3566eb10a65147 Mon Sep 17 00:00:00 2001 From: --global <--global> Date: Tue, 15 Feb 2022 05:57:55 +0100 Subject: [PATCH 03/19] fix(migration): template file variable values --- scripts/helmcharts/vars_template.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/helmcharts/vars_template.yaml b/scripts/helmcharts/vars_template.yaml index 2230e0a75..1e008250d 100644 --- a/scripts/helmcharts/vars_template.yaml +++ b/scripts/helmcharts/vars_template.yaml @@ -48,11 +48,11 @@ global: kafka: *kafka redis: *redis s3: - region: "us-east-1" - endpoint: "http://minio.db.svc.cluster.local:9000" - assetsBucket: "sessions-assets" - recordingsBucket: "mobs" - sourcemapsBucket: "sourcemaps" + region: "{{ aws_region }}" + endpoint: "{{ s3_endpoint }}" + assetsBucket: "{{ assets_bucket }}" + recordingsBucket: "{{ recordings_bucket }}" + sourcemapsBucket: "{{ sourcemaps_bucket }}" # if you're using one node installation, where # you're using local s3, make sure these variables # are same as minio.global.minio.accesskey and secretKey From 5ecf2d9b0363c4032036028865a08809a7f696d9 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Tue, 15 Feb 2022 06:30:54 +0100 Subject: [PATCH 04/19] fix(install): minio download path Signed-off-by: rjshrjndrn --- scripts/helmcharts/openreplay/files/minio.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/helmcharts/openreplay/files/minio.sh b/scripts/helmcharts/openreplay/files/minio.sh index dc8fbdbb0..1cc3e0460 100644 --- a/scripts/helmcharts/openreplay/files/minio.sh +++ b/scripts/helmcharts/openreplay/files/minio.sh @@ -35,7 +35,7 @@ mc policy set download minio/frontend mc policy set download minio/sessions-assets mc policy set download minio/static -curl -L https://github.com/openreplay/openreplay/releases/download/${CHART_APP_VERSION}/frontend.tar.gz -O +curl -L https://github.com/openreplay/openreplay/releases/download/v${CHART_APP_VERSION}/frontend.tar.gz -O tar -xf frontend.tar.gz mc cp --recursive frontend/ minio/frontend/ } From f2cfd37a37264c91def748ac8183be62d6cc86f5 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Tue, 15 Feb 2022 18:19:54 +0100 Subject: [PATCH 05/19] chore(nginx): precedence x-forward-for ip for geo location tagging Signed-off-by: rjshrjndrn --- .../nginx-ingress/templates/configMap.yaml | 12 +++++++---- .../charts/nginx-ingress/values.yaml | 20 +++++++++++++++++++ 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/scripts/helmcharts/openreplay/charts/nginx-ingress/templates/configMap.yaml b/scripts/helmcharts/openreplay/charts/nginx-ingress/templates/configMap.yaml index baba2f5e0..f5b7699cd 100644 --- a/scripts/helmcharts/openreplay/charts/nginx-ingress/templates/configMap.yaml +++ b/scripts/helmcharts/openreplay/charts/nginx-ingress/templates/configMap.yaml @@ -13,7 +13,7 @@ data: } location ~ ^/(mobs|sessions-assets|frontend|static|sourcemaps|ios-images)/ { proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-For $origin_forwarded_ip; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; @@ -38,7 +38,7 @@ data: proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-For $origin_forwarded_ip; proxy_set_header X-Forwarded-Host $real_ip; proxy_set_header X-Real-IP $real_ip; proxy_set_header Host $host; @@ -71,7 +71,7 @@ data: proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-For $origin_forwarded_ip; proxy_pass http://utilities-openreplay.app.svc.cluster.local:9000; } location /ws-assist/ { @@ -80,7 +80,7 @@ data: proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-For $origin_forwarded_ip; proxy_set_header X-Real-IP $real_ip; proxy_pass http://utilities-openreplay.app.svc.cluster.local:9001; } @@ -151,6 +151,10 @@ data: default $http_x_forwarded_proto; '' $scheme; } + map $http_x_forwarded_for $origin_forwarded_ip { + default $http_x_forwarded_for; + '' $remote_addr; + } # Default server for helath check server { listen 80 default_server; diff --git a/scripts/helmcharts/openreplay/charts/nginx-ingress/values.yaml b/scripts/helmcharts/openreplay/charts/nginx-ingress/values.yaml index 821ad9e3c..43d6d3eae 100644 --- a/scripts/helmcharts/openreplay/charts/nginx-ingress/values.yaml +++ b/scripts/helmcharts/openreplay/charts/nginx-ingress/values.yaml @@ -84,3 +84,23 @@ nodeSelector: {} tolerations: [] affinity: {} + +healthProbes: + livenessProbe: + failureThreshold: 3 + httpGet: + path: /healthz + port: http + scheme: HTTP + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 + readinessProbe: + failureThreshold: 3 + httpGet: + path: /healthz + port: http + scheme: HTTP + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 5 From cb41d9134d6add1a7b7e028cb29218c85e9091f4 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Wed, 16 Feb 2022 10:08:07 +0100 Subject: [PATCH 06/19] chore(kafka): change retention to 4 days Signed-off-by: rjshrjndrn --- scripts/helmcharts/openreplay/files/kafka.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/helmcharts/openreplay/files/kafka.sh b/scripts/helmcharts/openreplay/files/kafka.sh index 1c811eb5d..61c039601 100644 --- a/scripts/helmcharts/openreplay/files/kafka.sh +++ b/scripts/helmcharts/openreplay/files/kafka.sh @@ -22,7 +22,7 @@ function init() { echo "Creating topic: $topic" # TODO: Have to check an idempotent way of creating topics. kafka-topics.sh --create --bootstrap-server ${KAFKA_HOST}:${KAFKA_PORT} --replication-factor 2 --partitions 16 --topic ${topic} --command-config /tmp/config.txt || true - kafka-configs.sh --bootstrap-server ${KAFKA_HOST}:${KAFKA_PORT} --entity-type topics --alter --add-config retention.ms=3456000000 --entity-name=${topic} --command-config /tmp/config.txt || true + kafka-configs.sh --bootstrap-server ${KAFKA_HOST}:${KAFKA_PORT} --entity-type topics --alter --add-config retention.ms=345600000 --entity-name=${topic} --command-config /tmp/config.txt || true done } From 6a9035e26047319d4ba7f227119b267f54373bd6 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Thu, 17 Feb 2022 11:58:26 +0100 Subject: [PATCH 07/19] chore(helm): commit We need to check what is the object store endpoint. There can be 4 options 1. Using minio inside kube clster 2. Using minio managed external cluster, like aws minio offering 3. Using GCP or other object stores compatible with s3 apis 4. Using AWS itself. AWS uses bucketname.endpoint/object while others use endpoint/bucketname/object Signed-off-by: rjshrjndrn --- .../charts/assets/templates/deployment.yaml | 18 +++++++++++++++--- .../charts/http/templates/deployment.yaml | 16 +++++++++++++++- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml index 1c8216468..d34883b5a 100644 --- a/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/assets/templates/deployment.yaml @@ -56,13 +56,25 @@ spec: value: '{{ .Values.global.kafka.kafkaHost }}:{{ .Values.global.kafka.kafkaPort }}' - name: KAFKA_USE_SSL value: '{{ .Values.global.kafka.kafkaUseSsl }}' - # Ref: https://stackoverflow.com/questions/53634583/go-template-split-string-by-delimiter - # We need https://bucketname.s3endpoint + # We need to check what is the object store endpoint. + # There can be 4 options + # 1. Using minio inside kube clster + # 2. Using minio managed external cluster, like aws minio offering + # 3. Using GCP or other object stores compatible with s3 apis + # 4. Using AWS itself. + # AWS uses bucketname.endpoint/object while others use endpoint/bucketname/object - name: ASSETS_ORIGIN {{- if eq .Values.global.s3.endpoint "http://minio.db.svc.cluster.local:9000" }} + # Local minio Installation value: 'https://{{ .Values.global.domainName }}/{{.Values.global.s3.assetsBucket}}' - {{- else }} + {{- else if contains "amazonaws.com" .Values.global.s3.endpoint }} + # AWS S3 + # Ref: https://stackoverflow.com/questions/53634583/go-template-split-string-by-delimiter + # We need https://bucketname.s3endpoint value: {{ (split "://" .Values.global.s3.endpoint)._0 }}://{{.Values.global.s3.assetsBucket}}.{{ (split "://" .Values.global.s3.endpoint)._1 }} + {{- else }} + # S3 compatible storage + value: '{{ .Values.global.s3.endpoint }}/{{.Values.global.s3.assetsBucket}}' {{- end }} {{- range $key, $val := .Values.env }} - name: {{ $key }} diff --git a/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml index 875cc3630..0c4399518 100644 --- a/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/http/templates/deployment.yaml @@ -54,11 +54,25 @@ spec: value: '{{ .Values.global.kafka.kafkaUseSsl }}' - name: POSTGRES_STRING value: 'postgres://{{ .Values.global.postgresql.postgresqlUser }}:{{ .Values.global.postgresql.postgresqlPassword }}@{{ .Values.global.postgresql.postgresqlHost }}:{{ .Values.global.postgresql.postgresqlPort }}/{{ .Values.global.postgresql.postgresqlDatabase }}' + # We need to check what is the object store endpoint. + # There can be 4 options + # 1. Using minio inside kube clster + # 2. Using minio managed external cluster, like aws minio offering + # 3. Using GCP or other object stores compatible with s3 apis + # 4. Using AWS itself. + # AWS uses bucketname.endpoint/object while others use endpoint/bucketname/object - name: ASSETS_ORIGIN {{- if eq .Values.global.s3.endpoint "http://minio.db.svc.cluster.local:9000" }} + # Local minio Installation value: 'https://{{ .Values.global.domainName }}/{{.Values.global.s3.assetsBucket}}' - {{- else }} + {{- else if contains "amazonaws.com" .Values.global.s3.endpoint }} + # AWS S3 + # Ref: https://stackoverflow.com/questions/53634583/go-template-split-string-by-delimiter + # We need https://bucketname.s3endpoint value: {{ (split "://" .Values.global.s3.endpoint)._0 }}://{{.Values.global.s3.assetsBucket}}.{{ (split "://" .Values.global.s3.endpoint)._1 }} + {{- else }} + # S3 compatible storage + value: '{{ .Values.global.s3.endpoint }}/{{.Values.global.s3.assetsBucket}}' {{- end }} {{- range $key, $val := .Values.env }} - name: {{ $key }} From 3466ba9750e55767eb2e22a6a31b99da64836314 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Tue, 22 Feb 2022 17:43:55 +0100 Subject: [PATCH 08/19] feat(utilities): WS changed maxHttpBufferSize --- utilities/servers/websocket.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/servers/websocket.js b/utilities/servers/websocket.js index ab6a2c4d5..dfce5b4d7 100644 --- a/utilities/servers/websocket.js +++ b/utilities/servers/websocket.js @@ -161,7 +161,7 @@ module.exports = { wsRouter, start: (server) => { io = _io(server, { - maxHttpBufferSize: 1e6, + maxHttpBufferSize: 5e6, cors: { origin: "*", methods: ["GET", "POST", "PUT"] From da63085c94ebe2a4d79c1c0e50b9dbf39f33c263 Mon Sep 17 00:00:00 2001 From: estradino Date: Thu, 24 Feb 2022 18:10:20 +0000 Subject: [PATCH 09/19] chore(release): change version --- scripts/helmcharts/init.sh | 2 +- scripts/helmcharts/openreplay/Chart.yaml | 2 +- scripts/helmcharts/openreplay/charts/alerts/Chart.yaml | 2 +- scripts/helmcharts/openreplay/charts/assets/Chart.yaml | 2 +- scripts/helmcharts/openreplay/charts/chalice/Chart.yaml | 2 +- scripts/helmcharts/openreplay/charts/db/Chart.yaml | 2 +- scripts/helmcharts/openreplay/charts/ender/Chart.yaml | 2 +- scripts/helmcharts/openreplay/charts/http/Chart.yaml | 2 +- scripts/helmcharts/openreplay/charts/integrations/Chart.yaml | 2 +- scripts/helmcharts/openreplay/charts/nginx-ingress/Chart.yaml | 2 +- scripts/helmcharts/openreplay/charts/sink/Chart.yaml | 2 +- scripts/helmcharts/openreplay/charts/storage/Chart.yaml | 2 +- scripts/helmcharts/openreplay/charts/utilities/Chart.yaml | 2 +- scripts/helmcharts/vars.yaml | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/scripts/helmcharts/init.sh b/scripts/helmcharts/init.sh index 428ed82eb..2df3b8450 100644 --- a/scripts/helmcharts/init.sh +++ b/scripts/helmcharts/init.sh @@ -15,7 +15,7 @@ fatal() exit 1 } -version="v1.5.1" +version="v1.5.2" usr=`whoami` # Installing k3s diff --git a/scripts/helmcharts/openreplay/Chart.yaml b/scripts/helmcharts/openreplay/Chart.yaml index 8057ec335..e621e543d 100644 --- a/scripts/helmcharts/openreplay/Chart.yaml +++ b/scripts/helmcharts/openreplay/Chart.yaml @@ -22,4 +22,4 @@ version: 0.1.0 # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. # Ref: https://github.com/helm/helm/issues/7858#issuecomment-608114589 -AppVersion: "v1.5.1" +AppVersion: "v1.5.2" diff --git a/scripts/helmcharts/openreplay/charts/alerts/Chart.yaml b/scripts/helmcharts/openreplay/charts/alerts/Chart.yaml index 885ad5503..0bfe8b4bc 100644 --- a/scripts/helmcharts/openreplay/charts/alerts/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/alerts/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.5.1" +AppVersion: "v1.5.2" diff --git a/scripts/helmcharts/openreplay/charts/assets/Chart.yaml b/scripts/helmcharts/openreplay/charts/assets/Chart.yaml index 75657b1df..9b8c32623 100644 --- a/scripts/helmcharts/openreplay/charts/assets/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/assets/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.5.1" +AppVersion: "v1.5.2" diff --git a/scripts/helmcharts/openreplay/charts/chalice/Chart.yaml b/scripts/helmcharts/openreplay/charts/chalice/Chart.yaml index 8de5927eb..1d0441f7e 100644 --- a/scripts/helmcharts/openreplay/charts/chalice/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/chalice/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.5.1" +AppVersion: "v1.5.2" diff --git a/scripts/helmcharts/openreplay/charts/db/Chart.yaml b/scripts/helmcharts/openreplay/charts/db/Chart.yaml index b0cdbebd4..0aa5f39e3 100644 --- a/scripts/helmcharts/openreplay/charts/db/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/db/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.5.1" +AppVersion: "v1.5.2" diff --git a/scripts/helmcharts/openreplay/charts/ender/Chart.yaml b/scripts/helmcharts/openreplay/charts/ender/Chart.yaml index ec411fad1..8a7ce610e 100644 --- a/scripts/helmcharts/openreplay/charts/ender/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/ender/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.5.1" +AppVersion: "v1.5.2" diff --git a/scripts/helmcharts/openreplay/charts/http/Chart.yaml b/scripts/helmcharts/openreplay/charts/http/Chart.yaml index 5b65ded45..5422d1f3d 100644 --- a/scripts/helmcharts/openreplay/charts/http/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/http/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.5.1" +AppVersion: "v1.5.2" diff --git a/scripts/helmcharts/openreplay/charts/integrations/Chart.yaml b/scripts/helmcharts/openreplay/charts/integrations/Chart.yaml index f98a99254..e8fc92887 100644 --- a/scripts/helmcharts/openreplay/charts/integrations/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/integrations/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.5.1" +AppVersion: "v1.5.2" diff --git a/scripts/helmcharts/openreplay/charts/nginx-ingress/Chart.yaml b/scripts/helmcharts/openreplay/charts/nginx-ingress/Chart.yaml index 75cf9a946..2c473b4b4 100644 --- a/scripts/helmcharts/openreplay/charts/nginx-ingress/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/nginx-ingress/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.5.1" +AppVersion: "v1.5.2" diff --git a/scripts/helmcharts/openreplay/charts/sink/Chart.yaml b/scripts/helmcharts/openreplay/charts/sink/Chart.yaml index 51c85b6f3..7ece0a5bf 100644 --- a/scripts/helmcharts/openreplay/charts/sink/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/sink/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.5.1" +AppVersion: "v1.5.2" diff --git a/scripts/helmcharts/openreplay/charts/storage/Chart.yaml b/scripts/helmcharts/openreplay/charts/storage/Chart.yaml index 5b535bc5a..9e1c06d8c 100644 --- a/scripts/helmcharts/openreplay/charts/storage/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/storage/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.5.1" +AppVersion: "v1.5.2" diff --git a/scripts/helmcharts/openreplay/charts/utilities/Chart.yaml b/scripts/helmcharts/openreplay/charts/utilities/Chart.yaml index 895405214..acc73d941 100644 --- a/scripts/helmcharts/openreplay/charts/utilities/Chart.yaml +++ b/scripts/helmcharts/openreplay/charts/utilities/Chart.yaml @@ -21,4 +21,4 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -AppVersion: "v1.5.1" +AppVersion: "v1.5.2" diff --git a/scripts/helmcharts/vars.yaml b/scripts/helmcharts/vars.yaml index e7f59ab13..ed0ab4c05 100644 --- a/scripts/helmcharts/vars.yaml +++ b/scripts/helmcharts/vars.yaml @@ -1,4 +1,4 @@ -fromVersion: "v1.5.1" +fromVersion: "v1.5.2" # Databases specific variables postgresql: &postgres # For generating passwords From 87438fff14417691d551a780f2438018b2751163 Mon Sep 17 00:00:00 2001 From: estradino Date: Thu, 24 Feb 2022 18:12:14 +0000 Subject: [PATCH 10/19] chore(release): change version --- frontend/env.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/env.js b/frontend/env.js index 1b1beb4bc..7d3ab7e6e 100644 --- a/frontend/env.js +++ b/frontend/env.js @@ -13,7 +13,7 @@ const oss = { ORIGIN: () => 'window.location.origin', API_EDP: () => 'window.location.origin + "/api"', ASSETS_HOST: () => 'window.location.origin + "/assets"', - VERSION: '1.5.1', + VERSION: '1.5.2', SOURCEMAP: true, MINIO_ENDPOINT: process.env.MINIO_ENDPOINT, MINIO_PORT: process.env.MINIO_PORT, From 47846e264171bbe4b8dc2e9607e149a105b49142 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Sun, 27 Feb 2022 17:17:05 +0100 Subject: [PATCH 11/19] fix(ui) - metadata in offline session --- .../Session_/EventsBlock/Metadata/Metadata.js | 16 +++++++++------- .../EventsBlock/Metadata/MetadataItem.js | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/frontend/app/components/Session_/EventsBlock/Metadata/Metadata.js b/frontend/app/components/Session_/EventsBlock/Metadata/Metadata.js index b0dca0956..0992c0f88 100644 --- a/frontend/app/components/Session_/EventsBlock/Metadata/Metadata.js +++ b/frontend/app/components/Session_/EventsBlock/Metadata/Metadata.js @@ -10,13 +10,15 @@ export default connect(state => ({ metadata: state.getIn([ 'sessions', 'current', 'metadata' ]), }))(function Metadata ({ metadata }) { const [ visible, setVisible ] = useState(false); - const toggle = useCallback(() => metadata.length > 0 && setVisible(v => !v), []); + const metaLenth = Object.keys(metadata).length; + const toggle = useCallback(() => metaLenth > 0 && setVisible(v => !v), []); + return ( <> ({ } on="click" - disabled={metadata.length > 0} + disabled={metaLenth > 0} size="tiny" inverted position="top center" /> { visible &&
- - { metadata.map((i) => { - const key = Object.keys(i)[0] - const value = i[key] + + { Object.keys(metadata).map((key) => { + // const key = Object.keys(i)[0] + const value = metadata[key] return }) } diff --git a/frontend/app/components/Session_/EventsBlock/Metadata/MetadataItem.js b/frontend/app/components/Session_/EventsBlock/Metadata/MetadataItem.js index 8abd1913c..76cf459b0 100644 --- a/frontend/app/components/Session_/EventsBlock/Metadata/MetadataItem.js +++ b/frontend/app/components/Session_/EventsBlock/Metadata/MetadataItem.js @@ -49,7 +49,7 @@ export default class extends React.PureComponent { content={ open && } onClose={ open ? this.switchOpen : () => null } /> -
+
{ item.key }
Date: Sun, 27 Feb 2022 18:03:03 +0100 Subject: [PATCH 12/19] fix(ui) - performance var check --- frontend/app/components/Session_/Performance/Performance.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/components/Session_/Performance/Performance.js b/frontend/app/components/Session_/Performance/Performance.js index b31d1ed85..78aea13ce 100644 --- a/frontend/app/components/Session_/Performance/Performance.js +++ b/frontend/app/components/Session_/Performance/Performance.js @@ -115,7 +115,7 @@ const HeapTooltip = ({ active, payload}) => { } const NodesCountTooltip = ({ active, payload} ) => { - if (!active || payload.length === 0) return null; + if (!active || !payload || payload.length === 0) return null; return (

From ffc2f78045c40403f73d9092dc051fa1fa3c19be Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Sun, 27 Feb 2022 19:53:36 +0100 Subject: [PATCH 13/19] fix(ui) - player live check --- frontend/app/components/Session/Session.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/app/components/Session/Session.js b/frontend/app/components/Session/Session.js index 0138e7e50..210a24bff 100644 --- a/frontend/app/components/Session/Session.js +++ b/frontend/app/components/Session/Session.js @@ -16,11 +16,11 @@ const SESSIONS_ROUTE = sessionsRoute(); function Session({ sessionId, loading, - hasErrors, + hasErrors, session, fetchSession, - fetchSlackList, - hasSessionsPath + fetchSlackList, + hasSessionsPath }) { usePageTitle("OpenReplay Session Player"); useEffect(() => { @@ -51,7 +51,7 @@ function Session({ { session.isIOS ? - : (session.live && !hasSessionsPath ? : ) + : } From d8e4f78235ac1bc6b96daeeafb2cb712283b451e Mon Sep 17 00:00:00 2001 From: Mehdi Osman Date: Sun, 27 Feb 2022 19:03:13 +0000 Subject: [PATCH 14/19] Increase ctx timeout to 30s --- backend/pkg/db/postgres/connector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/pkg/db/postgres/connector.go b/backend/pkg/db/postgres/connector.go index 9e4e82633..1eb29e04c 100644 --- a/backend/pkg/db/postgres/connector.go +++ b/backend/pkg/db/postgres/connector.go @@ -10,7 +10,7 @@ import ( ) func getTimeoutContext() context.Context { - ctx, _ := context.WithTimeout(context.Background(), time.Duration(time.Second*10)) + ctx, _ := context.WithTimeout(context.Background(), time.Duration(time.Second*30)) return ctx } From b74e9844b1ec3ec59f719c8d0e84c7ebbfccda9c Mon Sep 17 00:00:00 2001 From: ShiKhu Date: Sun, 27 Feb 2022 22:14:47 +0100 Subject: [PATCH 15/19] feat(frontend-assist): 30s for reconnection --- .../app/player/MessageDistributor/managers/AssistManager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/player/MessageDistributor/managers/AssistManager.ts b/frontend/app/player/MessageDistributor/managers/AssistManager.ts index 908add195..595cf3b3e 100644 --- a/frontend/app/player/MessageDistributor/managers/AssistManager.ts +++ b/frontend/app/player/MessageDistributor/managers/AssistManager.ts @@ -103,7 +103,7 @@ export default class AssistManager { if (document.hidden && getState().calling === CallingState.NoCall) { this.socket?.close() } - }, 15000) + }, 30000) } else { inactiveTimeout && clearTimeout(inactiveTimeout) this.socket?.open() From 985ab6117bce42a44bfcfa60192166ac0c8d0764 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Mon, 28 Feb 2022 14:58:20 +0100 Subject: [PATCH 16/19] feat(api): fixed update user-role casing --- ee/api/chalicelib/core/users.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ee/api/chalicelib/core/users.py b/ee/api/chalicelib/core/users.py index c8c1c7669..9ca77c1ea 100644 --- a/ee/api/chalicelib/core/users.py +++ b/ee/api/chalicelib/core/users.py @@ -156,7 +156,7 @@ def update(tenant_id, user_id, changes): (SELECT role_id FROM roles WHERE tenant_id = %(tenant_id)s AND name != 'Owner' LIMIT 1)))""") else: sub_query_users.append(f"{helper.key_to_snake_case(key)} = %({key})s") - + changes["role_id"] = changes.get("roleId", changes.get("role_id")) with pg_client.PostgresClient() as cur: if len(sub_query_users) > 0: cur.execute( From 01cfb41de10927acac5529d1dcb258da2a113a95 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Tue, 1 Mar 2022 14:18:35 +0100 Subject: [PATCH 17/19] feat(ui) - check for alphanumeric in version compare --- .../TrackerUpdateMessage.js | 21 ++++++++++++------- frontend/app/utils.js | 6 ++++++ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/frontend/app/components/shared/TrackerUpdateMessage/TrackerUpdateMessage.js b/frontend/app/components/shared/TrackerUpdateMessage/TrackerUpdateMessage.js index a5fe4411c..787751d79 100644 --- a/frontend/app/components/shared/TrackerUpdateMessage/TrackerUpdateMessage.js +++ b/frontend/app/components/shared/TrackerUpdateMessage/TrackerUpdateMessage.js @@ -1,18 +1,25 @@ -import React from 'react' +import React, { useEffect } from 'react' import { Icon } from 'UI' import { connect } from 'react-redux' import { withRouter } from 'react-router-dom'; import { onboarding as onboardingRoute } from 'App/routes' import { withSiteId } from 'App/routes'; +import { isGreaterOrEqualVersion } from 'App/utils' const TrackerUpdateMessage= (props) => { - // const { site } = props; - const { site, sites, match: { params: { siteId } } } = props; + const [needUpdate, setNeedUpdate] = React.useState(false) + const { sites, match: { params: { siteId } } } = props; const activeSite = sites.find(s => s.id == siteId); - const hasSessions = !!activeSite && !activeSite.recorded; - const appVersionInt = parseInt(window.ENV.TRACKER_VERSION.split(".").join("")) - const trackerVersionInt = site.trackerVersion ? parseInt(site.trackerVersion.split(".").join("")) : 0 - const needUpdate = !hasSessions && appVersionInt > trackerVersionInt; + + useEffect(() => { + if (!activeSite || !activeSite.trackerVersion) return; + + const isLatest = isGreaterOrEqualVersion(activeSite.trackerVersion, window.ENV.TRACKER_VERSION); + if (!isLatest && activeSite.recorded) { + setNeedUpdate(true) + } + }, [activeSite]) + return needUpdate ? ( <> {( diff --git a/frontend/app/utils.js b/frontend/app/utils.js index 52b2a9d6a..4c1a0c607 100644 --- a/frontend/app/utils.js +++ b/frontend/app/utils.js @@ -226,4 +226,10 @@ export const iceServerConfigFromString = (str) => { return server } }) +} + +export const isGreaterOrEqualVersion = (version, compareTo) => { + const [major, minor, patch] = version.split("-")[0].split('.'); + const [majorC, minorC, patchC] = compareTo.split("-")[0].split('.'); + return (major > majorC) || (major === majorC && minor > minorC) || (major === majorC && minor === minorC && patch >= patchC); } \ No newline at end of file From 6e7f0c33a7bdd83007c257bc757d35f8df9d5461 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Tue, 1 Mar 2022 16:03:41 +0100 Subject: [PATCH 18/19] feat(ui) - api recalls --- frontend/app/Router.js | 21 +++++++++++++- .../Alerts/Notifications/Notifications.js | 6 ++-- .../components/Announcements/Announcements.js | 6 +--- .../app/components/BugFinder/BugFinder.js | 28 ------------------- .../app/components/BugFinder/DateRange.js | 2 +- .../BugFinder/SessionsMenu/SessionsMenu.js | 6 ++-- frontend/app/components/Client/Client.js | 2 -- frontend/app/components/Header/Header.js | 4 --- .../app/components/Header/SiteDropdown.js | 12 ++++++-- 9 files changed, 37 insertions(+), 50 deletions(-) diff --git a/frontend/app/Router.js b/frontend/app/Router.js index 86f07c4f6..782f47e74 100644 --- a/frontend/app/Router.js +++ b/frontend/app/Router.js @@ -21,6 +21,10 @@ import Header from 'Components/Header/Header'; import FunnelDetails from 'Components/Funnels/FunnelDetails'; import FunnelIssueDetails from 'Components/Funnels/FunnelIssueDetails'; import { fetchList as fetchIntegrationVariables } from 'Duck/customField'; +import { fetchList as fetchSiteList } from 'Duck/site'; +import { fetchList as fetchAnnouncements } from 'Duck/announcements'; +import { fetchList as fetchAlerts } from 'Duck/alerts'; +import { fetchWatchdogStatus } from 'Duck/watchdogs'; import APIClient from './api_client'; import * as routes from './routes'; @@ -80,7 +84,14 @@ const ONBOARDING_REDIRECT_PATH = routes.onboarding(OB_DEFAULT_TAB); onboarding: state.getIn([ 'user', 'onboarding' ]) }; }, { - fetchUserInfo, fetchTenants, setSessionPath, fetchIntegrationVariables + fetchUserInfo, + fetchTenants, + setSessionPath, + fetchIntegrationVariables, + fetchSiteList, + fetchAnnouncements, + fetchAlerts, + fetchWatchdogStatus, }) class Router extends React.Component { state = { @@ -93,6 +104,14 @@ class Router extends React.Component { props.fetchUserInfo().then(() => { props.fetchIntegrationVariables() }), + props.fetchSiteList().then(() => { + setTimeout(() => { + props.fetchAnnouncements(); + props.fetchAlerts(); + props.fetchWatchdogStatus(); + }, 100); + }), + // props.fetchAnnouncements(), ]) // .then(() => this.onLoginLogout()); } diff --git a/frontend/app/components/Alerts/Notifications/Notifications.js b/frontend/app/components/Alerts/Notifications/Notifications.js index deb14b640..a30ad824f 100644 --- a/frontend/app/components/Alerts/Notifications/Notifications.js +++ b/frontend/app/components/Alerts/Notifications/Notifications.js @@ -18,9 +18,9 @@ class Notifications extends React.Component { constructor(props) { super(props); - setTimeout(() => { - props.fetchList(); - }, 1000); + // setTimeout(() => { + // props.fetchList(); + // }, 1000); setInterval(() => { props.fetchList(); diff --git a/frontend/app/components/Announcements/Announcements.js b/frontend/app/components/Announcements/Announcements.js index ff392e2e7..733b4ce37 100644 --- a/frontend/app/components/Announcements/Announcements.js +++ b/frontend/app/components/Announcements/Announcements.js @@ -10,11 +10,7 @@ import { withRouter } from 'react-router-dom'; @withToggle('visible', 'toggleVisisble') @withRouter class Announcements extends React.Component { - constructor(props) { - super(props); - props.fetchList(); - } - + navigateToUrl = url => { if (url) { if (url.startsWith(window.ENV.ORIGIN)) { diff --git a/frontend/app/components/BugFinder/BugFinder.js b/frontend/app/components/BugFinder/BugFinder.js index f0024c20a..6d30359f1 100644 --- a/frontend/app/components/BugFinder/BugFinder.js +++ b/frontend/app/components/BugFinder/BugFinder.js @@ -4,14 +4,11 @@ import withPageTitle from 'HOCs/withPageTitle'; import { fetchFavoriteList as fetchFavoriteSessionList } from 'Duck/sessions'; -import { countries } from 'App/constants'; import { applyFilter, clearEvents, addAttribute } from 'Duck/filters'; import { fetchList as fetchFunnelsList } from 'Duck/funnels'; -import { defaultFilters, preloadedFilters } from 'Types/filter'; import { KEYS } from 'Types/filter/customFilter'; import SessionList from './SessionList'; import stl from './bugFinder.css'; -import { fetchList as fetchSiteList } from 'Duck/site'; import withLocationHandlers from "HOCs/withLocationHandlers"; import { fetch as fetchFilterVariables } from 'Duck/sources'; import { fetchSources } from 'Duck/customField'; @@ -68,7 +65,6 @@ const allowedQueryKeys = [ fetchSources, clearEvents, setActiveTab, - fetchSiteList, fetchFunnelsList, resetFunnel, resetFunnelFilters, @@ -81,7 +77,6 @@ export default class BugFinder extends React.PureComponent { state = {showRehydratePanel: false} constructor(props) { super(props); - // props.fetchFavoriteSessionList(); // TODO should cache the response // props.fetchSources().then(() => { @@ -115,29 +110,6 @@ export default class BugFinder extends React.PureComponent { this.setState({ showRehydratePanel: !this.state.showRehydratePanel }) } - // fetchPreloadedFilters = () => { - // this.props.fetchFilterVariables('filterValues').then(function() { - // const { filterValues } = this.props; - // const keys = [ - // {key: KEYS.USER_OS, label: 'OS'}, - // {key: KEYS.USER_BROWSER, label: 'Browser'}, - // {key: KEYS.USER_DEVICE, label: 'Device'}, - // {key: KEYS.REFERRER, label: 'Referrer'}, - // {key: KEYS.USER_COUNTRY, label: 'Country'}, - // ] - // if (filterValues && filterValues.size != 0) { - // keys.forEach(({key, label}) => { - // const _keyFilters = filterValues.get(key) - // if (key === KEYS.USER_COUNTRY) { - // preloadedFilters.push(_keyFilters.map(item => ({label, type: key, key, value: item, actualValue: countries[item], isFilter: true}))); - // } else { - // preloadedFilters.push(_keyFilters.map(item => ({label, type: key, key, value: item, isFilter: true}))); - // } - // }) - // } - // }.bind(this)); - // } - setActiveTab = tab => { this.props.setActiveTab(tab); } diff --git a/frontend/app/components/BugFinder/DateRange.js b/frontend/app/components/BugFinder/DateRange.js index ed8c76c98..c0758b426 100644 --- a/frontend/app/components/BugFinder/DateRange.js +++ b/frontend/app/components/BugFinder/DateRange.js @@ -10,7 +10,7 @@ import DateRangeDropdown from 'Shared/DateRangeDropdown'; }) export default class DateRange extends React.PureComponent { onDateChange = (e) => { - this.props.fetchFunnelsList(e.rangeValue) + // this.props.fetchFunnelsList(e.rangeValue) this.props.applyFilter(e) } render() { diff --git a/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js b/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js index 2436d4be6..be98a28cd 100644 --- a/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js +++ b/frontend/app/components/BugFinder/SessionsMenu/SessionsMenu.js @@ -22,9 +22,9 @@ function SessionsMenu(props) { } } - useEffect(() => { - fetchWatchdogStatus() - }, []) + // useEffect(() => { + // fetchWatchdogStatus() + // }, []) const capturingAll = props.captureRate && props.captureRate.get('captureAll'); diff --git a/frontend/app/components/Client/Client.js b/frontend/app/components/Client/Client.js index 6cae36710..cb55d933d 100644 --- a/frontend/app/components/Client/Client.js +++ b/frontend/app/components/Client/Client.js @@ -3,7 +3,6 @@ import { withRouter } from 'react-router-dom'; import { Switch, Route, Redirect } from 'react-router'; import { CLIENT_TABS, client as clientRoute } from 'App/routes'; import { fetchList as fetchMemberList } from 'Duck/member'; -import { fetchList as fetchSiteList } from 'Duck/site'; import ProfileSettings from './ProfileSettings'; import Integrations from './Integrations'; @@ -21,7 +20,6 @@ import Roles from './Roles'; appearance: state.getIn([ 'user', 'account', 'appearance' ]), }), { fetchMemberList, - fetchSiteList, }) @withRouter export default class Client extends React.PureComponent { diff --git a/frontend/app/components/Header/Header.js b/frontend/app/components/Header/Header.js index 38d958c17..6d541fca7 100644 --- a/frontend/app/components/Header/Header.js +++ b/frontend/app/components/Header/Header.js @@ -66,10 +66,6 @@ const Header = (props) => { } }, [showTrackingModal]) - useEffect(() => { - fetchSiteList() - }, []) - return (

diff --git a/frontend/app/components/Header/SiteDropdown.js b/frontend/app/components/Header/SiteDropdown.js index 55259c088..74b650055 100644 --- a/frontend/app/components/Header/SiteDropdown.js +++ b/frontend/app/components/Header/SiteDropdown.js @@ -11,6 +11,8 @@ import cn from 'classnames'; import NewSiteForm from '../Client/Sites/NewSiteForm'; import { clearSearch } from 'Duck/search'; import { fetchList as fetchIntegrationVariables } from 'Duck/customField'; +import { fetchList as fetchAlerts } from 'Duck/alerts'; +import { fetchWatchdogStatus } from 'Duck/watchdogs'; @withRouter @connect(state => ({ @@ -23,13 +25,15 @@ import { fetchList as fetchIntegrationVariables } from 'Duck/customField'; init, clearSearch, fetchIntegrationVariables, + fetchAlerts, + fetchWatchdogStatus, }) export default class SiteDropdown extends React.PureComponent { state = { showProductModal: false } - componentDidMount() { - this.props.fetchIntegrationVariables(); - } + // componentDidMount() { + // this.props.fetchIntegrationVariables(); + // } closeModal = (e, newSite) => { this.setState({ showProductModal: false }) @@ -44,6 +48,8 @@ export default class SiteDropdown extends React.PureComponent { this.props.setSiteId(siteId); this.props.clearSearch(); this.props.fetchIntegrationVariables(); + this.props.fetchAlerts(); + this.props.fetchWatchdogStatus(); } render() { From 009cf7b1acaa1537765c5fc3a02a79cad49c8162 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Tue, 1 Mar 2022 23:30:03 +0100 Subject: [PATCH 19/19] feat(api): flag live session as viewed --- api/routers/core.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/routers/core.py b/api/routers/core.py index 9af9fec63..59bede0ae 100644 --- a/api/routers/core.py +++ b/api/routers/core.py @@ -36,8 +36,7 @@ def get_session2(projectId: int, sessionId: Union[int, str], context: schemas.Cu include_fav_viewed=True, group_metadata=True) if data is None: return {"errors": ["session not found"]} - if not data.get("live"): - sessions_favorite_viewed.view_session(project_id=projectId, user_id=context.user_id, session_id=sessionId) + sessions_favorite_viewed.view_session(project_id=projectId, user_id=context.user_id, session_id=sessionId) return { 'data': data }