Skip to content

Commit

Permalink
[feat][server] Logging: show package schema revision on startup
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Douglas Winship authored and Joe Stevens committed Dec 9, 2024
1 parent d084d79 commit dbac069
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/server/codechecker_server/database/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down

0 comments on commit dbac069

Please # to comment.