Changes:
- debugging - smtp status - session's issues - session's issue_types as array - changed Slack error message
This commit is contained in:
parent
173b14a3e8
commit
96d507f1e5
7 changed files with 21 additions and 15 deletions
|
|
@ -28,14 +28,14 @@
|
|||
"assign_link": "http://127.0.0.1:8000/async/email_assignment",
|
||||
"captcha_server": "",
|
||||
"captcha_key": "",
|
||||
"sessions_bucket": "asayer-mobs",
|
||||
"sessions_bucket": "mobs",
|
||||
"sessions_region": "us-east-1",
|
||||
"put_S3_TTL": "20",
|
||||
"sourcemaps_bucket": "asayer-sourcemaps",
|
||||
"sourcemaps_bucket": "sourcemaps",
|
||||
"sourcemaps_bucket_key": "",
|
||||
"sourcemaps_bucket_secret": "",
|
||||
"sourcemaps_bucket_region": "us-east-1",
|
||||
"js_cache_bucket": "asayer-sessions-assets",
|
||||
"js_cache_bucket": "sessions-assets",
|
||||
"async_Token": "",
|
||||
"EMAIL_HOST": "",
|
||||
"EMAIL_PORT": "587",
|
||||
|
|
|
|||
|
|
@ -73,7 +73,8 @@ def get_account(context):
|
|||
"projects": -1,
|
||||
"metadata": metadata.get_remaining_metadata_with_count(context['tenantId'])
|
||||
},
|
||||
**license.get_status(context["tenantId"])
|
||||
**license.get_status(context["tenantId"]),
|
||||
"smtp": environ["EMAIL_HOST"] is not None and len(environ["EMAIL_HOST"]) > 0
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -160,7 +161,7 @@ def add_slack_client(context):
|
|||
return {"data": {"status": "success"}}
|
||||
else:
|
||||
return {
|
||||
"errors": ["failed URL verification, if you received a message on slack, please notify our dev-team"]
|
||||
"errors": ["We couldn't send you a test message on your Slack channel. Please verify your webhook url."]
|
||||
}
|
||||
|
||||
@app.route('/{projectId}/errors/search', methods=['POST'])
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from chalicelib.utils import pg_client, helper
|
||||
from chalicelib.core import events, sessions_metas, socket_ios, metadata, events_ios, \
|
||||
sessions_mobs
|
||||
sessions_mobs, issues
|
||||
from chalicelib.utils import dev
|
||||
|
||||
from chalicelib.core import projects, errors
|
||||
|
|
@ -25,7 +25,7 @@ SESSION_PROJECTION_COLS = """s.project_id,
|
|||
s.user_anonymous_id,
|
||||
s.platform,
|
||||
s.issue_score,
|
||||
s.issue_types::text[] AS issue_types,
|
||||
to_jsonb(s.issue_types) AS issue_types,
|
||||
favorite_sessions.session_id NOTNULL AS favorite,
|
||||
COALESCE((SELECT TRUE
|
||||
FROM public.user_viewed_sessions AS fs
|
||||
|
|
@ -84,7 +84,6 @@ def get_by_id2_pg(project_id, session_id, user_id, full_data=False, include_fav_
|
|||
data['userEvents'] = events_ios.get_customs_by_sessionId(project_id=project_id,
|
||||
session_id=session_id)
|
||||
data['mobsUrl'] = sessions_mobs.get_ios(sessionId=session_id)
|
||||
data['metadata'] = __group_metadata(project_metadata=data.pop("projectMetadata"), session=data)
|
||||
data["socket"] = socket_ios.start_replay(project_id=project_id, session_id=session_id,
|
||||
device=data["userDevice"],
|
||||
os_version=data["userOsVersion"],
|
||||
|
|
@ -101,9 +100,11 @@ def get_by_id2_pg(project_id, session_id, user_id, full_data=False, include_fav_
|
|||
data['userEvents'] = events.get_customs_by_sessionId2_pg(project_id=project_id,
|
||||
session_id=session_id)
|
||||
data['mobsUrl'] = sessions_mobs.get_web(sessionId=session_id)
|
||||
data['metadata'] = __group_metadata(project_metadata=data.pop("projectMetadata"), session=data)
|
||||
data['resources'] = resources.get_by_session_id(session_id=session_id)
|
||||
|
||||
data['metadata'] = __group_metadata(project_metadata=data.pop("projectMetadata"), session=data)
|
||||
data['issues'] = issues.get_by_session_id(session_id=session_id)
|
||||
|
||||
return data
|
||||
return None
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,7 @@ import boto3
|
|||
|
||||
|
||||
def get_web(sessionId):
|
||||
return boto3.client('s3',
|
||||
endpoint_url=environ["S3_HOST"],
|
||||
aws_access_key_id=environ["S3_KEY"],
|
||||
aws_secret_access_key=environ["S3_SECRET"],
|
||||
region_name=environ["sessions_region"]).generate_presigned_url(
|
||||
return boto3.client('s3', region_name=environ["sessions_region"]).generate_presigned_url(
|
||||
'get_object',
|
||||
Params={
|
||||
'Bucket': environ["sessions_bucket"],
|
||||
|
|
|
|||
|
|
@ -80,7 +80,12 @@ def get_traces_group(project_id, payload):
|
|||
payloads = {}
|
||||
all_exists = True
|
||||
for i, u in enumerate(frames):
|
||||
print("===============================")
|
||||
print(u["absPath"])
|
||||
print("converted to:")
|
||||
key = __get_key(project_id, u["absPath"]) # use filename instead?
|
||||
print(key)
|
||||
print("===============================")
|
||||
if key not in payloads:
|
||||
file_exists = s3.exists(environ['sourcemaps_bucket'], key)
|
||||
all_exists = all_exists and file_exists
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ def get_by_tenant_id(tenant_id):
|
|||
f"""SELECT
|
||||
tenant_id,
|
||||
name,
|
||||
api_key
|
||||
api_key,
|
||||
created_at,
|
||||
edition,
|
||||
version_number,
|
||||
|
|
|
|||
|
|
@ -49,6 +49,9 @@ def get_presigned_url_for_upload(bucket, expires_in, key):
|
|||
|
||||
|
||||
def get_file(source_bucket, source_key):
|
||||
print("******************************")
|
||||
print(f"looking for: {source_key} in {source_bucket}")
|
||||
print("******************************")
|
||||
try:
|
||||
result = client.get_object(
|
||||
Bucket=source_bucket,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue