Merge remote-tracking branch 'origin/api-v1.8.0_patch1' into dev
# Conflicts: # scripts/helm/db/init_dbs/postgresql/1.8.1/1.8.1.sql
This commit is contained in:
commit
ed0eb2939f
17 changed files with 38 additions and 9 deletions
|
|
@ -4,3 +4,4 @@
|
|||
**/build.sh
|
||||
**/build_*.sh
|
||||
**/*deploy.sh
|
||||
Dockerfile*
|
||||
|
|
@ -8,6 +8,7 @@ ARG envarg
|
|||
ENV SOURCE_MAP_VERSION=0.7.4 \
|
||||
APP_NAME=chalice \
|
||||
LISTEN_PORT=8000 \
|
||||
MAPPING_WASM=/work/sourcemap-reader/mappings.wasm \
|
||||
ENTERPRISE_BUILD=${envarg}
|
||||
|
||||
ADD https://unpkg.com/source-map@${SOURCE_MAP_VERSION}/lib/mappings.wasm /mappings.wasm
|
||||
|
|
@ -20,7 +21,8 @@ RUN cd /work_tmp && npm install
|
|||
|
||||
WORKDIR /work
|
||||
COPY . .
|
||||
RUN mv env.default .env && mv /work_tmp/node_modules sourcemap-reader/. && chmod 644 /mappings.wasm
|
||||
RUN mv env.default .env && mv /work_tmp/node_modules sourcemap-reader/. \
|
||||
&& mv /mappings.wasm ${MAPPING_WASM} && chmod 644 ${MAPPING_WASM}
|
||||
|
||||
RUN adduser -u 1001 openreplay -D
|
||||
USER 1001
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
**/build.sh
|
||||
**/build_*.sh
|
||||
**/*deploy.sh
|
||||
Dockerfile*
|
||||
|
||||
app.py
|
||||
entrypoint_alerts.sh
|
||||
|
|
|
|||
|
|
@ -27,4 +27,5 @@ def get_original_trace(key, positions):
|
|||
return None
|
||||
except Exception as e:
|
||||
print("Issue getting sourcemap")
|
||||
print(e)
|
||||
return None
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ PG_CONFIG = dict(_PG_CONFIG)
|
|||
if config("pg_timeout", cast=int, default=0) > 0:
|
||||
PG_CONFIG["options"] = f"-c statement_timeout={config('pg_timeout', cast=int) * 1000}"
|
||||
|
||||
logging.info(f">PG_POOL:{config('PG_POOL', cast=bool, default=None)}")
|
||||
logging.info(f">PG_POOL:{config('PG_POOL', default=None)}")
|
||||
|
||||
|
||||
class ORThreadedConnectionPool(psycopg2.pool.ThreadedConnectionPool):
|
||||
|
|
@ -44,7 +44,7 @@ class ORThreadedConnectionPool(psycopg2.pool.ThreadedConnectionPool):
|
|||
except psycopg2.pool.PoolError as e:
|
||||
if str(e) == "trying to put unkeyed connection":
|
||||
print("!!! trying to put unkeyed connection")
|
||||
print(f"env-PG_POOL:{config('PG_POOL', cast=bool, default=None)}")
|
||||
print(f"env-PG_POOL:{config('PG_POOL', default=None)}")
|
||||
return
|
||||
raise e
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
**/build.sh
|
||||
**/build_*.sh
|
||||
**/*deploy.sh
|
||||
Dockerfile*
|
||||
|
||||
app_crons.py
|
||||
app_alerts.py
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ ARG envarg
|
|||
ENV SOURCE_MAP_VERSION=0.7.4 \
|
||||
APP_NAME=chalice \
|
||||
LISTEN_PORT=8000 \
|
||||
MAPPING_WASM=/work/sourcemap-reader/mappings.wasm \
|
||||
ENTERPRISE_BUILD=${envarg}
|
||||
|
||||
ADD https://unpkg.com/source-map@${SOURCE_MAP_VERSION}/lib/mappings.wasm /mappings.wasm
|
||||
|
|
@ -18,7 +19,8 @@ RUN cd /work_tmp && npm install
|
|||
|
||||
WORKDIR /work
|
||||
COPY . .
|
||||
RUN mv env.default .env && mv /work_tmp/node_modules sourcemap-reader/. && chmod 644 /mappings.wasm
|
||||
RUN mv env.default .env && mv /work_tmp/node_modules sourcemap-reader/. \
|
||||
&& mv /mappings.wasm ${MAPPING_WASM} && chmod 644 ${MAPPING_WASM}
|
||||
|
||||
RUN adduser -u 1001 openreplay -D
|
||||
USER 1001
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
**/build.sh
|
||||
**/build_*.sh
|
||||
**/*deploy.sh
|
||||
Dockerfile*
|
||||
|
||||
app.py
|
||||
app_crons.py
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
**/build.sh
|
||||
**/build_*.sh
|
||||
**/*deploy.sh
|
||||
Dockerfile*
|
||||
|
||||
app.py
|
||||
app_alerts.py
|
||||
|
|
|
|||
|
|
@ -793,7 +793,7 @@ def get_missing_resources_trend(project_id, startTimestamp=TimeUTC.now(delta_day
|
|||
GROUP BY url_hostpath
|
||||
ORDER BY doc_count DESC
|
||||
LIMIT 10;"""
|
||||
params = {"project_id": project_id, "startTimestamp": startTimestamp,
|
||||
params = {"step_size": step_size, "project_id": project_id, "startTimestamp": startTimestamp,
|
||||
"endTimestamp": endTimestamp, **__get_constraint_values(args)}
|
||||
rows = ch.execute(query=ch_query, params=params)
|
||||
|
||||
|
|
|
|||
8
ee/scripts/helm/db/init_dbs/postgresql/1.8.1/1.8.1.sql
Normal file
8
ee/scripts/helm/db/init_dbs/postgresql/1.8.1/1.8.1.sql
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
BEGIN;
|
||||
CREATE OR REPLACE FUNCTION openreplay_version()
|
||||
RETURNS text AS
|
||||
$$
|
||||
SELECT 'v1.8.1-ee'
|
||||
$$ LANGUAGE sql IMMUTABLE;
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -7,7 +7,7 @@ CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
|||
CREATE OR REPLACE FUNCTION openreplay_version()
|
||||
RETURNS text AS
|
||||
$$
|
||||
SELECT 'v1.8.0-ee'
|
||||
SELECT 'v1.8.1-ee'
|
||||
$$ LANGUAGE sql IMMUTABLE;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ $$
|
|||
SELECT 'v1.8.1'
|
||||
$$ LANGUAGE sql IMMUTABLE;
|
||||
|
||||
COMMIT;
|
||||
COMMIT;
|
||||
3
sourcemap-reader/clean.sh
Executable file
3
sourcemap-reader/clean.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
rm -rf ./utils
|
||||
2
sourcemap-reader/prepare-dev.sh
Executable file
2
sourcemap-reader/prepare-dev.sh
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
rsync -avr --exclude=".*" --ignore-existing ../utilities/utils ./
|
||||
|
|
@ -8,7 +8,11 @@ const PORT = process.env.SR_PORT || 9000;
|
|||
|
||||
const app = express();
|
||||
app.use(request_logger("[SR]"));
|
||||
|
||||
app.get(['/'], (req, res) => {
|
||||
res.statusCode = 200;
|
||||
res.end("ok!");
|
||||
}
|
||||
);
|
||||
app.use('/sourcemaps', sourcemapsReaderServer);
|
||||
app.use('/heapdump', dumps.router);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,13 @@ const fs = require('fs');
|
|||
const sourceMap = require('source-map');
|
||||
const AWS = require('aws-sdk');
|
||||
const URL = require('url');
|
||||
const wasm = fs.readFileSync('/mappings.wasm');
|
||||
const wasm = fs.readFileSync(process.env.MAPPING_WASM || '/mappings.wasm');
|
||||
sourceMap.SourceMapConsumer.initialize({
|
||||
"lib/mappings.wasm": wasm
|
||||
});
|
||||
|
||||
console.log(`>sourceMap initialised using ${process.env.MAPPING_WASM || '/mappings.wasm'}`);
|
||||
|
||||
module.exports.sourcemapReader = async event => {
|
||||
let s3;
|
||||
if (event.S3_HOST) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue