diff --git a/api/Pipfile b/api/Pipfile index 84af64fd4..cc46bde93 100644 --- a/api/Pipfile +++ b/api/Pipfile @@ -6,19 +6,19 @@ name = "pypi" [packages] urllib3 = "==1.26.16" requests = "==2.32.3" -boto3 = "==1.35.29" +boto3 = "==1.35.51" pyjwt = "==2.9.0" -psycopg2-binary = "==2.9.9" +psycopg2-binary = "==2.9.10" +psycopg = {extras = ["binary", "pool"], version = "==3.2.3"} elasticsearch = "==8.15.1" jira = "==3.8.0" cachetools = "==5.5.0" -fastapi = "==0.115.0" +fastapi = "==0.115.4" +uvicorn = {extras = ["standard"], version = "==0.32.0"} python-decouple = "==3.8" -apscheduler = "==3.10.4" -redis = "==5.1.0" -psycopg = {extras = ["binary", "pool"], version = "==3.2.3"} -uvicorn = {extras = ["standard"], version = "==0.31.0"} pydantic = {extras = ["email"], version = "==2.9.2"} +apscheduler = "==3.10.4" +redis = "==5.2.0" [dev-packages] diff --git a/api/requirements-alerts.txt b/api/requirements-alerts.txt index 5b61178a9..98a7d0dbc 100644 --- a/api/requirements-alerts.txt +++ b/api/requirements-alerts.txt @@ -1,9 +1,9 @@ # Keep this version to not have conflicts between requests and boto3 urllib3==1.26.16 requests==2.32.3 -boto3==1.35.29 +boto3==1.35.51 pyjwt==2.9.0 -psycopg2-binary==2.9.9 +psycopg2-binary==2.9.10 psycopg[pool,binary]==3.2.3 elasticsearch==8.15.1 jira==3.8.0 @@ -11,8 +11,8 @@ cachetools==5.5.0 -fastapi==0.115.0 -uvicorn[standard]==0.31.0 +fastapi==0.115.4 +uvicorn[standard]==0.32.0 python-decouple==3.8 pydantic[email]==2.9.2 apscheduler==3.10.4 diff --git a/api/requirements.txt b/api/requirements.txt index ff224d0a9..bdf02c462 100644 --- a/api/requirements.txt +++ b/api/requirements.txt @@ -1,9 +1,9 @@ # Keep this version to not have conflicts between requests and boto3 urllib3==1.26.16 requests==2.32.3 -boto3==1.35.29 +boto3==1.35.51 pyjwt==2.9.0 -psycopg2-binary==2.9.9 +psycopg2-binary==2.9.10 psycopg[pool,binary]==3.2.3 elasticsearch==8.15.1 jira==3.8.0 @@ -11,10 +11,10 @@ cachetools==5.5.0 -fastapi==0.115.0 -uvicorn[standard]==0.31.0 +fastapi==0.115.4 +uvicorn[standard]==0.32.0 python-decouple==3.8 pydantic[email]==2.9.2 apscheduler==3.10.4 -redis==5.1.0 +redis==5.2.0 diff --git a/ee/api/Pipfile b/ee/api/Pipfile index 7e323092b..8290dcff7 100644 --- a/ee/api/Pipfile +++ b/ee/api/Pipfile @@ -6,24 +6,24 @@ name = "pypi" [packages] urllib3 = "==1.26.16" requests = "==2.32.3" -boto3 = "==1.35.29" +boto3 = "==1.35.51" pyjwt = "==2.9.0" -psycopg2-binary = "==2.9.9" +psycopg2-binary = "==2.9.10" +psycopg = {extras = ["pool", "binary"], version = "==3.2.3"} elasticsearch = "==8.15.1" jira = "==3.8.0" cachetools = "==5.5.0" -fastapi = "==0.115.0" +fastapi = "==0.115.4" +uvicorn = {extras = ["standard"], version = "==0.32.0"} gunicorn = "==23.0.0" python-decouple = "==3.8" -apscheduler = "==3.10.4" -python3-saml = "==1.16.0" -python-multipart = "==0.0.12" -redis = "==5.1.0b6" -azure-storage-blob = "==12.22.0" -psycopg = {extras = ["binary", "pool"], version = "==3.2.3"} -uvicorn = {extras = ["standard"], version = "==0.31.0"} pydantic = {extras = ["email"], version = "==2.9.2"} +apscheduler = "==3.10.4" clickhouse-driver = {extras = ["lz4"], version = "==0.2.9"} +python3-saml = "==1.16.0" +python-multipart = "==0.0.16" +redis = "==5.2.0" +azure-storage-blob = "==12.23.1" [dev-packages] diff --git a/ee/api/requirements-alerts.txt b/ee/api/requirements-alerts.txt index fe4ca68ae..862c6419d 100644 --- a/ee/api/requirements-alerts.txt +++ b/ee/api/requirements-alerts.txt @@ -1,9 +1,9 @@ # Keep this version to not have conflicts between requests and boto3 urllib3==1.26.16 requests==2.32.3 -boto3==1.35.29 +boto3==1.35.51 pyjwt==2.9.0 -psycopg2-binary==2.9.9 +psycopg2-binary==2.9.10 psycopg[pool,binary]==3.2.3 elasticsearch==8.15.1 jira==3.8.0 @@ -11,11 +11,11 @@ cachetools==5.5.0 -fastapi==0.115.0 -uvicorn[standard]==0.31.0 +fastapi==0.115.4 +uvicorn[standard]==0.32.0 python-decouple==3.8 pydantic[email]==2.9.2 apscheduler==3.10.4 clickhouse-driver[lz4]==0.2.9 -azure-storage-blob==12.22.0 \ No newline at end of file +azure-storage-blob==12.23.1 \ No newline at end of file diff --git a/ee/api/requirements-crons.txt b/ee/api/requirements-crons.txt index b3366b052..db5b3143c 100644 --- a/ee/api/requirements-crons.txt +++ b/ee/api/requirements-crons.txt @@ -1,9 +1,9 @@ # Keep this version to not have conflicts between requests and boto3 urllib3==1.26.16 requests==2.32.3 -boto3==1.35.29 +boto3==1.35.51 pyjwt==2.9.0 -psycopg2-binary==2.9.9 +psycopg2-binary==2.9.10 psycopg[pool,binary]==3.2.3 elasticsearch==8.15.1 jira==3.8.0 @@ -11,11 +11,11 @@ cachetools==5.5.0 -fastapi==0.115.0 +fastapi==0.115.4 python-decouple==3.8 pydantic[email]==2.9.2 apscheduler==3.10.4 clickhouse-driver[lz4]==0.2.9 -redis==5.1.0b6 -azure-storage-blob==12.22.0 +redis==5.2.0 +azure-storage-blob==12.23.1 diff --git a/ee/api/requirements.txt b/ee/api/requirements.txt index 1d7177ac2..b4e73fe49 100644 --- a/ee/api/requirements.txt +++ b/ee/api/requirements.txt @@ -1,9 +1,9 @@ # Keep this version to not have conflicts between requests and boto3 urllib3==1.26.16 requests==2.32.3 -boto3==1.35.29 +boto3==1.35.51 pyjwt==2.9.0 -psycopg2-binary==2.9.9 +psycopg2-binary==2.9.10 psycopg[pool,binary]==3.2.3 elasticsearch==8.15.1 jira==3.8.0 @@ -11,8 +11,8 @@ cachetools==5.5.0 -fastapi==0.115.0 -uvicorn[standard]==0.31.0 +fastapi==0.115.4 +uvicorn[standard]==0.32.0 gunicorn==23.0.0 python-decouple==3.8 pydantic[email]==2.9.2 @@ -22,8 +22,8 @@ clickhouse-driver[lz4]==0.2.9 # TODO: enable after xmlsec fix https://github.com/xmlsec/python-xmlsec/issues/252 #--no-binary is used to avoid libxml2 library version incompatibilities between xmlsec and lxml python3-saml==1.16.0 --no-binary=lxml -python-multipart==0.0.12 +python-multipart==0.0.16 -redis==5.1.0b6 +redis==5.2.0 #confluent-kafka==2.1.0 -azure-storage-blob==12.22.0 +azure-storage-blob==12.23.1 diff --git a/ee/scripts/schema/db/init_dbs/clickhouse/1.20.0/1.20.0.sql b/ee/scripts/schema/db/init_dbs/clickhouse/1.20.0/1.20.0.sql index 57e9b2ba7..455d9a3d5 100644 --- a/ee/scripts/schema/db/init_dbs/clickhouse/1.20.0/1.20.0.sql +++ b/ee/scripts/schema/db/init_dbs/clickhouse/1.20.0/1.20.0.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE FUNCTION openreplay_version AS() -> 'v1.19.0-ee'; +CREATE OR REPLACE FUNCTION openreplay_version AS() -> 'v1.20.0-ee'; DROP TABLE IF EXISTS experimental.events_l7d_mv; diff --git a/ee/scripts/schema/db/init_dbs/clickhouse/1.21.0/1.21.0.sql b/ee/scripts/schema/db/init_dbs/clickhouse/1.21.0/1.21.0.sql new file mode 100644 index 000000000..c60511f00 --- /dev/null +++ b/ee/scripts/schema/db/init_dbs/clickhouse/1.21.0/1.21.0.sql @@ -0,0 +1 @@ +CREATE OR REPLACE FUNCTION openreplay_version AS() -> 'v1.21.0-ee'; diff --git a/ee/scripts/schema/db/init_dbs/clickhouse/create/init_schema.sql b/ee/scripts/schema/db/init_dbs/clickhouse/create/init_schema.sql index 6f0dc684a..14d225848 100644 --- a/ee/scripts/schema/db/init_dbs/clickhouse/create/init_schema.sql +++ b/ee/scripts/schema/db/init_dbs/clickhouse/create/init_schema.sql @@ -1,4 +1,4 @@ -CREATE OR REPLACE FUNCTION openreplay_version AS() -> 'v1.19.0-ee'; +CREATE OR REPLACE FUNCTION openreplay_version AS() -> 'v1.21.0-ee'; CREATE DATABASE IF NOT EXISTS experimental; CREATE TABLE IF NOT EXISTS experimental.autocomplete diff --git a/ee/scripts/schema/db/init_dbs/postgresql/1.21.0/1.21.0.sql b/ee/scripts/schema/db/init_dbs/postgresql/1.21.0/1.21.0.sql new file mode 100644 index 000000000..85f1bf505 --- /dev/null +++ b/ee/scripts/schema/db/init_dbs/postgresql/1.21.0/1.21.0.sql @@ -0,0 +1,32 @@ +\set previous_version 'v1.20.0-ee' +\set next_version 'v1.21.0-ee' +SELECT openreplay_version() AS current_version, + openreplay_version() = :'previous_version' AS valid_previous, + openreplay_version() = :'next_version' AS is_next +\gset + +\if :valid_previous +\echo valid previous DB version :'previous_version', starting DB upgrade to :'next_version' +BEGIN; +SELECT format($fn_def$ +CREATE OR REPLACE FUNCTION openreplay_version() + RETURNS text AS +$$ +SELECT '%1$s' +$$ LANGUAGE sql IMMUTABLE; +$fn_def$, :'next_version') +\gexec + +-- + +UPDATE public.roles +SET permissions='{SERVICE_SESSION_REPLAY,SERVICE_DEV_TOOLS,SERVICE_ASSIST_LIVE,SERVICE_ASSIST_CALL,SERVICE_READ_NOTES}' +WHERE service_role; + +COMMIT; + +\elif :is_next +\echo new version detected :'next_version', nothing to do +\else +\warn skipping DB upgrade of :'next_version', expected previous version :'previous_version', found :'current_version' +\endif 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 ab0bd26bb..c74987108 100644 --- a/ee/scripts/schema/db/init_dbs/postgresql/init_schema.sql +++ b/ee/scripts/schema/db/init_dbs/postgresql/init_schema.sql @@ -1,4 +1,4 @@ -\set or_version 'v1.19.0-ee' +\set or_version 'v1.21.0-ee' SET client_min_messages TO NOTICE; \set ON_ERROR_STOP true SELECT EXISTS (SELECT 1 diff --git a/ee/scripts/schema/db/rollback_dbs/clickhouse/1.20.0/1.20.0.sql b/ee/scripts/schema/db/rollback_dbs/clickhouse/1.20.0/1.20.0.sql new file mode 100644 index 000000000..6474318e0 --- /dev/null +++ b/ee/scripts/schema/db/rollback_dbs/clickhouse/1.20.0/1.20.0.sql @@ -0,0 +1 @@ +CREATE OR REPLACE FUNCTION openreplay_version AS() -> 'v1.19.0-ee'; \ No newline at end of file diff --git a/ee/scripts/schema/db/rollback_dbs/clickhouse/1.21.0/1.21.0.sql b/ee/scripts/schema/db/rollback_dbs/clickhouse/1.21.0/1.21.0.sql new file mode 100644 index 000000000..890fbd6ec --- /dev/null +++ b/ee/scripts/schema/db/rollback_dbs/clickhouse/1.21.0/1.21.0.sql @@ -0,0 +1 @@ +CREATE OR REPLACE FUNCTION openreplay_version AS() -> 'v1.20.0-ee'; \ No newline at end of file diff --git a/ee/scripts/schema/db/rollback_dbs/postgresql/1.21.0/1.21.0.sql b/ee/scripts/schema/db/rollback_dbs/postgresql/1.21.0/1.21.0.sql new file mode 100644 index 000000000..af13e63e6 --- /dev/null +++ b/ee/scripts/schema/db/rollback_dbs/postgresql/1.21.0/1.21.0.sql @@ -0,0 +1,26 @@ +\set previous_version 'v1.21.0-ee' +\set next_version 'v1.20.0-ee' +SELECT openreplay_version() AS current_version, + openreplay_version() = :'previous_version' AS valid_previous, + openreplay_version() = :'next_version' AS is_next +\gset + +\if :valid_previous +\echo valid previous DB version :'previous_version', starting DB downgrade to :'next_version' +BEGIN; +SELECT format($fn_def$ +CREATE OR REPLACE FUNCTION openreplay_version() + RETURNS text AS +$$ +SELECT '%1$s' +$$ LANGUAGE sql IMMUTABLE; +$fn_def$, :'next_version') +\gexec + +COMMIT; + +\elif :is_next +\echo new version detected :'next_version', nothing to do +\else +\warn skipping DB downgrade of :'next_version', expected previous version :'previous_version', found :'current_version' +\endif \ No newline at end of file diff --git a/scripts/schema/db/init_dbs/postgresql/1.21.0/1.21.0.sql b/scripts/schema/db/init_dbs/postgresql/1.21.0/1.21.0.sql new file mode 100644 index 000000000..118241ab5 --- /dev/null +++ b/scripts/schema/db/init_dbs/postgresql/1.21.0/1.21.0.sql @@ -0,0 +1,29 @@ +\set previous_version 'v1.20.0' +\set next_version 'v1.21.0' +SELECT openreplay_version() AS current_version, + openreplay_version() = :'previous_version' AS valid_previous, + openreplay_version() = :'next_version' AS is_next +\gset + +\if :valid_previous +\echo valid previous DB version :'previous_version', starting DB upgrade to :'next_version' +BEGIN; +SELECT format($fn_def$ +CREATE OR REPLACE FUNCTION openreplay_version() + RETURNS text AS +$$ +SELECT '%1$s' +$$ LANGUAGE sql IMMUTABLE; +$fn_def$, :'next_version') +\gexec + +-- + + +COMMIT; + +\elif :is_next +\echo new version detected :'next_version', nothing to do +\else +\warn skipping DB upgrade of :'next_version', expected previous version :'previous_version', found :'current_version' +\endif diff --git a/scripts/schema/db/init_dbs/postgresql/init_schema.sql b/scripts/schema/db/init_dbs/postgresql/init_schema.sql index fae8d1622..143f64b73 100644 --- a/scripts/schema/db/init_dbs/postgresql/init_schema.sql +++ b/scripts/schema/db/init_dbs/postgresql/init_schema.sql @@ -1,4 +1,4 @@ -\set or_version 'v1.19.0' +\set or_version 'v1.21.0' SET client_min_messages TO NOTICE; \set ON_ERROR_STOP true SELECT EXISTS (SELECT 1 diff --git a/scripts/schema/db/rollback_dbs/postgresql/1.21.0/1.21.0.sql b/scripts/schema/db/rollback_dbs/postgresql/1.21.0/1.21.0.sql new file mode 100644 index 000000000..dcd2db62e --- /dev/null +++ b/scripts/schema/db/rollback_dbs/postgresql/1.21.0/1.21.0.sql @@ -0,0 +1,26 @@ +\set previous_version 'v1.21.0' +\set next_version 'v1.20.0' +SELECT openreplay_version() AS current_version, + openreplay_version() = :'previous_version' AS valid_previous, + openreplay_version() = :'next_version' AS is_next +\gset + +\if :valid_previous +\echo valid previous DB version :'previous_version', starting DB downgrade to :'next_version' +BEGIN; +SELECT format($fn_def$ +CREATE OR REPLACE FUNCTION openreplay_version() + RETURNS text AS +$$ +SELECT '%1$s' +$$ LANGUAGE sql IMMUTABLE; +$fn_def$, :'next_version') +\gexec + +COMMIT; + +\elif :is_next +\echo new version detected :'next_version', nothing to do +\else +\warn skipping DB downgrade of :'next_version', expected previous version :'previous_version', found :'current_version' +\endif \ No newline at end of file