From a7d5f8678786deeda29a7cce7a5bf9430247a3f7 Mon Sep 17 00:00:00 2001 From: Kraiem Taha Yassine Date: Thu, 26 Oct 2023 12:26:12 +0200 Subject: [PATCH] Api v1.15.0 (#1564) * feat(chalice): upgraded dependencies * feat(chalice): changed path analysis schema * feat(DB): click coordinate support * feat(chalice): changed path analysis issues schema feat(chalice): upgraded dependencies * fix(chalice): fixed pydantic issue * refactor(chalice): refresh token validator * feat(chalice): role restrictions * feat(chalice): EE path analysis changes * refactor(DB): changed creation queries refactor(DB): changed delte queries feat(DB): support new path analysis payload * feat(chalice): save path analysis card * feat(chalice): restrict access * feat(chalice): restrict access * feat(chalice): EE save new path analysis card * refactor(chalice): path analysis * feat(chalice): path analysis new query * fix(chalice): configurable CH config * fix(chalice): assist autocomplete * refactor(chalice): refactored permissions * refactor(chalice): changed log level * refactor(chalice): upgraded dependencies * refactor(chalice): changed path analysis query * refactor(chalice): changed path analysis query * refactor(chalice): upgraded dependencies refactor(alerts): upgraded dependencies refactor(crons): upgraded dependencies * feat(chalice): path analysis ignore start point * feat(chalice): path analysis in progress * refactor(chalice): path analysis changed link sort * refactor(chalice): path analysis changed link sort * refactor(chalice): path analysis changed link sort * refactor(chalice): path analysis new query refactor(chalice): authorizers * refactor(chalice): refactored authorizer * fix(chalice): fixed create card of PathAnalysis * refactor(chalice): compute link-percentage for Path Analysis * refactor(chalice): remove null starting point from Path Analysis * feat(chalice): path analysis CH query * refactor(chalice): changed Path Analysis links-value fix(chalice): fixed search notes for EE * feat(chalice): path analysis enhanced query results * feat(chalice): include timezone in search sessions response * refactor(chalice): refactored logs * refactor(chalice): refactored logs feat(chalice): get path analysis issues * fix(chalice): fixed path analysis issues pagination * fix(chalice): sessions-search handle null values * feat(chalice): PathAnalysis start event support middle-event matching * feat(chalice): PathAnalysis start event support middle-event matching * feat(chalice): PathAnalysis support mixed events with start-point * fix(chalice): PathAnalysis fixed eventType value when metricValue is missing * fix(chalice): PathAnalysis fixed wrong super-class model for update card * fix(chalice): PathAnalysis fixed search issues refactor(chalice): upgraded dependencies * fix(chalice): enforce isEvent if missing * fix(chalice): enforce isEvent if missing * refactor(chalice): refactored custom-metrics * refactor(chalice): small changes * feat(chalice): path analysis EE new query * fix(chalice): fixed hide-excess state for Path Analysis * fix(chalice): fixed update start point and excludes for Path Analysis * fix(chalice): fix payload validation fix(chalice): fix update widget endpoint * fix(chalice): fix payload validation fix(chalice): fix update widget endpoint * fix(chalice): fix add member * refactor(chalice): upgraded dependencies refactor!(chalice): upgraded SAML dependencies * feat(chalice): ios-project support 1/5 * refactor(chalice): changed logs handling * fix(chalice): fix path analysis issues list * Api v1.15.0 (#1542) * refactor(chalice): changed default dev env vars * refactor(chalice): changes * refactor(chalice): changed payload fixer * refactor(chalice): changed payload fixer refactor(chalice): support duplicate filters * Api v1.15.0 no merge (#1546) * refactor(chalice): changed default dev env vars * refactor(chalice): changes * refactor(chalice): changed payload fixer * refactor(chalice): changed payload fixer refactor(chalice): support duplicate filters * refactor(chalice): changes * feature(chalice): mobile sessions search * Api v1.15.0 no merge (#1549) * refactor(chalice): changed default dev env vars * refactor(chalice): changes * refactor(chalice): changed payload fixer * refactor(chalice): changed payload fixer refactor(chalice): support duplicate filters * refactor(chalice): changes * feature(chalice): mobile sessions search * refactor(chalice): fix EE refactored schema * Api v1.15.0 no merge (#1552) * refactor(chalice): changed default dev env vars * refactor(chalice): changes * refactor(chalice): changed payload fixer * refactor(chalice): changed payload fixer refactor(chalice): support duplicate filters * refactor(chalice): changes * feature(chalice): mobile sessions search * refactor(chalice): fix EE refactored schema * fix(chalice): fix missing platform for EE * Api v1.15.0 no merge (#1554) * refactor(chalice): changed default dev env vars * refactor(chalice): changes * refactor(chalice): changed payload fixer * refactor(chalice): changed payload fixer refactor(chalice): support duplicate filters * refactor(chalice): changes * feature(chalice): mobile sessions search * refactor(chalice): fix EE refactored schema * fix(chalice): fix missing platform for EE * fix(DB): fixed init_schema * Api v1.15.0 no merge (#1554) (#1555) * refactor(chalice): changed default dev env vars * refactor(chalice): changes * refactor(chalice): changed payload fixer * refactor(chalice): changed payload fixer refactor(chalice): support duplicate filters * refactor(chalice): changes * feature(chalice): mobile sessions search * refactor(chalice): fix EE refactored schema * fix(chalice): fix missing platform for EE * fix(DB): fixed init_schema * Api v1.15.0 no merge (#1557) * refactor(chalice): changed default dev env vars * refactor(chalice): changes * refactor(chalice): changed payload fixer * refactor(chalice): changed payload fixer refactor(chalice): support duplicate filters * refactor(chalice): changes * feature(chalice): mobile sessions search * refactor(chalice): fix EE refactored schema * fix(chalice): fix missing platform for EE * fix(DB): fixed init_schema * feat(DB): changes to support mobile sessions * feat(chalice): mobile sessions search support * fix(chalice): fixed signup * Api v1.15.0 (#1559) * refactor(chalice): changed default dev env vars * refactor(chalice): changes * refactor(chalice): changed payload fixer * refactor(chalice): changed payload fixer refactor(chalice): support duplicate filters * refactor(chalice): changes * feature(chalice): mobile sessions search * refactor(chalice): fix EE refactored schema * fix(chalice): fix missing platform for EE * fix(DB): fixed init_schema * feat(DB): changes to support mobile sessions * feat(chalice): mobile sessions search support * fix(chalice): fixed signup * fix(DB): added missing column * Api v1.15.0 no merge (#1562) * refactor(chalice): changed default dev env vars * refactor(chalice): changes * refactor(chalice): changed payload fixer * refactor(chalice): changed payload fixer refactor(chalice): support duplicate filters * refactor(chalice): changes * feature(chalice): mobile sessions search * refactor(chalice): fix EE refactored schema * fix(chalice): fix missing platform for EE * fix(DB): fixed init_schema * feat(DB): changes to support mobile sessions * feat(chalice): mobile sessions search support * fix(chalice): fixed signup * fix(DB): added missing column * refactor(DB): changed queries * fix(DB): added missing tables --- .../db/init_dbs/postgresql/1.15.0/1.15.0.sql | 32 ++++++++++++++++ .../db/init_dbs/postgresql/init_schema.sql | 37 ++++++++++++++++++- .../db/init_dbs/postgresql/1.15.0/1.15.0.sql | 2 - 3 files changed, 68 insertions(+), 3 deletions(-) diff --git a/ee/scripts/schema/db/init_dbs/postgresql/1.15.0/1.15.0.sql b/ee/scripts/schema/db/init_dbs/postgresql/1.15.0/1.15.0.sql index c56342022..cf0e4bc3a 100644 --- a/ee/scripts/schema/db/init_dbs/postgresql/1.15.0/1.15.0.sql +++ b/ee/scripts/schema/db/init_dbs/postgresql/1.15.0/1.15.0.sql @@ -119,6 +119,38 @@ ALTER TABLE IF EXISTS events.clicks ALTER TABLE IF EXISTS public.metrics ADD COLUMN IF NOT EXISTS card_info jsonb NULL; + +CREATE TABLE IF NOT EXISTS public.assist_events +( + event_id varchar NOT NULL PRIMARY KEY, + project_id integer NOT NULL, + session_id varchar NOT NULL, + event_type varchar NOT NULL, + event_state varchar NOT NULL, + timestamp integer NOT NULL, + user_id varchar, + agent_id varchar +); + +CREATE TABLE IF NOT EXISTS public.assist_events_aggregates +( + timestamp BIGINT not null, + project_id integer not null, + agent_id integer not null, + assist_avg BIGINT, + call_avg BIGINT, + control_avg BIGINT, + assist_total BIGINT, + call_total BIGINT, + control_total BIGINT +); + + +CREATE TABLE IF NOT EXISTS public.assist_events_aggregates_logs +( + time BIGINT not null +); + ALTER TABLE IF EXISTS public.users ADD COLUMN IF NOT EXISTS settings jsonb DEFAULT NULL; diff --git a/ee/scripts/schema/db/init_dbs/postgresql/init_schema.sql b/ee/scripts/schema/db/init_dbs/postgresql/init_schema.sql index bc509bfd2..89659c86b 100644 --- a/ee/scripts/schema/db/init_dbs/postgresql/init_schema.sql +++ b/ee/scripts/schema/db/init_dbs/postgresql/init_schema.sql @@ -136,7 +136,10 @@ $$ ('feature_flags'), ('feature_flags_conditions'), ('sessions_feature_flags'), - ('crashes_ios')) + ('crashes_ios'), + ('assist_events'), + ('assist_events_aggregates'), + ('assist_events_aggregates_logs')) select bool_and(exists(select * from information_schema.tables t where table_schema = 'public' @@ -967,6 +970,38 @@ $$ CREATE INDEX IF NOT EXISTS crashes_ios_project_id_crash_id_idx ON public.crashes_ios (project_id, crash_ios_id); CREATE INDEX IF NOT EXISTS crashes_ios_project_id_idx ON public.crashes_ios (project_id); + + CREATE TABLE IF NOT EXISTS public.assist_events + ( + event_id varchar NOT NULL PRIMARY KEY, + project_id integer NOT NULL, + session_id varchar NOT NULL, + event_type varchar NOT NULL, + event_state varchar NOT NULL, + timestamp integer NOT NULL, + user_id varchar, + agent_id varchar + ); + + CREATE TABLE IF NOT EXISTS public.assist_events_aggregates + ( + timestamp BIGINT not null, + project_id integer not null, + agent_id integer not null, + assist_avg BIGINT, + call_avg BIGINT, + control_avg BIGINT, + assist_total BIGINT, + call_total BIGINT, + control_total BIGINT + ); + + + CREATE TABLE IF NOT EXISTS public.assist_events_aggregates_logs + ( + time BIGINT not null + ); + RAISE NOTICE 'Created missing public schema tables'; END IF; END; diff --git a/scripts/schema/db/init_dbs/postgresql/1.15.0/1.15.0.sql b/scripts/schema/db/init_dbs/postgresql/1.15.0/1.15.0.sql index d322e51ac..ccc4be092 100644 --- a/scripts/schema/db/init_dbs/postgresql/1.15.0/1.15.0.sql +++ b/scripts/schema/db/init_dbs/postgresql/1.15.0/1.15.0.sql @@ -115,8 +115,6 @@ ALTER TABLE IF EXISTS events.clicks ADD COLUMN IF NOT EXISTS x integer DEFAULT NULL, ADD COLUMN IF NOT EXISTS y integer DEFAULT NULL; -ALTER TABLE IF EXISTS public.metrics - ADD COLUMN IF NOT EXISTS card_info jsonb NULL; ALTER TABLE IF EXISTS public.metrics ADD COLUMN IF NOT EXISTS card_info jsonb NULL;