From b1667bd21f50112780580ba147cd3b7ac94d8de1 Mon Sep 17 00:00:00 2001 From: James Date: Sun, 19 Sep 2021 16:15:28 -0400 Subject: [PATCH] Update CHANGELOG.md, Update symbol director reference --- CHANGELOG.md | 7 +++++++ crashserver/webapp/models/symbol.py | 4 ++-- crashserver/webapp/operations.py | 1 - 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c73e3a0..99a7449 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.2.0.3] - 2021-09-19 +### Fixed +- Flush symbol after stored in database to get "symbol_location" from project + +### Changed +- Symbol "doesn't exist", and "already uploaded" log messages + ## [0.2.0.2] - 2021-09-18 ### Added - More log messages on minidump processing diff --git a/crashserver/webapp/models/symbol.py b/crashserver/webapp/models/symbol.py index b3ae2d9..20a9137 100644 --- a/crashserver/webapp/models/symbol.py +++ b/crashserver/webapp/models/symbol.py @@ -5,7 +5,7 @@ from sqlalchemy.sql import func, text from flask import current_app -from crashserver.config import settings +from crashserver import config from crashserver.webapp import db @@ -36,7 +36,7 @@ class Symbol(db.Model): def store_file(self, file_content: bytes): filesystem_module_id = self.build.module_id.split(".")[0] dir_location = Path(self.build.module_id, self.build.build_id, filesystem_module_id + ".sym") - sym_loc = self.project.symbol_location / dir_location + sym_loc = config.get_appdata_directory("symbol") / str(self.project_id) / dir_location sym_loc.parent.mkdir(parents=True, exist_ok=True) with open(sym_loc.absolute(), "wb") as f: diff --git a/crashserver/webapp/operations.py b/crashserver/webapp/operations.py index 9e2f66b..feaacd7 100644 --- a/crashserver/webapp/operations.py +++ b/crashserver/webapp/operations.py @@ -58,7 +58,6 @@ def symbol_upload(session, project_id: str, symbol_file: bytes, symbol_data: Sym arch=symbol_data.arch, app_version=symbol_data.app_version, ) - session.flush() build.symbol.store_file(symbol_file) session.commit()