From dbac069f389fdeba00d9944630afb7d5d9467f5a Mon Sep 17 00:00:00 2001 From: Douglas Winship Date: Fri, 20 Sep 2024 11:52:42 -0400 Subject: [PATCH] [feat][server] Logging: show package schema revision on startup On startup, codechecker checks the alembic version of the codechecker database(s) to see if they match the expected value. Prior to this commit, the version found in the database was displayed in the logging, but the expected version was not always displayed. This added an uneccesary complication when debugging a database mismatch (eg during local testing) As of this commit, the found version and the expected version are both logged --- web/server/codechecker_server/database/database.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/server/codechecker_server/database/database.py b/web/server/codechecker_server/database/database.py index d5abc0bda2..b3f207aac0 100644 --- a/web/server/codechecker_server/database/database.py +++ b/web/server/codechecker_server/database/database.py @@ -265,6 +265,8 @@ def check_schema(self): LOG.debug("Checking schema versions in the package.") schema_config_head = scriptt.get_current_head() + LOG.debug("Schema revision in the package: %s", + str(schema_config_head)) if database_schema_revision != schema_config_head: LOG.debug("Database schema mismatch detected "